check validity of 'VM-exit Int-Info' before extracting vector

1. exception vector and other information
   can be extracted from 'VM-Exit Interrupt-Information'
   field of VMCS only if bit31 (Valid) is set.
   -Intel SDM 24.9.2, Vol3

2.  Rename 'exit-interrupt_info' to 'idt_vectoring_info'
    in 'struct vcpu_arch', which is consistent with
    SDM 24.9.3, Vol3

3. 'IDT-vectoring information' in VMCS is 32bit
    -Intel SDM 24.9.3, Vol3

    Update the type of 'idt_vectoring_info' in
    'struct vcpu_arch'from 'uint32_t' to 'uint64_t'.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang
2018-04-17 21:11:54 +08:00
committed by Jack Ren
parent fdfb71e075
commit 3c119e124a
4 changed files with 23 additions and 22 deletions

View File

@@ -215,7 +215,7 @@ struct vcpu_arch {
/* VCPU context state information */
uint32_t exit_reason;
uint64_t exit_interrupt_info;
uint32_t idt_vectoring_info;
uint64_t exit_qualification;
uint32_t inst_len;

View File

@@ -376,6 +376,7 @@
/* VMX entry/exit Interrupt info */
#define VMX_INT_INFO_ERR_CODE_VALID (1<<11)
#define VMX_INT_INFO_VALID (1<<31)
#define VMX_INT_TYPE_MASK (0x700)
#define VMX_INT_TYPE_EXT_INT 0
#define VMX_INT_TYPE_NMI 2
#define VMX_INT_TYPE_HW_EXP 3