From patchwork Tue Apr 30 14:49:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 2505281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id A11223FD85 for ; Tue, 30 Apr 2013 14:54:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXBum-0002C6-Ja; Tue, 30 Apr 2013 14:52:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXBu8-0003BU-0r; Tue, 30 Apr 2013 14:51:40 +0000 Received: from mail-pb0-x236.google.com ([2607:f8b0:400e:c01::236]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXBsz-0002zF-KO for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2013 14:50:31 +0000 Received: by mail-pb0-f54.google.com with SMTP id jt11so297943pbb.27 for ; Tue, 30 Apr 2013 07:50:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=HCYwavplsHHecfoEGwKxWrfG1mi8Z6QA3eu3sZ8FkS4=; b=g3xJ21RnP0OiS5SqlVj+wo+5Ay4lErZKD6TiXzVaWmojA+70ouyGCgdAC67z8h/kWR 3d+vH1LuYkwWtvDqGittuNNf71U6QrESLzQPn6sJLfPuu3ULWsRzbm/Wq1WYoQi6+W++ SmFqzU3+//7gtzMx86pH4O8Nj+ouGT/G3sGVXIgEqR+XRRup4gEAbBJQsLiJ1QwX1j4e 21YXYCQ/ddN71YtZ7cxNMBgwTmnoO+7nmyrHRlWyY8z64nUigeJSAZESzWophv0pro9/ JuvELlISJVbtadtIwTEfXAimPUhtnhUX3kWFh2Sd/XRKHq06d0O0n2uiB7MXUgJwuYFQ DEag== X-Received: by 10.68.44.169 with SMTP id f9mr76252850pbm.29.1367333407801; Tue, 30 Apr 2013 07:50:07 -0700 (PDT) Received: from localhost.localdomain (c-67-169-183-77.hsd1.ca.comcast.net. [67.169.183.77]) by mx.google.com with ESMTPSA id cq1sm28799244pbc.13.2013.04.30.07.50.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Apr 2013 07:50:07 -0700 (PDT) From: Christoffer Dall To: kvm@vger.kernel.org Subject: [PATCH 10/15] ARM: KVM: add architecture specific hook for capabilities Date: Tue, 30 Apr 2013 07:49:31 -0700 Message-Id: <1367333376-30983-11-git-send-email-cdall@cs.columbia.edu> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1367333376-30983-1-git-send-email-cdall@cs.columbia.edu> References: <1367333376-30983-1-git-send-email-cdall@cs.columbia.edu> X-Gm-Message-State: ALoCoQntBwzuTa6ZbKeTFfaqVsuVVEepOtHzL/cV4TvxYk6vLYr8wR2//5N3y5e3XWje/zLYuZbL X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130430_105029_786116_74C805B5 X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Marc Zyngier Most of the capabilities are common to both arm and arm64, but we still need to handle the exceptions. Introduce kvm_arch_dev_ioctl_check_extension, which both architectures implement (in the 32bit case, it just returns 0). Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/include/asm/kvm_host.h | 5 +++++ arch/arm/kvm/arm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 6c2a35d..dcfcbf5 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -214,6 +214,11 @@ static inline void __cpu_init_hyp_mode(unsigned long long boot_pgd_ptr, kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr); } +static inline int kvm_arch_dev_ioctl_check_extension(long ext) +{ + return 0; +} + int kvm_perf_init(void); int kvm_perf_teardown(void); diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 6ea2aed..cc67caf 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -206,7 +206,7 @@ int kvm_dev_ioctl_check_extension(long ext) r = KVM_MAX_VCPUS; break; default: - r = 0; + r = kvm_arch_dev_ioctl_check_extension(ext); break; } return r;