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: 2505121 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 811C140148 for ; Tue, 30 Apr 2013 14:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456Ab3D3OuQ (ORCPT ); Tue, 30 Apr 2013 10:50:16 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:50564 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932429Ab3D3OuI (ORCPT ); Tue, 30 Apr 2013 10:50:08 -0400 Received: by mail-pb0-f51.google.com with SMTP id rq13so298426pbb.10 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=exou+oAoKH1u/efYxvfmjwJ/ugoKOP+mDA+aHMmJOEq6SOYXgnwFlyGgZaJ8KwodwH Jv1zjyvdmdhQRwQBdJwh5OUAtFslsgQQerEeRbm/xGEEDDTHWZoEXv+kpG0ByRIRig0Q VWJIZ+Vcsfur8zSBdnaWTRKbVHuNzLY3yoR/86iLSAFzRKrDSQhNqcHVppS0jV/2z5oy 2nb5KLFoYmL7vpH9sPdIlLRRecdoynp9tu8mjFF1lJKuvzyLHNRssy5Gc6lURNwFPczW HVkWoi+Jbo5Uo6q0x2RYxpRopQMJfwyYFlsPG3bCJBwiyLrh/VjYDmpQHgoFga04uTmK Fq7Q== 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 Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Christoffer Dall 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: ALoCoQkNrNUxsOOvkAaqLuqdRUgW5RNDefDJeQ7Cb/OUdwMB5cGXeBuST0nIzvkG8F6AIQ03iNlc Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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;