From patchwork Tue Jun 2 14:47:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49379 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6387320BD1 for ; Tue, 2 Jun 2015 14:49:24 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf42699777lbc.2 for ; Tue, 02 Jun 2015 07:49:23 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=HXbvX3VlhCR+RFPHIbcKwj1W/OlLvG9NVq7eYbXZ32M=; b=EGgWS40ie39aaELvYR+aSt7ec+8dblxHbolZhRMCujNtrVZIz6pi8RaY8HfYc2pt3I N6ZX/ZwzARq9GQyQWOgyDHy//B7lcyGkAeVYTENapPA5UiBUHKz0+VkGIUfkf6uQnYgL 8JwI5v6NjXW///Q/FPUFahf2CS2BwqFHf4Lzie0kJbrvyyZizLxFbjq4bVZAtftwhnOn 8VCg/+e14EUatnJZVAbnAH+mN/yq35FMdhUweTEhduSU2d/yoKZ4oFswIEzx5NUAFq2s 6Dazwnt+YCeNhD2Gumn/LU3I1/BasPgMVdpTq/V/Qi5bEdJldDV2IvxTedYgK4mKhb4t HCmw== X-Gm-Message-State: ALoCoQnxVMpO2kMCrLi/hnmwEhvyR4PkFwAF+C65jdMlRUGhksSwCU+2mlr3p/lWXMBUnALewKWL X-Received: by 10.112.118.162 with SMTP id kn2mr26399870lbb.22.1433256563291; Tue, 02 Jun 2015 07:49:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls804244laf.30.gmail; Tue, 02 Jun 2015 07:49:23 -0700 (PDT) X-Received: by 10.153.5.37 with SMTP id cj5mr16541476lad.90.1433256563072; Tue, 02 Jun 2015 07:49:23 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id qb5si15293065lbb.28.2015.06.02.07.49.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labpy14 with SMTP id py14so115664542lab.0 for ; Tue, 02 Jun 2015 07:49:23 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr26167271lay.72.1433256562973; Tue, 02 Jun 2015 07:49:22 -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.112.108.230 with SMTP id hn6csp3128307lbb; Tue, 2 Jun 2015 07:49:21 -0700 (PDT) X-Received: by 10.70.136.67 with SMTP id py3mr50757402pdb.112.1433256561050; Tue, 02 Jun 2015 07:49:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv8si26697315pdb.173.2015.06.02.07.49.20; Tue, 02 Jun 2015 07:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759363AbbFBOtP (ORCPT + 2 others); Tue, 2 Jun 2015 10:49:15 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]:35205 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759403AbbFBOtK (ORCPT ); Tue, 2 Jun 2015 10:49:10 -0400 Received: by obcnx10 with SMTP id nx10so123884660obc.2 for ; Tue, 02 Jun 2015 07:49:09 -0700 (PDT) X-Received: by 10.202.231.196 with SMTP id e187mr13787645oih.134.1433256549605; Tue, 02 Jun 2015 07:49:09 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id og8sm9565217obb.6.2015.06.02.07.49.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:49:08 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Marc Zyngier Subject: [PATCH for 3.14.y stable 04/32] arm64: KVM: export demux regids as KVM_REG_ARM64 Date: Tue, 2 Jun 2015 22:47:59 +0800 Message-Id: <1433256507-7856-5-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@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.215.48 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Alex Bennée commit efd48ceacea78e4d4656aa0a6bf4c5b92ed22130 upstream. 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 Signed-off-by: Marc Zyngier Signed-off-by: Shannon Zhao --- 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;