mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
HV: enable SMEP in hypervisor
- this patch is to enable SMEP in hypervisor, SMEP protects guests' memory from supervisor-mode instruction fetches, in other words, hypervisor which operating in supervisor mode can't fetch instructions from (guests' memory) linear addresses that are accessible in user mode. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -495,6 +495,8 @@ void bsp_boot_init(void)
|
||||
pr_fatal("Please apply the latest CPU uCode patch!");
|
||||
}
|
||||
|
||||
enable_smep();
|
||||
|
||||
/* Initialize the shell */
|
||||
shell_init();
|
||||
|
||||
@@ -546,6 +548,9 @@ void cpu_secondary_init(void)
|
||||
* primary/boot CPU
|
||||
*/
|
||||
enable_paging(get_paging_pml4());
|
||||
|
||||
enable_smep();
|
||||
|
||||
early_init_lapic();
|
||||
|
||||
/* Find the logical ID of this CPU given the LAPIC ID
|
||||
|
||||
Reference in New Issue
Block a user