mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: add SMAP/SMEP check during guest page walking
According to SDM 4.6 Access Rights definition, if SMAP/SMEP is enabled, more conditions are used to decide the access rights like SMAP/SMEP, EFLAGS.AC, R/W bit in every paging-structure entry for page walking. This patch add the check to guest page walking function and inject page fault accordingly. Tracked-On: #1207 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -408,6 +408,7 @@ static inline uint64_t apic_access_offset(uint64_t qual)
|
||||
|
||||
#define RFLAGS_C (1U<<0)
|
||||
#define RFLAGS_Z (1U<<6)
|
||||
#define RFLAGS_AC (1U<<18)
|
||||
|
||||
/* CR0 bits hv want to trap to track status change */
|
||||
#define CR0_TRAP_MASK (CR0_PE | CR0_PG | CR0_WP | CR0_CD | CR0_NW )
|
||||
|
Reference in New Issue
Block a user