mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-12 13:32:31 +00:00
hv: VM BSP vcpu mode for ACRN partition mode
BSPs for VMs booted in ACRN partition mode start in protected mode. Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
parent
c234acb338
commit
5b8c7a5b23
@ -494,6 +494,9 @@ int prepare_vcpu(struct vm *vm, uint16_t pcpu_id)
|
||||
/* Load VM SW */
|
||||
if (!vm_sw_loader)
|
||||
vm_sw_loader = general_sw_loader;
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
vcpu->arch_vcpu.cpu_mode = CPU_MODE_PROTECTED;
|
||||
#else
|
||||
if (is_vm0(vcpu->vm)) {
|
||||
struct boot_ctx *vm0_init_ctx =
|
||||
(struct boot_ctx *)vm0_boot_context;
|
||||
@ -515,6 +518,7 @@ int prepare_vcpu(struct vm *vm, uint16_t pcpu_id)
|
||||
vcpu->arch_vcpu.cpu_mode = CPU_MODE_REAL;
|
||||
#endif
|
||||
}
|
||||
#endif //CONFIG_PARTITION_MODE
|
||||
vm_sw_loader(vm, vcpu);
|
||||
} else {
|
||||
vcpu->arch_vcpu.cpu_mode = CPU_MODE_REAL;
|
||||
|
Loading…
Reference in New Issue
Block a user