All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] vfio: Fix vfio disable INTx
  2017-03-28 23:54 ` [PATCH v2] vfio: Fix vfio disable INTx Nikhil Rao
@ 2017-03-28 15:28   ` Burakov, Anatoly
  2017-03-30 15:00     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Burakov, Anatoly @ 2017-03-28 15:28 UTC (permalink / raw)
  To: Rao, Nikhil; +Cc: dev

> From: Rao, Nikhil
> Sent: Wednesday, March 29, 2017 12:54 AM
> To: Burakov, Anatoly <anatoly.burakov@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2] vfio: Fix vfio disable INTx
> 
> The flags member of irq_set should be ORed with
> VFIO_IRQ_SET_ACTION_MASK and not VFIO_IRQ_SET_ACTION_UNMASK.
> The bug was found by code inspection.
> 
> Fixes: 5c782b3928b8 (\"vfio: interrupts\")
> 
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>

Great find!

Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>

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

* [PATCH] vfio: Fix vfio ioctl call to mask INTx
@ 2017-03-28 23:15 Nikhil Rao
  2017-03-28 23:54 ` [PATCH v2] vfio: Fix vfio disable INTx Nikhil Rao
  0 siblings, 1 reply; 4+ messages in thread
From: Nikhil Rao @ 2017-03-28 23:15 UTC (permalink / raw)
  To: anatoly.burakov; +Cc: dev

The flags member of irq_set should be ORed with VFIO_IRQ_SET_ACTION_MASK
and not VFIO_IRQ_SET_ACTION_UNMASK. The bug was found by code inspection.

Fixes: 5c782b3928b8 (\"vfio: interrupts\")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 5bb833e..0d7c7c1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -194,7 +194,7 @@ vfio_disable_intx(const struct rte_intr_handle *intr_handle) {
 	irq_set = (struct vfio_irq_set *) irq_set_buf;
 	irq_set->argsz = len;
 	irq_set->count = 1;
-	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK;
+	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK;
 	irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
 	irq_set->start = 0;
 
-- 
2.7.4

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

* [PATCH v2] vfio: Fix vfio disable INTx
  2017-03-28 23:15 [PATCH] vfio: Fix vfio ioctl call to mask INTx Nikhil Rao
@ 2017-03-28 23:54 ` Nikhil Rao
  2017-03-28 15:28   ` Burakov, Anatoly
  0 siblings, 1 reply; 4+ messages in thread
From: Nikhil Rao @ 2017-03-28 23:54 UTC (permalink / raw)
  To: anatoly.burakov; +Cc: dev

The flags member of irq_set should be ORed with VFIO_IRQ_SET_ACTION_MASK
and not VFIO_IRQ_SET_ACTION_UNMASK. The bug was found by code inspection.

Fixes: 5c782b3928b8 (\"vfio: interrupts\")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
Changes since v1:
* Better summary
* Fix error message

 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 5bb833e..029a147 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -194,14 +194,14 @@ vfio_disable_intx(const struct rte_intr_handle *intr_handle) {
 	irq_set = (struct vfio_irq_set *) irq_set_buf;
 	irq_set->argsz = len;
 	irq_set->count = 1;
-	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK;
+	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK;
 	irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
 	irq_set->start = 0;
 
 	ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
 
 	if (ret) {
-		RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n",
+		RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n",
 						intr_handle->fd);
 		return -1;
 	}
-- 
2.7.4

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

* Re: [PATCH v2] vfio: Fix vfio disable INTx
  2017-03-28 15:28   ` Burakov, Anatoly
@ 2017-03-30 15:00     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-03-30 15:00 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev, Rao, Nikhil

2017-03-28 15:28, Burakov, Anatoly:
> > From: Rao, Nikhil
> > Sent: Wednesday, March 29, 2017 12:54 AM
> > To: Burakov, Anatoly <anatoly.burakov@intel.com>
> > Cc: dev@dpdk.org
> > Subject: [PATCH v2] vfio: Fix vfio disable INTx
> > 
> > The flags member of irq_set should be ORed with
> > VFIO_IRQ_SET_ACTION_MASK and not VFIO_IRQ_SET_ACTION_UNMASK.
> > The bug was found by code inspection.
> > 
> > Fixes: 5c782b3928b8 (\"vfio: interrupts\")
> > 
> > Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> 
> Great find!
> 
> Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>

Applied, thanks

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

end of thread, other threads:[~2017-03-30 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 23:15 [PATCH] vfio: Fix vfio ioctl call to mask INTx Nikhil Rao
2017-03-28 23:54 ` [PATCH v2] vfio: Fix vfio disable INTx Nikhil Rao
2017-03-28 15:28   ` Burakov, Anatoly
2017-03-30 15:00     ` Thomas Monjalon

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.