On Wed, 2015-01-07 at 10:55 +0000, Andre Przywara wrote: > Hi Scott, > > thanks for looking at the patch. > > On 06/01/15 20:52, Scott Wood wrote: > > Out of curiosity, why do you need to test it from inside the kernel but > > outside kvm_main.c? > > I need it from arch/arm/kvm/arm.c or alternatively virt/kvm/arm/vgic.c. > The problem is that while KVM_CREATE_DEVICE works fine with checking the > availability of the requested device, KVM_CREATE_IRQCHIP does not - and > the latter is handled in the arch specific parts of the code. At the > moment the GIC_V2 is the only IRQ chip, so it's all or nothing right > now. But very soon there will be a GIC_V3, with GIC_V2 compatibility not > always being available, so KVM_CREATE_IRQCHIP may fail although there is > an in-kernel IRQ chip available. > Instead of hacking something up I thought it would be cleaner to use the > existing framework and just map KVM_CREATE_IRQCHIP to > KVM_CREATE_DEVICE(KVM_DEV_TYPE_ARM_VGIC_V2). In that case you'd need the full create_device functionality from arch/arm/kvm, not just testing whether a device type is present, right? -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html