Skip to content

Commit d6904b4

Browse files
yonghuahjren1
authored andcommitted
hv: rename VM exit handlers in vlapic
to keep aligned with the vmexit reasons' name defined in SPEC. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
1 parent 23c12b7 commit d6904b4

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

hypervisor/arch/x86/guest/vlapic.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ apicv_inject_pir(struct vlapic *vlapic)
23372337
}
23382338
}
23392339

2340-
int apic_access_exit_handler(struct vcpu *vcpu)
2340+
int apic_access_vmexit_handler(struct vcpu *vcpu)
23412341
{
23422342
bool ret;
23432343
int access_type, offset;
@@ -2366,7 +2366,7 @@ int apic_access_exit_handler(struct vcpu *vcpu)
23662366
return 0;
23672367
}
23682368

2369-
int apicv_virtualized_eoi_exit_handler(struct vcpu *vcpu)
2369+
int veoi_vmexit_handler(struct vcpu *vcpu)
23702370
{
23712371
struct vlapic *vlapic = NULL;
23722372

@@ -2395,7 +2395,7 @@ int apicv_virtualized_eoi_exit_handler(struct vcpu *vcpu)
23952395
return 0;
23962396
}
23972397

2398-
int apicv_write_exit_handler(struct vcpu *vcpu)
2398+
int apic_write_vmexit_handler(struct vcpu *vcpu)
23992399
{
24002400
bool retu;
24012401
uint64_t qual;
@@ -2455,8 +2455,8 @@ int apicv_write_exit_handler(struct vcpu *vcpu)
24552455
return handled;
24562456
}
24572457

2458-
int apic_tpr_below_threshold_exit_handler(__unused struct vcpu *vcpu)
2458+
int tpr_below_threshold_vmexit_handler(__unused struct vcpu *vcpu)
24592459
{
2460-
pr_err("Unhandled %s,", __func__);
2460+
pr_err("Unhandled %s.", __func__);
24612461
return 0;
24622462
}

hypervisor/arch/x86/vmexit.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ static const struct vm_exit_dispatch dispatch_table[] = {
123123
[VMX_EXIT_REASON_ENTRY_FAILURE_MACHINE_CHECK] = {
124124
.handler = unhandled_vmexit_handler},
125125
[VMX_EXIT_REASON_TPR_BELOW_THRESHOLD] = {
126-
.handler = apic_tpr_below_threshold_exit_handler},
126+
.handler = tpr_below_threshold_vmexit_handler},
127127
[VMX_EXIT_REASON_APIC_ACCESS] = {
128-
.handler = apic_access_exit_handler,
128+
.handler = apic_access_vmexit_handler,
129129
.need_exit_qualification = 1},
130130
[VMX_EXIT_REASON_VIRTUALIZED_EOI] = {
131-
.handler = apicv_virtualized_eoi_exit_handler,
131+
.handler = veoi_vmexit_handler,
132132
.need_exit_qualification = 1},
133133
[VMX_EXIT_REASON_GDTR_IDTR_ACCESS] = {
134134
.handler = unhandled_vmexit_handler},
@@ -153,7 +153,7 @@ static const struct vm_exit_dispatch dispatch_table[] = {
153153
[VMX_EXIT_REASON_XSETBV] = {
154154
.handler = unhandled_vmexit_handler},
155155
[VMX_EXIT_REASON_APIC_WRITE] = {
156-
.handler = apicv_write_exit_handler,
156+
.handler = apic_write_vmexit_handler,
157157
.need_exit_qualification = 1}
158158
};
159159

hypervisor/include/arch/x86/guest/vlapic.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ uint64_t apicv_get_apic_access_addr(struct vm *vm);
125125
uint64_t apicv_get_apic_page_addr(struct vlapic *vlapic);
126126
bool vlapic_apicv_enabled(struct vcpu *vcpu);
127127
void apicv_inject_pir(struct vlapic *vlapic);
128-
int apic_access_exit_handler(struct vcpu *vcpu);
129-
int apicv_write_exit_handler(struct vcpu *vcpu);
130-
int apicv_virtualized_eoi_exit_handler(struct vcpu *vcpu);
131-
int apic_tpr_below_threshold_exit_handler(struct vcpu *vcpu);
128+
int apic_access_vmexit_handler(struct vcpu *vcpu);
129+
int apic_write_vmexit_handler(struct vcpu *vcpu);
130+
int veoi_vmexit_handler(struct vcpu *vcpu);
131+
int tpr_below_threshold_vmexit_handler(struct vcpu *vcpu);
132132

133133
void calcvdest(struct vm *vm, uint64_t *dmask, uint32_t dest, bool phys);
134134
#endif /* _VLAPIC_H_ */

0 commit comments

Comments
 (0)