From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUXwP-00031V-Ko for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:28:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUXwN-0000gp-EE for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:28:25 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:23053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUXwN-0000gi-8l for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:28:23 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NTO00LC9QFANX60@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 26 Aug 2015 11:28:22 +0100 (BST) From: Pavel Fedin Date: Wed, 26 Aug 2015 13:28:15 +0300 Message-id: <081cbf8aed49fa483439bfd629f7c26fe62973bf.1440584396.git.p.fedin@samsung.com> In-reply-to: References: In-reply-to: References: Subject: [Qemu-devel] [PATCH v12 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Shlomo Pongratz , Shlomo Pongratz , Eric Auger This allows to use different GIC types from v2. There are no kernels which could advertise KVM_CAP_DEVICE_CTRL without the actual ability to create GIC with it. Signed-off-by: Pavel Fedin Reviewed-by: Eric Auger Tested-by: Ashok kumar --- target-arm/kvm.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index b278542..22383c5 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -585,18 +585,10 @@ void kvm_arch_init_irq_routing(KVMState *s) int kvm_arch_irqchip_create(KVMState *s) { - int ret; - /* If we can create the VGIC using the newer device control API, we * let the device do this when it initializes itself, otherwise we * fall back to the old API */ - - ret = kvm_create_device(s, KVM_DEV_TYPE_ARM_VGIC_V2, true); - if (ret == 0) { - return 1; - } - - return 0; + return kvm_check_extension(s, KVM_CAP_DEVICE_CTRL); } int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route, -- 1.9.5.msysgit.0