mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
hv_main: Remove the continue in vcpu_thread
To avoid acrn_handle_pending_request called twice within one vmexit, we remove the error-prone "continue" in vcpu_thread. And make vcpu shecheduled out if fatal error happens with vcpu. Tracked-On: #3387 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
f0e1c5e55f
commit
12955fa80f
@ -34,7 +34,6 @@ void vcpu_thread(struct sched_object *obj)
|
||||
/* Don't open interrupt window between here and vmentry */
|
||||
if (need_reschedule(vcpu->pcpu_id)) {
|
||||
schedule();
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check and process pending requests(including interrupt) */
|
||||
@ -42,7 +41,8 @@ void vcpu_thread(struct sched_object *obj)
|
||||
if (ret < 0) {
|
||||
pr_fatal("vcpu handling pending request fail");
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
continue;
|
||||
/* Fatal error happened (triple fault). Stop the vcpu running. */
|
||||
schedule();
|
||||
}
|
||||
|
||||
profiling_vmenter_handler(vcpu);
|
||||
@ -52,7 +52,8 @@ void vcpu_thread(struct sched_object *obj)
|
||||
if (ret != 0) {
|
||||
pr_fatal("vcpu resume failed");
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
continue;
|
||||
/* Fatal error happened (resume vcpu failed). Stop the vcpu running. */
|
||||
schedule();
|
||||
}
|
||||
basic_exit_reason = vcpu->arch.exit_reason & 0xFFFFU;
|
||||
TRACE_2L(TRACE_VM_EXIT, basic_exit_reason, vcpu_get_rip(vcpu));
|
||||
|
Loading…
Reference in New Issue
Block a user