diff --git a/OvmfPkg/IoMmuDxe/IoMmuDxe.c b/OvmfPkg/IoMmuDxe/IoMmuDxe.c index 5809afc441..27b1856e0a 100644 --- a/OvmfPkg/IoMmuDxe/IoMmuDxe.c +++ b/OvmfPkg/IoMmuDxe/IoMmuDxe.c @@ -33,8 +33,10 @@ IoMmuDxeEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status = EFI_SUCCESS; - EFI_HANDLE Handle = NULL; + EFI_STATUS Status; + EFI_HANDLE Handle; + + Status = EFI_SUCCESS; // // When SEV is enabled, install IoMmu protocol otherwise install the @@ -43,6 +45,8 @@ IoMmuDxeEntryPoint ( if (MemEncryptSevIsEnabled ()) { AmdSevInstallIoMmuProtocol (); } else { + Handle = NULL; + Status = gBS->InstallMultipleProtocolInterfaces ( &Handle, &gIoMmuAbsentProtocolGuid,