From patchwork Mon May 4 01:52:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47957 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0BCAE2121F for ; Mon, 4 May 2015 01:55:00 +0000 (UTC) Received: by wizk4 with SMTP id k4sf30543178wiz.2 for ; Sun, 03 May 2015 18:54:59 -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=DWz4VjlCO8mlU3bkWyQsuwRYxirwRd/oTGXACIpJu8rZsalzzeXTkEtmSCIB/L4glI 0C4b0d/1+FFMo7KA5v9H09f26fVkvKMRoRJT1uH251rvPu7/Yw0OhWs/Xj1hYH/o+3WQ b1cGs6sP8RMyyLVXYlJCnrh2wHa768PXVSmWO/wZMcgeS++QPJMfZwnn2jC0EBvk1kpY H1weqV7nr5pjYu35ViAAL4RIQXwhS88DYeaCa7pHf8WlboUhrs4Y79L6EMfVsivC4Ule fJtHef6sc19U62DDrTMyKJwBjP6OfkZQSc+QiQVOfNReKOvsnsL108er8DSI4Zi0a+OH 3Ljg== X-Gm-Message-State: ALoCoQnd8mdLmO1qA1gtrtd3FrfH38skNtsuy9g3LVWk98y6ZHEEPQBw7xhvo/KYmEqtnYk/5noe X-Received: by 10.180.106.136 with SMTP id gu8mr6875282wib.6.1430704499385; Sun, 03 May 2015 18:54:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.172 with SMTP id p12ls710797lal.40.gmail; Sun, 03 May 2015 18:54:59 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr17412767lbc.73.1430704499062; Sun, 03 May 2015 18:54:59 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id aw7si9089766lbc.80.2015.05.03.18.54.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbuc2 with SMTP id uc2so95603063lbb.2 for ; Sun, 03 May 2015 18:54:59 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr18039159lbh.56.1430704498968; Sun, 03 May 2015 18:54:58 -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.67.65 with SMTP id l1csp1412793lbt; Sun, 3 May 2015 18:54:58 -0700 (PDT) X-Received: by 10.66.231.42 with SMTP id td10mr37675178pac.98.1430704497109; Sun, 03 May 2015 18:54:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.54.56; Sun, 03 May 2015 18:54:57 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbbEDByz (ORCPT + 2 others); Sun, 3 May 2015 21:54:55 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:34849 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909AbbEDByz (ORCPT ); Sun, 3 May 2015 21:54:55 -0400 Received: by pdbqd1 with SMTP id qd1so150085180pdb.2 for ; Sun, 03 May 2015 18:54:55 -0700 (PDT) X-Received: by 10.68.253.162 with SMTP id ab2mr38271036pbd.62.1430704495049; Sun, 03 May 2015 18:54:55 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id f7sm11084323pat.47.2015.05.03.18.54.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:54:53 -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 19/47] arm64: KVM: export demux regids as KVM_REG_ARM64 Date: Mon, 4 May 2015 09:52:14 +0800 Message-Id: <1430704362-6292-20-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-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.217.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 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;