mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: make init_vmcs as a event of VCPU
After changing init_vmcs to smp call approach and do it before launch_vcpu, it could work with noop scheduler. On real sharing scheudler, it has problem. pcpu0 pcpu1 pcpu1 vmBvcpu0 vmAvcpu1 vmBvcpu1 vmentry init_vmcs(vmBvcpu1) vmexit->do_init_vmcs corrupt current vmcs vmentry fail launch_vcpu(vmBvcpu1) This patch mark a event flag when request vmcs init for specific vcpu. When it is running and checking pending events, will do init_vmcs firstly. Tracked-On: #4178 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -1192,8 +1192,7 @@ vlapic_process_init_sipi(struct acrn_vcpu* target_vcpu, uint32_t mode, uint32_t
|
||||
target_vcpu->vcpu_id,
|
||||
target_vcpu->vm->vm_id);
|
||||
set_vcpu_startup_entry(target_vcpu, (icr_low & APIC_VECTOR_MASK) << 12U);
|
||||
/* init vmcs after set_vcpu_startup_entry */
|
||||
init_vmcs(target_vcpu);
|
||||
vcpu_make_request(target_vcpu, ACRN_REQUEST_INIT_VMCS);
|
||||
launch_vcpu(target_vcpu);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user