mirror of https://github.com/acidanthera/audk.git
OvmfPkg/VirtHstiDxe: do not load driver in confidential guests
The VirtHstiDxe does not work in confidential guests. There also isn't
anything we can reasonably test, neither flash storage nor SMM mode will
be used in that case. So just skip driver load when running in a
confidential guest.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Fixes: 506740982b
("OvmfPkg/VirtHstiDxe: add code flash check")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
90b6725562
commit
66c24219ad
|
@ -17,6 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PlatformInitLib.h>
|
#include <Library/PlatformInitLib.h>
|
||||||
|
|
||||||
#include <IndustryStandard/Hsti.h>
|
#include <IndustryStandard/Hsti.h>
|
||||||
|
@ -140,6 +141,11 @@ VirtHstiDxeEntrypoint (
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
|
||||||
|
if (PcdGet64 (PcdConfidentialComputingGuestAttr)) {
|
||||||
|
DEBUG ((DEBUG_INFO, "%a: confidential guest\n", __func__));
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
DevId = VirtHstiGetHostBridgeDevId ();
|
DevId = VirtHstiGetHostBridgeDevId ();
|
||||||
switch (DevId) {
|
switch (DevId) {
|
||||||
case INTEL_82441_DEVICE_ID:
|
case INTEL_82441_DEVICE_ID:
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdBfvBase
|
gUefiOvmfPkgTokenSpaceGuid.PcdBfvBase
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue