summaryrefslogtreecommitdiffstats
path: root/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
commit04aecf1372d30eb709d8de65152535ab66dcb74a (patch)
treed1e4d8c453a76465e8b63119314a28d39b474479 /src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
parentAdding upstream version 7.0.14-dfsg. (diff)
downloadvirtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.tar.xz
virtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.zip
Adding upstream version 7.0.16-dfsg.upstream/7.0.16-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h')
-rw-r--r--src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h b/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
index 410abae1..56895dfb 100644
--- a/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
+++ b/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
@@ -35,16 +35,25 @@
* @returns @c true if valid, @c false otherwise.
* @param pVCpu The cross context virtual CPU structure of the calling EMT.
* @param uEntry The EPT page table entry to check.
+ *
+ * @remarks Current this ASSUMES @c uEntry is present (debug asserted)!
*/
DECLINLINE(bool) PGM_GST_SLAT_NAME_EPT(WalkIsPermValid)(PCVMCPUCC pVCpu, uint64_t uEntry)
{
if (!(uEntry & EPT_E_READ))
{
- Assert(!pVCpu->CTX_SUFF(pVM)->cpum.ro.GuestFeatures.fVmxModeBasedExecuteEpt);
- Assert(!RT_BF_GET(pVCpu->pgm.s.uEptVpidCapMsr, VMX_BF_EPT_VPID_CAP_EXEC_ONLY));
- NOREF(pVCpu);
- if (uEntry & (EPT_E_WRITE | EPT_E_EXECUTE))
+ if (uEntry & EPT_E_WRITE)
return false;
+
+ /*
+ * Currently all callers of this function check for the present mask prior
+ * to calling this function. Hence, the execute bit must be set now.
+ */
+ Assert(uEntry & EPT_E_EXECUTE);
+ Assert(!pVCpu->CTX_SUFF(pVM)->cpum.ro.GuestFeatures.fVmxModeBasedExecuteEpt);
+ if (pVCpu->pgm.s.uEptVpidCapMsr & VMX_BF_EPT_VPID_CAP_EXEC_ONLY_MASK)
+ return true;
+ return false;
}
return true;
}