hv:move forward the initialization for iommu & ptdev

move 'init_iommu()' & 'ptdev_init()' before starting
all secondary cores to avoid access uninitialized resource
in partition mode.

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Mingqiang Chi
2019-03-01 09:33:35 +08:00
committed by Xie, Nanlin
parent bc107105f8
commit 308d4e8c4e
2 changed files with 7 additions and 12 deletions

View File

@@ -47,16 +47,6 @@ static void init_debug_post(uint16_t pcpu_id)
profiling_setup();
}
/*TODO: move into pass-thru module */
static void init_passthru(void)
{
if (init_iommu() != 0) {
panic("failed to initialize iommu!");
}
ptdev_init();
}
/*TODO: move into guest-vcpu module */
static void enter_guest_mode(uint16_t pcpu_id)
{
@@ -81,8 +71,6 @@ static void init_primary_cpu_post(void)
init_debug_post(BOOT_CPU_ID);
init_passthru();
enter_guest_mode(BOOT_CPU_ID);
}