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 <kun.qin@microsoft.com>
This commit is contained in:
Kun Qin 2026-05-11 17:15:57 -07:00 committed by mergify[bot]
parent 7442655403
commit fe89a63da4

View file

@ -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.