X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmx_handler.h;h=20561f8461f0403871b4c77b86ebb291fd814b21;hb=8e9c13c41b0244a8d0029e837a623591a22c5879;hp=1152b5c5a0db939d634a6622f06cd653f3117d40;hpb=cfcceed5890430afedcc544bd7dbb69e29dfd65a;p=palacios.git diff --git a/palacios/include/palacios/vmx_handler.h b/palacios/include/palacios/vmx_handler.h index 1152b5c..20561f8 100644 --- a/palacios/include/palacios/vmx_handler.h +++ b/palacios/include/palacios/vmx_handler.h @@ -24,6 +24,7 @@ #include + /******************************************/ /* VMX Intercept Exit Codes */ /******************************************/ @@ -60,12 +61,12 @@ typedef enum { VMEXIT_IO_INSTR = 30, VMEXIT_RDMSR = 31, VMEXIT_WRMSR = 32, - VMEXIT_ENTRY_FAIL_INVALID_GUEST_STATE = 33, - VMEXIT_ENTRY_FAIL_MSR_LOAD = 34, + VMEXIT_INVALID_GUEST_STATE = 33, + VMEXIT_INVALID_MSR_LOAD = 34, VMEXIT_MWAIT = 36, VMEXIT_MONITOR = 39, VMEXIT_PAUSE = 40, - VMEXIT_ENTRY_FAILURE_MACHINE_CHECK = 41, + VMEXIT_INVALID_MACHINE_CHECK = 41, VMEXIT_TPR_BELOW_THRESHOLD = 43, VMEXIT_APIC = 44, VMEXIT_GDTR_IDTR = 46, @@ -152,7 +153,7 @@ struct VMExitDBGQual { } __attribute__((packed)); -struct VMExitTSQual { + struct VMExitTSQual { uint32_t selector : 16; // selector of destination TSS uint32_t rsvd : 14; // reserved to 0 uint32_t src : 2; // (0: CALL ; 1: IRET ; 2: JMP ; 3: Task gate in IDT) @@ -197,7 +198,45 @@ struct vmx_exit_idt_vec_info { } __attribute__ ((packed)); } __attribute__ ((packed)); -int v3_handle_vmx_exit(struct v3_gprs * gprs, struct guest_info * info, struct v3_ctrl_regs * ctrl_regs); + + +struct vmx_basic_exit_info { + union { + uint32_t value; + struct { + uint16_t reason; + uint16_t rsvd1 :12; + uint8_t mtf_pending : 1; + uint8_t vmx_root_op : 1; + uint8_t rsvd2 : 1; + uint8_t entry_error : 1; + } __attribute__((packed)); + } __attribute__((packed)); +} __attribute__((packed)); + + +struct vmx_exit_info { + uint32_t instr_len; + uint32_t instr_info; + + uint32_t exit_reason; + addr_t exit_qual; + + uint32_t int_info; + uint32_t int_err; + + addr_t guest_linear_addr; + + /* EPT INFO */ + addr_t ept_fault_addr; + +}; + + + + +int v3_handle_atomic_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_info); +int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_info); const char * v3_vmx_exit_code_to_str(vmx_exit_t exit); #endif