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:
Zide Chen
2019-05-29 10:57:51 -07:00
committed by ACRN System Integration
parent 9e91f14bec
commit e63d32ac02
7 changed files with 6 additions and 28 deletions

View File

@@ -66,10 +66,10 @@ static void init_primary_pcpu_post(void)
{
init_debug_pre();
init_pcpu_post(BOOT_CPU_ID);
init_seed();
init_pcpu_post(BOOT_CPU_ID);
init_debug_post(BOOT_CPU_ID);
enter_guest_mode(BOOT_CPU_ID);