[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated



With below testcase, guest kernel reported "No irq handler for vector":
  1). Passthrough mlx ib VF to 2 pvhvm guests.
  2). Start rds-stress between 2 guests.
  3). Scale down 2 guests vcpu from 32 to 6 at the same time.

Repeat above test several iteration, guest kernel reported "No irq handler
for vector", and IB traffic downed to zero which caused by interrupt lost.

When vcpu offline, kernel disabled local IRQ, migrate IRQ to other cpu,
update MSI-X table, enable IRQ. If any new interrupt arrived after
local IRQ disabled also before MSI-X table been updated, interrupt still 
used old vector and dest cpu info, and when local IRQ enabled again, 
interrupt been sent to wrong cpu and vector.

Looks sync PIR to IRR after MSI-X been updated is help for this issue.

BTW, I could not reproduced this issue if I disabled apicv.

Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
---
 xen/drivers/passthrough/io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index 4290c7c710..10c5b5d1e1 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -412,6 +412,9 @@ int pt_irq_create_bind(
                 pirq_dpci->gmsi.gvec = pt_irq_bind->u.msi.gvec;
                 pirq_dpci->gmsi.gflags = gflags;
             }
+
+            if ( hvm_funcs.sync_pir_to_irr )
+                
hvm_funcs.sync_pir_to_irr(d->vcpu[pirq_dpci->gmsi.dest_vcpu_id]);
         }
         /* Calculate dest_vcpu_id for MSI-type pirq migration. */
         dest = MASK_EXTR(pirq_dpci->gmsi.gflags,
-- 
2.20.1 (Apple Git-117)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.