hv:cleanup vcpu state

-- remove VCPU_PAUSED and resume_vcpu
-- remove vcpu->prev_state in vcpu structure
-- rename pause_vcpu to zombie_vcpu

Tracked-On: #4320
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
Mingqiang Chi
2020-05-19 15:59:51 +08:00
committed by wenlingz
parent 8287cfac6c
commit f994b5ffaf
8 changed files with 12 additions and 47 deletions

View File

@@ -35,7 +35,7 @@ void vcpu_thread(struct thread_object *obj)
ret = acrn_handle_pending_request(vcpu);
if (ret < 0) {
pr_fatal("vcpu handling pending request fail");
pause_vcpu(vcpu, VCPU_ZOMBIE);
zombie_vcpu(vcpu, VCPU_ZOMBIE);
/* Fatal error happened (triple fault). Stop the vcpu running. */
continue;
}
@@ -47,7 +47,7 @@ void vcpu_thread(struct thread_object *obj)
ret = run_vcpu(vcpu);
if (ret != 0) {
pr_fatal("vcpu resume failed");
pause_vcpu(vcpu, VCPU_ZOMBIE);
zombie_vcpu(vcpu, VCPU_ZOMBIE);
/* Fatal error happened (resume vcpu failed). Stop the vcpu running. */
continue;
}

View File

@@ -64,7 +64,7 @@ int32_t hcall_sos_offline_cpu(struct acrn_vm *vm, uint64_t lapicid)
ret = -1;
break;
}
pause_vcpu(vcpu, VCPU_ZOMBIE);
zombie_vcpu(vcpu, VCPU_ZOMBIE);
offline_vcpu(vcpu);
}
}