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>
This commit is contained in:
Mingqiang Chi 2018-05-21 10:48:56 +08:00 committed by lijinxia
parent ba3192ab77
commit 2175bcafa1
3 changed files with 14 additions and 14 deletions

View File

@ -305,7 +305,7 @@ int acrn_do_intr_process(struct vcpu *vcpu)
/* handling cancelled event injection when vcpu is switched out */
if (vcpu->arch_vcpu.inject_event_pending) {
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC,
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE,
vcpu->arch_vcpu.inject_info.error_code);
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
@ -331,7 +331,7 @@ int acrn_do_intr_process(struct vcpu *vcpu)
if (vector >= 0) {
if (exception_type[vector] &
EXCEPTION_ERROR_CODE_VALID) {
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC,
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE,
vcpu->arch_vcpu.exception_info.error);
}
@ -419,7 +419,7 @@ void cancel_event_injection(struct vcpu *vcpu)
if (intinfo & (EXCEPTION_ERROR_CODE_VALID << 8))
vcpu->arch_vcpu.inject_info.error_code =
exec_vmread(VMX_ENTRY_EXCEPTION_EC);
exec_vmread(VMX_ENTRY_EXCEPTION_ERROR_CODE);
vcpu->arch_vcpu.inject_info.intr_info = intinfo;
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD, 0);
@ -452,7 +452,7 @@ int exception_vmexit_handler(struct vcpu *vcpu)
* error code to be conveyed to get via the stack
*/
if (intinfo & VMX_INT_INFO_ERR_CODE_VALID) {
int_err_code = exec_vmread(VMX_EXIT_INT_EC);
int_err_code = exec_vmread(VMX_EXIT_INT_ERROR_CODE);
/* get current privilege level and fault address */
cpl = exec_vmread(VMX_GUEST_CS_ATTR);

View File

@ -981,15 +981,15 @@ static void init_exec_ctrl(struct vcpu *vcpu)
/* Set up page fault error code mask - second paragraph * pg 2902
* 24.6.3 - guest page fault exception causing * vmexit is governed by
* both VMX_EXCEPTION_BITMAP and * VMX_PF_EC_MASK
* both VMX_EXCEPTION_BITMAP and * VMX_PF_ERROR_CODE_MASK
*/
exec_vmwrite(VMX_PF_EC_MASK, 0);
exec_vmwrite(VMX_PF_ERROR_CODE_MASK, 0);
/* Set up page fault error code match - second paragraph * pg 2902
* 24.6.3 - guest page fault exception causing * vmexit is governed by
* both VMX_EXCEPTION_BITMAP and * VMX_PF_EC_MATCH
* both VMX_EXCEPTION_BITMAP and * VMX_PF_ERROR_CODE_MATCH
*/
exec_vmwrite(VMX_PF_EC_MATCH, 0);
exec_vmwrite(VMX_PF_ERROR_CODE_MATCH, 0);
/* Set up CR3 target count - An execution of mov to CR3 * by guest
* 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)
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD, 0);
/* Set up VM entry exception error code - pg 2910 24.8.3 */
exec_vmwrite(VMX_ENTRY_EXCEPTION_EC, 0);
exec_vmwrite(VMX_ENTRY_EXCEPTION_ERROR_CODE, 0);
/* Set up VM entry instruction length - pg 2910 24.8.3 */
exec_vmwrite(VMX_ENTRY_INSTR_LENGTH, 0);

View File

@ -118,8 +118,8 @@
#define VMX_PIN_VM_EXEC_CONTROLS 0x00004000
#define VMX_PROC_VM_EXEC_CONTROLS 0x00004002
#define VMX_EXCEPTION_BITMAP 0x00004004
#define VMX_PF_EC_MASK 0x00004006
#define VMX_PF_EC_MATCH 0x00004008
#define VMX_PF_ERROR_CODE_MASK 0x00004006
#define VMX_PF_ERROR_CODE_MATCH 0x00004008
#define VMX_CR3_TARGET_COUNT 0x0000400a
#define VMX_EXIT_CONTROLS 0x0000400c
#define VMX_EXIT_MSR_STORE_COUNT 0x0000400e
@ -127,7 +127,7 @@
#define VMX_ENTRY_CONTROLS 0x00004012
#define VMX_ENTRY_MSR_LOAD_COUNT 0x00004014
#define VMX_ENTRY_INT_INFO_FIELD 0x00004016
#define VMX_ENTRY_EXCEPTION_EC 0x00004018
#define VMX_ENTRY_EXCEPTION_ERROR_CODE 0x00004018
#define VMX_ENTRY_INSTR_LENGTH 0x0000401a
#define VMX_TPR_THRESHOLD 0x0000401c
#define VMX_PROC_VM_EXEC_CONTROLS2 0x0000401E
@ -137,9 +137,9 @@
#define VMX_INSTR_ERROR 0x00004400
#define VMX_EXIT_REASON 0x00004402
#define VMX_EXIT_INT_INFO 0x00004404
#define VMX_EXIT_INT_EC 0x00004406
#define VMX_EXIT_INT_ERROR_CODE 0x00004406
#define VMX_IDT_VEC_INFO_FIELD 0x00004408
#define VMX_IDT_VEC_EC 0x0000440a
#define VMX_IDT_VEC_ERROR_CODE 0x0000440a
#define VMX_EXIT_INSTR_LEN 0x0000440c
#define VMX_INSTR_INFO 0x0000440e
/* 32-bit guest-state fields */