All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated
@ 2019-09-12 18:03 Joe Jin
  2019-09-13  7:14 ` Jan Beulich
  2019-09-13 10:33 ` Roger Pau Monné
  0 siblings, 2 replies; 23+ messages in thread
From: Joe Jin @ 2019-09-12 18:03 UTC (permalink / raw)
  To: xen-devel, Jan Beulich, Boris Ostrovsky, Joao Martins, DONGLI.ZHANG

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@oracle.com>
---
 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-10-01 16:22 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 18:03 [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated Joe Jin
2019-09-13  7:14 ` Jan Beulich
2019-09-13 16:38   ` Joe Jin
2019-09-16  8:01     ` Jan Beulich
2019-09-16 22:20       ` Joe Jin
2019-09-17  6:48         ` Jan Beulich
2019-09-18 21:16           ` Joe Jin
2019-09-19 10:24             ` Jan Beulich
2019-09-19 21:38               ` Joe Jin
2019-09-20  8:28                 ` Jan Beulich
2019-09-23 22:29                   ` Joe Jin
2019-09-24  7:26                     ` Jan Beulich
2019-09-23  8:31             ` Chao Gao
2019-09-23 15:49               ` Joe Jin
2019-09-13 10:33 ` Roger Pau Monné
2019-09-13 16:50   ` Joe Jin
2019-09-24 15:42     ` Roger Pau Monné
2019-09-26 20:33       ` Joe Jin
2019-09-27  8:18         ` Jan Beulich
2019-09-27  8:42         ` Roger Pau Monné
2019-09-27  9:07           ` Roger Pau Monné
2019-10-01 16:01         ` Roger Pau Monné
2019-10-01 16:22           ` Joe Jin

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.