From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Alex Williamson" <alex@shazbot.org>,
"Peter Xu" <peterx@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>
Subject: [RFC PATCH v2 7/9] igb: Fix post-migration RX ring deadlock
Date: Wed, 2 Sep 2026 21:20:52 +0200 [thread overview]
Message-ID: <20260902192054.3329753-8-clg@redhat.com> (raw)
In-Reply-To: <20260902192054.3329753-1-clg@redhat.com>
After restoring VFRE/VFTE on the destination, the VF's RX rings may
be stalled because the guest driver is waiting for an interrupt that
was pending at the time of migration. Re-raise any pending EICR
causes for the VF (both RX and TX) via igb_set_eics() to break the
deadlock.
AI-used-for: analysis, code (prototype)
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
hw/net/igb_core.h | 1 +
hw/net/igb_core.c | 16 ++++++++++++++++
hw/net/igb_migration.c | 4 ++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/hw/net/igb_core.h b/hw/net/igb_core.h
index 7fdc41690b36..7d6f44b7ffe9 100644
--- a/hw/net/igb_core.h
+++ b/hw/net/igb_core.h
@@ -150,6 +150,7 @@ igb_start_recv(IGBCore *core);
IGBCore *igb_pf_get_core(void *pf);
void igb_core_vf_propagate_irqs(IGBCore *core, uint16_t vfn);
+void igb_core_vf_rearm_irqs(IGBCore *core, uint16_t vfn);
void igb_core_vf_propagate_ivar(IGBCore *core, uint16_t vfn);
#endif
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index 12329a1aff58..1de8d95102e4 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -4632,3 +4632,19 @@ void igb_core_vf_propagate_ivar(IGBCore *core, uint16_t vfn)
core->mac[IVAR0 + n / 4] &= ~mask;
}
}
+
+/*
+ * Re-apply VF interrupt enables to PF aggregates and raise the
+ * pending causes so the guest driver resumes polling after migration.
+ */
+void igb_core_vf_rearm_irqs(IGBCore *core, uint16_t vfn)
+{
+ uint32_t shift = 22 - vfn * IGBVF_MSIX_VEC_NUM;
+ uint32_t pvt_idx = PVTEICR0 + vfn * 0x40;
+ uint32_t causes = (core->mac[pvt_idx] & 0x7) << shift;
+
+ igb_core_vf_propagate_irqs(core, vfn);
+ if (causes) {
+ igb_set_eics(core, EICS, causes);
+ }
+}
diff --git a/hw/net/igb_migration.c b/hw/net/igb_migration.c
index 435bd0d1623b..46299ff77ab9 100644
--- a/hw/net/igb_migration.c
+++ b/hw/net/igb_migration.c
@@ -813,8 +813,8 @@ static void igb_core_vf_unquiesce(IgbVfState *s)
trace_igbvf_mig_unquiesce(s->vfn, core->mac[VFRE], core->mac[VFTE]);
- if (re) {
- igb_start_recv(core);
+ if (re || te) {
+ igb_core_vf_rearm_irqs(core, s->vfn);
}
}
--
2.55.0
next prev parent reply other threads:[~2026-09-02 19:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 19:20 [RFC PATCH v2 0/9] igb: Add experimental VF live migration support Cédric Le Goater
2026-09-02 19:20 ` [RFC PATCH v2 1/9] igb: Add x-vf-migration property and DVSEC extended capability Cédric Le Goater
2026-09-03 19:57 ` Alex Williamson
2026-09-07 20:58 ` Cédric Le Goater
2026-09-02 19:20 ` [RFC PATCH v2 2/9] igb: Add migration state machine via extended config space Cédric Le Goater
2026-09-02 19:20 ` [RFC PATCH v2 3/9] igb: Add VF state serialization for live migration Cédric Le Goater
2026-09-08 8:01 ` Akihiko Odaki
2026-09-15 7:47 ` Cédric Le Goater
2026-09-17 18:59 ` Akihiko Odaki
2026-09-02 19:20 ` [RFC PATCH v2 4/9] igb: Add VF post-load fixups " Cédric Le Goater
2026-09-08 8:10 ` Akihiko Odaki
2026-09-15 7:58 ` Cédric Le Goater
2026-09-17 19:01 ` Akihiko Odaki
2026-09-02 19:20 ` [RFC PATCH v2 5/9] igb: Add dirty page tracking for IGBVF migration Cédric Le Goater
2026-09-02 19:20 ` [RFC PATCH v2 6/9] igb: Quiesce VFs on STOP and include PF enable state in migration Cédric Le Goater
2026-09-02 19:20 ` Cédric Le Goater [this message]
2026-09-02 19:20 ` [RFC PATCH v2 8/9] igb: Add dirty page tracking statistics Cédric Le Goater
2026-09-02 19:20 ` [RFC PATCH v2 9/9] docs: Add igb VF migration testing setup guide Cédric Le Goater
2026-09-08 8:39 ` Akihiko Odaki
2026-09-15 7:59 ` Cédric Le Goater
2026-09-09 7:19 ` [RFC PATCH v2 0/9] igb: Add experimental VF live migration support Akihiko Odaki
2026-09-15 8:20 ` Cédric Le Goater
2026-09-17 19:49 ` Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260902192054.3329753-8-clg@redhat.com \
--to=clg@redhat.com \
--cc=alex@shazbot.org \
--cc=jasowangio@gmail.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sriram.yagnaraman@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.