From patchwork Tue Jul 1 15:53:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 32906 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D694520672 for ; Tue, 1 Jul 2014 15:55:38 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf19984842qac.4 for ; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :mime-version:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=kPF3JIU6hWlZrxw/rW+kQfI/zPfDV00bmXBivppheHY=; b=FULxqXtMtrgRy9NYXxsESY+rdWYvZs+XaBcKQQNtV2l69zeX7JIfA1wtvAUUGypHXj 95Eg3RmwtWN927Ql5zawPTF1W6AT0N1DZl9fBIzEHDRt3wFp4R/jbtzPHOEXb+p0QnyB kRFIa7lc4FC+ktzsh2myFOPUbv/RYjCgs4tF/1pGabWBh1QMUNXP518yV/ts2sQuqq4W HA8tGo57mZpE1aZfXDxlreQy8oFTSqEsGqSODYtOt1DiWnEt4cazp6URXoqX6zbMxDJp 5sHSsS20cGZxSbzIZBzqj6IxWdBv3kOkWmJd1F0gTApNe2/9kwZCq/ZaZTnW6QDeAFY5 zLpQ== X-Gm-Message-State: ALoCoQm33wwc0RCo9Rhd5jCR7Ht9Rqd1qAXFvaOyGpSI6vr9mDkWA2LHGdGYyIn2AoR/qzuWHjCB X-Received: by 10.236.189.68 with SMTP id b44mr3730635yhn.4.1404230138624; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.196 with SMTP id 62ls1374661qgt.45.gmail; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) X-Received: by 10.221.40.193 with SMTP id tr1mr2099987vcb.31.1404230138461; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id x5si11587354vcm.87.2014.07.01.08.55.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 08:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so9717348veb.7 for ; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) X-Received: by 10.220.69.72 with SMTP id y8mr44897905vci.21.1404230138376; Tue, 01 Jul 2014 08:55:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp225356vcb; Tue, 1 Jul 2014 08:55:38 -0700 (PDT) X-Received: by 10.68.213.74 with SMTP id nq10mr62543117pbc.4.1404230137640; Tue, 01 Jul 2014 08:55:37 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id xx7si27444140pac.35.2014.07.01.08.55.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jul 2014 08:55:37 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X20NJ-000148-Du; Tue, 01 Jul 2014 15:53:41 +0000 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155] helo=socrates.bennee.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X20NH-0000wn-8b for linux-arm-kernel@lists.infradead.org; Tue, 01 Jul 2014 15:53:40 +0000 Received: from localhost ([127.0.0.1] helo=zen.linaro.local) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1X20PV-0006D0-Rr; Tue, 01 Jul 2014 17:55:57 +0200 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: KVM: export demux regids as KVM_REG_ARM64 Date: Tue, 1 Jul 2014 16:53:13 +0100 Message-Id: <1404229993-14522-1-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.0.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140701_085339_481749_631407DB X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: kvm@vger.kernel.org, Marc Zyngier , Catalin Marinas , Will Deacon , open list , Gleb Natapov , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 I suspect this is a -ECUTPASTE fault from the initial implementation. If we don't declare the register ID to be KVM_REG_ARM64 the KVM_GET_ONE_REG implementation kvm_arm_get_reg() returns -EINVAL and hilarity ensues. The kvm/api.txt document describes all arm64 registers as starting with 0x60xx... (i.e KVM_REG_ARM64). Signed-off-by: Alex Bennée Acked-by: Christoffer Dall Acked-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 0324458..5ee99e4 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -962,7 +962,7 @@ static unsigned int num_demux_regs(void) static int write_demux_regids(u64 __user *uindices) { - u64 val = KVM_REG_ARM | KVM_REG_SIZE_U32 | KVM_REG_ARM_DEMUX; + u64 val = KVM_REG_ARM64 | KVM_REG_SIZE_U32 | KVM_REG_ARM_DEMUX; unsigned int i; val |= KVM_REG_ARM_DEMUX_ID_CCSIDR;