* [PATCH kernel] vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
@ 2015-03-12 3:43 Alexey Kardashevskiy
2015-03-12 16:36 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kardashevskiy @ 2015-03-12 3:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexey Kardashevskiy, Alex Williamson, kvm
This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler
without which vfio_pci_set_err_trigger() would never be called.
While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case
so if we add more indexes later, we won't miss it.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
drivers/vfio/pci/vfio_pci_intrs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index f88bfdf..2027a27 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -868,12 +868,14 @@ 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:
func = vfio_pci_set_req_trigger;
break;
}
+ break;
}
if (!func)
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH kernel] vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
2015-03-12 3:43 [PATCH kernel] vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX Alexey Kardashevskiy
@ 2015-03-12 16:36 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2015-03-12 16:36 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: linux-kernel, kvm
On Thu, 2015-03-12 at 14:43 +1100, Alexey Kardashevskiy wrote:
> This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler
> without which vfio_pci_set_err_trigger() would never be called.
>
> While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case
> so if we add more indexes later, we won't miss it.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> drivers/vfio/pci/vfio_pci_intrs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
> index f88bfdf..2027a27 100644
> --- a/drivers/vfio/pci/vfio_pci_intrs.c
> +++ b/drivers/vfio/pci/vfio_pci_intrs.c
> @@ -868,12 +868,14 @@ 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:
> func = vfio_pci_set_req_trigger;
> break;
> }
> + break;
> }
>
> if (!func)
Whoops, that's no good. Added to my for-linus branch for v4.0. Thanks
for the fix!
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-12 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 3:43 [PATCH kernel] vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX Alexey Kardashevskiy
2015-03-12 16:36 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).