From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRjHG-0003BL-JK for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRjHC-0003M5-Dq for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:58:18 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:37977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRjHC-0003Lu-8c for qemu-devel@nongnu.org; Tue, 18 Aug 2015 11:58:14 -0400 Received: by wicja10 with SMTP id ja10so112607047wic.1 for ; Tue, 18 Aug 2015 08:58:13 -0700 (PDT) Message-ID: <55D355E8.5000302@linaro.org> Date: Tue, 18 Aug 2015 17:57:28 +0200 From: Eric Auger MIME-Version: 1.0 References: <277ea9739294f1e43abd6461075d4ed5a1db2394.1439904588.git.p.fedin@samsung.com> In-Reply-To: <277ea9739294f1e43abd6461075d4ed5a1db2394.1439904588.git.p.fedin@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v10 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: Pavel Fedin , qemu-devel@nongnu.org Cc: Peter Maydell , Shlomo Pongratz , Christoffer Dall , Shlomo Pongratz Reviewed-by: Eric Auger On 08/18/2015 03:33 PM, Pavel Fedin wrote: > 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 > --- > 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, >