mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: enable SMAP in hypervisor
With SMAP enabled, hypervisor can't access pages that owned by guest(either SOS or UOS), and an override is is provided: stac()/clac() to enable/disable access to guest's memory pages. Pre-conditon: Mark hypervisor owned pages as supervisor mode (U/S = 0), and set all othter memory pages as user mode (U/S = 1). Tracked-On: #2056 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -339,6 +339,8 @@ void setup_ioapic_irqs(void)
|
||||
uint8_t pin, nr_pins;
|
||||
|
||||
addr = map_ioapic(get_ioapic_base(ioapic_id));
|
||||
hv_access_memory_region_update((uint64_t)addr, PAGE_SIZE);
|
||||
|
||||
nr_pins = ioapic_nr_pins(addr);
|
||||
for (pin = 0U; pin < nr_pins; pin++) {
|
||||
gsi_table[gsi].ioapic_id = ioapic_id;
|
||||
|
Reference in New Issue
Block a user