From patchwork Thu Apr 30 12:12:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47826 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D13B92121F for ; Thu, 30 Apr 2015 12:20:19 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf15109281lab.1 for ; Thu, 30 Apr 2015 05:20:18 -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: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=lI282wxp27SHy/QWHeOX0MDt1VbGbp0G3mEyHO531yM=; b=MT3WWb13b6vkDRQooe4jgd+ZLlI0HEjSKqSbEvNHRn4a4Kw078W55NU0Vc8ja+7IVQ Oabv9P/+Gi6KqBHrz72OwuDNh7a5JY+h0OK5U73YIt4cS+V7gMEna3W91/6Q3VmDNARF KRMQxYHYLAceV/Ochwy+95X2uc9JaL4xdhQu5Oyv9EYtfp8MofH8XEW8Cdm8bkaZ93nU 2Xhsg9dcDb8rgGeGNu2ZvY2nx4tQ7ooblA0Hiq/qOldw/4Dlh254ef8RaHuO3yHk4Jv0 MGB46V1LiJVNN68Pz7/AQEnmf4IgGriuyjMOnaO+iQn3ZmSSClKqtg+M7p3iLKVpYAyC tHOA== X-Gm-Message-State: ALoCoQmJ4R2ekoHpCRhrC78tt4lmzyI1rcCl7IFy9TeRqo3BWwV90rjMK+F+or4kfkn5aZhqivTl X-Received: by 10.112.46.172 with SMTP id w12mr2436479lbm.18.1430396418660; Thu, 30 Apr 2015 05:20:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.65 with SMTP id lu1ls340947lac.104.gmail; Thu, 30 Apr 2015 05:20:18 -0700 (PDT) X-Received: by 10.112.144.69 with SMTP id sk5mr3597707lbb.6.1430396418554; Thu, 30 Apr 2015 05:20:18 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id z9si1642297lbu.81.2015.04.30.05.20.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:20:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbqq2 with SMTP id qq2so42925419lbb.3 for ; Thu, 30 Apr 2015 05:20:18 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr3691960lad.56.1430396418453; Thu, 30 Apr 2015 05:20:18 -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 l1csp3078532lbt; Thu, 30 Apr 2015 05:20:17 -0700 (PDT) X-Received: by 10.70.91.104 with SMTP id cd8mr7924148pdb.94.1430396413483; Thu, 30 Apr 2015 05:20:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nh9si3245761pbc.189.2015.04.30.05.20.12; Thu, 30 Apr 2015 05:20:13 -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 S1751597AbbD3MT0 (ORCPT + 2 others); Thu, 30 Apr 2015 08:19:26 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53648 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751398AbbD3MMe (ORCPT ); Thu, 30 Apr 2015 08:12:34 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnnKT-0008C6-63; Thu, 30 Apr 2015 14:12:33 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Marc Zyngier , Shannon Zhao , Jiri Slaby Subject: [PATCH 3.12 37/63] arm64: KVM: export demux regids as KVM_REG_ARM64 Date: Thu, 30 Apr 2015 14:12:06 +0200 Message-Id: <6a6ab17612d5dd201198e88d6f7fcb476a7ae127.1430387326.git.jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 In-Reply-To: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> References: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> In-Reply-To: References: 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: patch@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.170 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 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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 Signed-off-by: Jiri Slaby --- 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 03244582bc55..5ee99e43890a 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;