All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: vfio: fix fail to set error notification
@ 2015-03-27  8:48 Wanpeng Li
  2015-03-27 12:47 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Wanpeng Li @ 2015-03-27  8:48 UTC (permalink / raw)
  To: kvm, linux-kernel; +Cc: Alex Williamson, Paolo Bonzini, 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 notification

This is caused by missing one break, this patch fix it.

Reported-and-tested-by: Liu Rongrong <rongrongx.liu@intel.com>
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 drivers/vfio/pci/vfio_pci_intrs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index f88bfdf..d1b6845 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -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:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: vfio: fix fail to set error notification
  2015-03-27  8:48 [PATCH] kvm: vfio: fix fail to set error notification Wanpeng Li
@ 2015-03-27 12:47 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2015-03-27 12:47 UTC (permalink / raw)
  To: Wanpeng Li; +Cc: kvm, linux-kernel, Paolo Bonzini

On Fri, 2015-03-27 at 16:48 +0800, Wanpeng Li wrote:
> 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.
> 
> Reported-and-tested-by: Liu Rongrong <rongrongx.liu@intel.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
> ---
>  drivers/vfio/pci/vfio_pci_intrs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
> index f88bfdf..d1b6845 100644
> --- a/drivers/vfio/pci/vfio_pci_intrs.c
> +++ b/drivers/vfio/pci/vfio_pci_intrs.c
> @@ -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:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci/vfio_pci_intrs.c?id=ec76f4007079469e86e2e44c3e5d1d11086de9d6


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-27 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27  8:48 [PATCH] kvm: vfio: fix fail to set error notification Wanpeng Li
2015-03-27 12:47 ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.