From fe89a63da49a4052e124a86a2860a8d29761d60f Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Mon, 11 May 2026 17:15:57 -0700 Subject: [PATCH] OvmfPkg: MmControlPei: Fix QEMU does not send MMI to all cores Because there was no negotiation, the SMM controller from QEMU will not broadcast the SMI to all cores, causing only the BSP getting interrupted into MMI. This change fixed the issue by invoking the negotiation routine and program the register to enable broadcasting. Signed-off-by: Kun Qin --- OvmfPkg/SmmControl2Dxe/MmControlPei.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OvmfPkg/SmmControl2Dxe/MmControlPei.c b/OvmfPkg/SmmControl2Dxe/MmControlPei.c index 8feac62e32..3290b639c5 100644 --- a/OvmfPkg/SmmControl2Dxe/MmControlPei.c +++ b/OvmfPkg/SmmControl2Dxe/MmControlPei.c @@ -185,6 +185,7 @@ MmControlPeiEntryPoint ( UINT32 PmBase; UINT32 SmiEnableVal; EFI_STATUS Status; + BOOLEAN NegotiationSuccessful; // // This module should only be included if SMRAM support is required. @@ -244,6 +245,13 @@ MmControlPeiEntryPoint ( goto FatalError; } + // + // QEMU can inject SMIs in different ways, negotiate our preferences. + // + NegotiationSuccessful = NegotiateSmiFeatures (); + + ASSERT (NegotiationSuccessful); + // // We have no pointers to convert to virtual addresses. The handle itself // doesn't matter, as protocol services are not accessible at runtime.