mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 12:42:54 +00:00
hv: minor cleanup of hv_main.c
- remove vcpu->arch.nrexits which is useless. - record full 32 bits of exit_reason to TRACE_2L(). Make the code simpler. Tracked-On: #6289 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
8de39f7b61
commit
0980420aea
@ -18,7 +18,6 @@
|
|||||||
void vcpu_thread(struct thread_object *obj)
|
void vcpu_thread(struct thread_object *obj)
|
||||||
{
|
{
|
||||||
struct acrn_vcpu *vcpu = container_of(obj, struct acrn_vcpu, thread_obj);
|
struct acrn_vcpu *vcpu = container_of(obj, struct acrn_vcpu, thread_obj);
|
||||||
uint32_t basic_exit_reason = 0U;
|
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -55,10 +54,7 @@ void vcpu_thread(struct thread_object *obj)
|
|||||||
/* Fatal error happened (resume vcpu failed). Stop the vcpu running. */
|
/* Fatal error happened (resume vcpu failed). Stop the vcpu running. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
basic_exit_reason = vcpu->arch.exit_reason & 0xFFFFU;
|
TRACE_2L(TRACE_VM_EXIT, vcpu->arch.exit_reason, vcpu_get_rip(vcpu));
|
||||||
TRACE_2L(TRACE_VM_EXIT, basic_exit_reason, vcpu_get_rip(vcpu));
|
|
||||||
|
|
||||||
vcpu->arch.nrexits++;
|
|
||||||
|
|
||||||
profiling_pre_vmexit_handler(vcpu);
|
profiling_pre_vmexit_handler(vcpu);
|
||||||
|
|
||||||
@ -69,7 +65,7 @@ void vcpu_thread(struct thread_object *obj)
|
|||||||
ret = vmexit_handler(vcpu);
|
ret = vmexit_handler(vcpu);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_fatal("dispatch VM exit handler failed for reason"
|
pr_fatal("dispatch VM exit handler failed for reason"
|
||||||
" %d, ret = %d!", basic_exit_reason, ret);
|
" %d, ret = %d!", vcpu->arch.exit_reason, ret);
|
||||||
vcpu_inject_gp(vcpu, 0U);
|
vcpu_inject_gp(vcpu, 0U);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,6 @@ struct acrn_vcpu_arch {
|
|||||||
bool irq_window_enabled;
|
bool irq_window_enabled;
|
||||||
bool emulating_lock;
|
bool emulating_lock;
|
||||||
bool xsave_enabled;
|
bool xsave_enabled;
|
||||||
uint32_t nrexits;
|
|
||||||
|
|
||||||
/* VCPU context state information */
|
/* VCPU context state information */
|
||||||
uint32_t exit_reason;
|
uint32_t exit_reason;
|
||||||
|
Loading…
Reference in New Issue
Block a user