add CONFIG_VM0_DESC support

if defined CONFIG_VM0_DESC, HV will use predefined vm0_desc to config
VM0, otherwise, HV will run VM0 with all physical cpus.

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jason Chen CJ
2018-05-30 20:06:26 +08:00
committed by lijinxia
parent 22833787ce
commit 589c72382a
6 changed files with 34 additions and 0 deletions

View File

@@ -104,7 +104,11 @@ void vcpu_thread(struct vcpu *vcpu)
static bool is_vm0_bsp(uint16_t pcpu_id)
{
#ifdef CONFIG_VM0_DESC
return pcpu_id == vm0_desc.vm_pcpu_ids[0];
#else
return pcpu_id == BOOT_CPU_ID;
#endif
}
int32_t hv_main(uint16_t pcpu_id)