Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions MsvmPkg/PlatformPei/Hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <Hv/HvGuestCpuid.h>
#include <Library/DebugLib.h>
#include <Library/CrashDumpAgentLib.h>
#include <Library/PcdLib.h>
#include <Library/HvHypercallLib.h>
#include "MsCpuid.h"
#include "StaticAssert1.h"
Expand Down Expand Up @@ -175,6 +176,17 @@ Return Value:
{
EFI_STATUS status;

//
// When Hyper-V is disabled (e.g. the loader reported a Generic platform via
// the SEC platform type PPI) no hypervisor is present to service hypercalls.
// Issuing one here during PEI - before the exception vectors are installed -
// hard hangs the system, so skip the detection entirely.
//
if (!PcdGetBool(PcdHvEnabled))
{
return;
}

#if defined(MDE_CPU_X64)

HV_CPUID_RESULT cpuidResult;
Expand Down
Loading