diff options
author | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-27 16:26:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 16:26:54 +0000 |
commit | 1bf1b9cc9b55fde85d44a22f829cf09f41a974ab (patch) | |
tree | feb30fce2c8f5cdba62210d726a7f3ad2ab7035b /OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | |
parent | 911a62f1327a7a689e3d061efc4e62508521d48d (diff) | |
parent | b2a431868c4ae0ad99def0a504d2fe097e16cd4f (diff) | |
download | edk2-dependabot/github_actions/github/issue-labeler-3.4.tar.gz |
Merge branch 'master' into dependabot/github_actions/github/issue-labeler-3.4dependabot/github_actions/github/issue-labeler-3.4
Diffstat (limited to 'OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c')
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c index 27148c7e33..946bed2ada 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c @@ -143,6 +143,25 @@ MemEncryptSevGetEncryptionMask ( }
/**
+ Returns a boolean to indicate whether DebugVirtualization is enabled.
+
+ @retval TRUE DebugVirtualization is enabled
+ @retval FALSE DebugVirtualization is not enabled
+**/
+BOOLEAN
+EFIAPI
+MemEncryptSevEsDebugVirtualizationIsEnabled (
+ VOID
+ )
+{
+ MSR_SEV_STATUS_REGISTER Msr;
+
+ Msr.Uint32 = InternalMemEncryptSevStatus ();
+
+ return Msr.Bits.DebugVirtualization ? TRUE : FALSE;
+}
+
+/**
Locate the page range that covers the initial (pre-SMBASE-relocation) SMRAM
Save State Map.
|