This has been a warning before that was always raised if the machine has
a hpet. hpet_reset() will eventually result in mshv_send_msi called w/
vector 0, which we can safely drop.

Signed-off-by: Magnus Kulke <[email protected]>
---
 hw/i386/mshv/apic.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/i386/mshv/apic.c b/hw/i386/mshv/apic.c
index 9188a93b2f..ad326030bf 100644
--- a/hw/i386/mshv/apic.c
+++ b/hw/i386/mshv/apic.c
@@ -293,6 +293,16 @@ static void mshv_send_msi(MSIMessage *msi)
     delivery     = (data >> MSI_DATA_DELIVERY_MODE_SHIFT) &
                    MSI_DATA_DELIVERY_MODE_MASK;
 
+    /*
+     * Vector 0 is not a valid interrupt vector (0-15 are reserved for CPU
+     * exceptions). This can trigger during machine reset, if hpet_reset()
+     * forces the PIT to pulse GSI 2 before IOAPIC's own reset has masked its
+     * redirection entries.
+     */
+    if (vector == 0) {
+        return;
+    }
+
     mshv_request_interrupt(mshv_state, delivery, vector, dest, dest_mode,
                            trigger_mode);
 }
-- 
2.34.1


Reply via email to