[Qemu-devel] [PATCH] vfio-pci: Add missing kvm_enabled() checks

2012-12-20 Thread Stefan Hajnoczi
It's necessary to check kvm_enabled() since a QEMU binary can be compiled with KVM support but TCG can be used at run-time. kvm_check_extension() segfaults if kvm_state is NULL. Reported-by: Joe Terranova joeterran...@gmail.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- hw/vfio_pci.c

Re: [Qemu-devel] [PATCH] vfio-pci: Add missing kvm_enabled() checks

2012-12-20 Thread Alex Williamson
On Thu, 2012-12-20 at 22:14 +0100, Stefan Hajnoczi wrote: It's necessary to check kvm_enabled() since a QEMU binary can be compiled with KVM support but TCG can be used at run-time. kvm_check_extension() segfaults if kvm_state is NULL. Ugh, this is exactly why we added kvm_irqfds_enabled()

Re: [Qemu-devel] [PATCH] vfio-pci: Add missing kvm_enabled() checks

2012-12-20 Thread Stefan Hajnoczi
On Thu, Dec 20, 2012 at 11:35 PM, Alex Williamson alex.william...@redhat.com wrote: On Thu, 2012-12-20 at 22:14 +0100, Stefan Hajnoczi wrote: It's necessary to check kvm_enabled() since a QEMU binary can be compiled with KVM support but TCG can be used at run-time. kvm_check_extension()