mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
hv: delay enabling SMEP/SMAP until the end of PCPU initialization
Host ACPI parsing is needed during initialization only, not in run time. Hence we don't need to clear U flag for memory in reserved or ACPI type E820 entries. - move enable_smep() and enable_smap() to the end of init_pcpu_post(), so stac()/clac() can be removed from any init code before this point. - call init_seed() before init_pcpu_post(), and rmeove stac()/clac() from init_seed(). Tracked-On: #3194 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
9e91f14bec
commit
e63d32ac02
@@ -45,8 +45,6 @@ static uint32_t parse_seed_arg(void)
|
||||
uint32_t i = SEED_ARG_NUM - 1U;
|
||||
uint32_t len;
|
||||
|
||||
stac();
|
||||
|
||||
if (boot_regs[0U] == MULTIBOOT_INFO_MAGIC) {
|
||||
mbi = (struct multiboot_info *)hpa2hva((uint64_t)boot_regs[1U]);
|
||||
if (mbi != NULL) {
|
||||
@@ -79,8 +77,6 @@ static uint32_t parse_seed_arg(void)
|
||||
}
|
||||
}
|
||||
|
||||
clac();
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@@ -48,8 +48,6 @@ bool parse_seed_abl(uint64_t addr, struct physical_seed *phy_seed)
|
||||
struct abl_svn_seed *abl_seed = (struct abl_svn_seed *)hpa2hva(addr);
|
||||
bool status = false;
|
||||
|
||||
stac();
|
||||
|
||||
if ((phy_seed != NULL) && (abl_seed != NULL) &&
|
||||
(abl_seed->num_seeds >= 2U) && (abl_seed->num_seeds <= ABL_SEED_LIST_MAX)) {
|
||||
|
||||
@@ -90,7 +88,5 @@ bool parse_seed_abl(uint64_t addr, struct physical_seed *phy_seed)
|
||||
status = true;
|
||||
}
|
||||
|
||||
clac();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@@ -68,8 +68,6 @@ bool parse_seed_sbl(uint64_t addr, struct physical_seed *phy_seed)
|
||||
struct seed_info *seed_list = NULL;
|
||||
bool status = false;
|
||||
|
||||
stac();
|
||||
|
||||
boot_params = (struct image_boot_params *)hpa2hva(addr);
|
||||
|
||||
if (boot_params != NULL) {
|
||||
@@ -115,7 +113,5 @@ bool parse_seed_sbl(uint64_t addr, struct physical_seed *phy_seed)
|
||||
}
|
||||
}
|
||||
|
||||
clac();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user