mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +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:
@@ -37,7 +37,7 @@ void vcpu_thread(struct thread_object *obj)
|
||||
pr_fatal("vcpu handling pending request fail");
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
/* Fatal error happened (triple fault). Stop the vcpu running. */
|
||||
schedule();
|
||||
continue;
|
||||
}
|
||||
|
||||
profiling_vmenter_handler(vcpu);
|
||||
@@ -48,7 +48,7 @@ void vcpu_thread(struct thread_object *obj)
|
||||
pr_fatal("vcpu resume failed");
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
/* Fatal error happened (resume vcpu failed). Stop the vcpu running. */
|
||||
schedule();
|
||||
continue;
|
||||
}
|
||||
basic_exit_reason = vcpu->arch.exit_reason & 0xFFFFU;
|
||||
TRACE_2L(TRACE_VM_EXIT, basic_exit_reason, vcpu_get_rip(vcpu));
|
||||
|
Reference in New Issue
Block a user