From patchwork Fri Apr 24 05:27:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47522 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA0C820553 for ; Fri, 24 Apr 2015 05:33:04 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf9152628wgt.1 for ; Thu, 23 Apr 2015 22:33:04 -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=GWsJDCKLf21lfdpacQ7zw1A8jp9QfNcJIpY/4g6xwQcVLAKUG3NoXj6wqLuftncBeW SBCxjT8hkoEUsDSb5TFa0H5+GSh+G0t1v9o4YfKZO3K2fPngrIkXbjItkpWLfTh/BtE4 QIGYZrzajg22IUOp6X6JMXJt7igsUkp24i32q+zvLKpZj2d+AfZ4v8TcnTI0qKKKI2u2 yziEZ1ZLoHRVLHIjoyzqVZi5/RFNM1oaQ+F/yWPDxmjrGe3yxnJwnZR5cOx7P5EpeHcd 7zTqaj6TjaDcaLTY+m67pGhmJQDcyvHJ6lQsya2TcBrDG3UOVtExeP6vTslsOW8J9VDF Fodg== X-Gm-Message-State: ALoCoQmD0Z0PiVk/xnAsU6/xpjZ8lKs9hyDp8iHNVVsMLUFQzJG7ViBwbGOaZDMFjCCFhGhC54CY X-Received: by 10.152.3.70 with SMTP id a6mr3221462laa.0.1429853583983; Thu, 23 Apr 2015 22:33:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.36 with SMTP id yf4ls441331lab.43.gmail; Thu, 23 Apr 2015 22:33:03 -0700 (PDT) X-Received: by 10.112.54.225 with SMTP id m1mr5558251lbp.34.1429853583840; Thu, 23 Apr 2015 22:33:03 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id v13si7465610lal.98.2015.04.23.22.33.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 22:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by layy10 with SMTP id y10so27613363lay.0 for ; Thu, 23 Apr 2015 22:33:03 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr5430968laa.36.1429853583749; Thu, 23 Apr 2015 22:33:03 -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 l1csp978278lbt; Thu, 23 Apr 2015 22:33:02 -0700 (PDT) X-Received: by 10.70.118.73 with SMTP id kk9mr3006105pdb.150.1429853581970; Thu, 23 Apr 2015 22:33:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd10si15800741pdb.178.2015.04.23.22.33.01; Thu, 23 Apr 2015 22:33:01 -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 S1754544AbbDXFdA (ORCPT + 2 others); Fri, 24 Apr 2015 01:33:00 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:35562 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545AbbDXFdA (ORCPT ); Fri, 24 Apr 2015 01:33:00 -0400 Received: by oign205 with SMTP id n205so32403023oig.2 for ; Thu, 23 Apr 2015 22:32:59 -0700 (PDT) X-Received: by 10.60.120.101 with SMTP id lb5mr5812831oeb.82.1429853579778; Thu, 23 Apr 2015 22:32:59 -0700 (PDT) Received: from localhost ([167.160.116.36]) by mx.google.com with ESMTPSA id mk8sm6092026obc.3.2015.04.23.22.32.57 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 22:32:58 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: jslaby@suse.cz, christoffer.dall@linaro.org, shannon.zhao@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Marc Zyngier Subject: [PATCH for 3.12.y stable 37/63] arm64: KVM: export demux regids as KVM_REG_ARM64 Date: Fri, 24 Apr 2015 13:27:35 +0800 Message-Id: <1429853281-6136-38-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1429853281-6136-1-git-send-email-shannon.zhao@linaro.org> References: <1429853281-6136-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.50 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;