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 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() segfaults if kvm_state is

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() w

[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 Signed-off-by: Stefan Hajnoczi --- hw/vfio_pci.c | 6 -- 1 file changed, 4 insertions(