Skip to content

Commit 2175bca

Browse files
mingqiangchilijinxia
authored andcommitted
hv: replace _EC with _ERROR_CODE in VMCS field
EC is not clear, replace it with ERROR_CODE. Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
1 parent ba3192a commit 2175bca

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

hypervisor/arch/x86/interrupt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ int acrn_do_intr_process(struct vcpu *vcpu)
305305

306306
/* handling cancelled event injection when vcpu is switched out */
307307
if (vcpu->arch_vcpu.inject_event_pending) {
308-
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC,
308+
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE,
309309
vcpu->arch_vcpu.inject_info.error_code);
310310

311311
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
@@ -331,7 +331,7 @@ int acrn_do_intr_process(struct vcpu *vcpu)
331331
if (vector >= 0) {
332332
if (exception_type[vector] &
333333
EXCEPTION_ERROR_CODE_VALID) {
334-
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC,
334+
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE,
335335
vcpu->arch_vcpu.exception_info.error);
336336
}
337337

@@ -419,7 +419,7 @@ void cancel_event_injection(struct vcpu *vcpu)
419419

420420
if (intinfo & (EXCEPTION_ERROR_CODE_VALID << 8))
421421
vcpu->arch_vcpu.inject_info.error_code =
422-
exec_vmread(VMX_ENTRY_EXCEPTION_EC);
422+
exec_vmread(VMX_ENTRY_EXCEPTION_ERROR_CODE);
423423

424424
vcpu->arch_vcpu.inject_info.intr_info = intinfo;
425425
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD, 0);
@@ -452,7 +452,7 @@ int exception_vmexit_handler(struct vcpu *vcpu)
452452
* error code to be conveyed to get via the stack
453453
*/
454454
if (intinfo & VMX_INT_INFO_ERR_CODE_VALID) {
455-
int_err_code = exec_vmread(VMX_EXIT_INT_EC);
455+
int_err_code = exec_vmread(VMX_EXIT_INT_ERROR_CODE);
456456

457457
/* get current privilege level and fault address */
458458
cpl = exec_vmread(VMX_GUEST_CS_ATTR);

hypervisor/arch/x86/vmx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -981,15 +981,15 @@ static void init_exec_ctrl(struct vcpu *vcpu)
981981

982982
/* Set up page fault error code mask - second paragraph * pg 2902
983983
* 24.6.3 - guest page fault exception causing * vmexit is governed by
984-
* both VMX_EXCEPTION_BITMAP and * VMX_PF_EC_MASK
984+
* both VMX_EXCEPTION_BITMAP and * VMX_PF_ERROR_CODE_MASK
985985
*/
986-
exec_vmwrite(VMX_PF_EC_MASK, 0);
986+
exec_vmwrite(VMX_PF_ERROR_CODE_MASK, 0);
987987

988988
/* Set up page fault error code match - second paragraph * pg 2902
989989
* 24.6.3 - guest page fault exception causing * vmexit is governed by
990-
* both VMX_EXCEPTION_BITMAP and * VMX_PF_EC_MATCH
990+
* both VMX_EXCEPTION_BITMAP and * VMX_PF_ERROR_CODE_MATCH
991991
*/
992-
exec_vmwrite(VMX_PF_EC_MATCH, 0);
992+
exec_vmwrite(VMX_PF_ERROR_CODE_MATCH, 0);
993993

994994
/* Set up CR3 target count - An execution of mov to CR3 * by guest
995995
* causes HW to evaluate operand match with * one of N CR3-Target Value
@@ -1148,7 +1148,7 @@ static void init_entry_ctrl(__unused struct vcpu *vcpu)
11481148
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD, 0);
11491149

11501150
/* Set up VM entry exception error code - pg 2910 24.8.3 */
1151-
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC, 0);
1151+
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE, 0);
11521152

11531153
/* Set up VM entry instruction length - pg 2910 24.8.3 */
11541154
exec_vmwrite(VMX_ENTRY_INSTR_LENGTH, 0);

hypervisor/include/arch/x86/vmx.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@
118118
#define VMX_PIN_VM_EXEC_CONTROLS 0x00004000
119119
#define VMX_PROC_VM_EXEC_CONTROLS 0x00004002
120120
#define VMX_EXCEPTION_BITMAP 0x00004004
121-
#define VMX_PF_EC_MASK 0x00004006
122-
#define VMX_PF_EC_MATCH 0x00004008
121+
#define VMX_PF_ERROR_CODE_MASK 0x00004006
122+
#define VMX_PF_ERROR_CODE_MATCH 0x00004008
123123
#define VMX_CR3_TARGET_COUNT 0x0000400a
124124
#define VMX_EXIT_CONTROLS 0x0000400c
125125
#define VMX_EXIT_MSR_STORE_COUNT 0x0000400e
126126
#define VMX_EXIT_MSR_LOAD_COUNT 0x00004010
127127
#define VMX_ENTRY_CONTROLS 0x00004012
128128
#define VMX_ENTRY_MSR_LOAD_COUNT 0x00004014
129129
#define VMX_ENTRY_INT_INFO_FIELD 0x00004016
130-
#define VMX_ENTRY_EXCEPTION_EC 0x00004018
130+
#define VMX_ENTRY_EXCEPTION_ERROR_CODE 0x00004018
131131
#define VMX_ENTRY_INSTR_LENGTH 0x0000401a
132132
#define VMX_TPR_THRESHOLD 0x0000401c
133133
#define VMX_PROC_VM_EXEC_CONTROLS2 0x0000401E
@@ -137,9 +137,9 @@
137137
#define VMX_INSTR_ERROR 0x00004400
138138
#define VMX_EXIT_REASON 0x00004402
139139
#define VMX_EXIT_INT_INFO 0x00004404
140-
#define VMX_EXIT_INT_EC 0x00004406
140+
#define VMX_EXIT_INT_ERROR_CODE 0x00004406
141141
#define VMX_IDT_VEC_INFO_FIELD 0x00004408
142-
#define VMX_IDT_VEC_EC 0x0000440a
142+
#define VMX_IDT_VEC_ERROR_CODE 0x0000440a
143143
#define VMX_EXIT_INSTR_LEN 0x0000440c
144144
#define VMX_INSTR_INFO 0x0000440e
145145
/* 32-bit guest-state fields */

0 commit comments

Comments
 (0)