/* Pre-validate the system RAM when SEV-SNP is enabled in the guest VM. */
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam(IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
/* Pre-validate the system RAM when SEV-SNP is enabled in the guest VM. */
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam(IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
{
  if (!MemEncryptSevSnpIsEnabled ()) {
    return;
  }
  if (!SevSnpIsVmpl0 ()) {
    SnpPageStateFailureTerminate ();
  }
  InternalSetPageState (BaseAddress, NumPages, SevSnpPagePrivate, TRUE);
}