kvm: vfio: fix fail to set error notification
Subsystems (2)
PATCH 1/1 kvm: vfio: fix fail to set error notification
After commit 6140a8f56238 ("vfio-pci: Add device request interface") merged, there is error dump when run guest as below:
qemu-system-x86_64 -enable-kvm -m 2G -smp 2 -net none /root/cathy/rhel6u5.qcow -device vfio-pci,host=03:10.5
qemu-system-x86_64: -device vfio-pci,host=03:10.5: vfio: Failed to set up error notification
This is caused by missing one break, this patch fix it.
--- drivers/vfio/pci/vfio_pci_intrs.c | 1 + 1 file changed, 1 insertion(+)
drivers/vfio/pci/vfio_pci_intrs.c +1 -0
@@ -868,6 +868,7 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags, func = vfio_pci_set_err_trigger;break ; } +break ;case VFIO_PCI_REQ_IRQ_INDEX :switch (flags &VFIO_IRQ_SET_ACTION_TYPE_MASK ) {case VFIO_IRQ_SET_ACTION_TRIGGER :
Signature · 1 line
1.9.1
Quoted 19 lines · Wanpeng Li
After commit
6140a8f56238("vfio-pci: Add device request interface") merged, there is error dump when run guest as below:qemu-system-x86_64 -enable-kvm -m 2G -smp 2 -net none
/root/cathy/rhel6u5.qcow-device vfio-pci,host=03:10.5
qemu-system-x86_64: -device vfio-pci,host=03:10.5: vfio: Failed to set up error notificationThis is caused by missing one break, this patch fix it.
Reported-and-tested-by Liu Rongrong <[email protected]>Signed-off-by Wanpeng Li <[email protected]>--- drivers/vfio/pci/vfio_pci_intrs.c | 1 + 1 file changed, 1 insertion(+)drivers/vfio/pci/vfio_pci_intrs.c +0
-0
drivers/vfio/pci/vfio_pci_intrs.c int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags, · line 874
Quoted 7 lines
drivers/vfio/pci/vfio_pci_intrs.c +1
-0@@ -868,6 +868,7 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags, func = vfio_pci_set_err_trigger;break ; } +break ;case VFIO_PCI_REQ_IRQ_INDEX :switch (flags &VFIO_IRQ_SET_ACTION_TYPE_MASK ) {case VFIO_IRQ_SET_ACTION_TRIGGER :
Thanks for the report. This was already fixed in v4.0-rc4: