Changeset 97019 in vbox
- Timestamp:
- Oct 5, 2022 10:12:03 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r97018 r97019 3942 3942 /** Pointer to a const VMXVEXITEVENTINFO struct. */ 3943 3943 typedef const VMXVEXITEVENTINFO *PCVMXVEXITEVENTINFO; 3944 3945 /** Initialize a VMXVEXITEVENTINFO. */ 3946 #define VMXVEXITEVENTINFO_INIT(a_uExitIntInfo, a_uExitIntErrCode, a_uIdtVectoringInfo, a_uIdtVectoringErrCode) \ 3947 { (a_uExitIntInfo), (a_uExitIntErrCode), (a_uIdtVectoringInfo), (a_uIdtVectoringErrCode) } 3948 3949 /** Initialize a VMXVEXITEVENTINFO with VM-exit interruption info and VM-exit 3950 * interruption error code. */ 3951 #define VMXVEXITEVENTINFO_INIT_ONLY_INT(a_uExitIntInfo, a_uExitIntErrCode) \ 3952 VMXVEXITEVENTINFO_INIT(a_uExitIntInfo, a_uExitIntErrCode, 0, 0) 3953 3954 /** Initialize a VMXVEXITEVENTINFO with IDT vectoring info and IDT 3955 * vectoring error code. */ 3956 #define VMXVEXITEVENTINFO_INIT_ONLY_IDT(a_uIdtVectoringInfo, a_uIdtVectoringErrCode) \ 3957 VMXVEXITEVENTINFO_INIT(0, 0, a_uIdtVectoringInfo, a_uIdtVectoringErrCode) 3944 3958 3945 3959 /** -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp
r97018 r97019 3715 3715 VMM_INT_DECL(VBOXSTRICTRC) IEMExecVmxVmexitXcptNmi(PVMCPUCC pVCpu) 3716 3716 { 3717 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_ONLY_REASON(VMX_EXIT_XCPT_OR_NMI); 3718 3719 VMXVEXITEVENTINFO ExitEventInfo; 3720 RT_ZERO(ExitEventInfo); 3721 ExitEventInfo.uExitIntInfo = RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_VALID, 1) 3722 | RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_TYPE, VMX_EXIT_INT_INFO_TYPE_NMI) 3723 | RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_VECTOR, X86_XCPT_NMI); 3724 3717 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_ONLY_REASON(VMX_EXIT_XCPT_OR_NMI); 3718 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_INT( RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_VALID, 1) 3719 | RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_TYPE, 3720 VMX_EXIT_INT_INFO_TYPE_NMI) 3721 | RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_VECTOR, 3722 X86_XCPT_NMI), 3723 0); 3725 3724 VBOXSTRICTRC rcStrict = iemVmxVmexitEventWithInfo(pVCpu, &ExitInfo, &ExitEventInfo); 3726 3725 Assert(!pVCpu->iem.s.cActiveMappings); … … 9945 9944 if (HmExitAux.Vmx.uReason == VMX_EXIT_EPT_MISCONFIG) 9946 9945 { 9946 LogFlowFunc(("Raising APIC-access VM-exit as phys access from #PF handler at offset %#x\n", offAccess)); 9947 9947 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER(VMX_EXIT_APIC_ACCESS, 9948 9948 RT_BF_MAKE(VMX_BF_EXIT_QUAL_APIC_ACCESS_OFFSET, … … 9950 9950 | RT_BF_MAKE(VMX_BF_EXIT_QUAL_APIC_ACCESS_TYPE, 9951 9951 VMXAPICACCESS_PHYSICAL_INSTR)); 9952 9953 VMXVEXITEVENTINFO ExitEventInfo; 9954 RT_ZERO(ExitEventInfo); 9955 ExitEventInfo.uIdtVectoringInfo = HmExitAux.Vmx.uIdtVectoringInfo; 9956 ExitEventInfo.uIdtVectoringErrCode = HmExitAux.Vmx.uIdtVectoringErrCode; 9957 9958 LogFlowFunc(("Raising APIC-access VM-exit as phys access from #PF handler at offset %#x\n", offAccess)); 9959 VBOXSTRICTRC rcStrict = iemVmxVmexitApicAccessWithInfo(pVCpu, &ExitInfo, &ExitEventInfo); 9952 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(HmExitAux.Vmx.uIdtVectoringInfo, 9953 HmExitAux.Vmx.uIdtVectoringErrCode); 9954 VBOXSTRICTRC const rcStrict = iemVmxVmexitApicAccessWithInfo(pVCpu, &ExitInfo, &ExitEventInfo); 9960 9955 return iemExecStatusCodeFiddling(pVCpu, rcStrict); 9961 9956 } … … 10004 9999 } 10005 10000 10001 /* 10002 * Raise the APIC-access VM-exit. 10003 */ 10004 LogFlowFunc(("Raising APIC-access VM-exit from #PF handler at offset %#x\n", offAccess)); 10006 10005 VMXVEXITINFO const ExitInfo 10007 10006 = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN(VMX_EXIT_APIC_ACCESS, … … 10009 10008 | RT_BF_MAKE(VMX_BF_EXIT_QUAL_APIC_ACCESS_TYPE, enmAccess), 10010 10009 HmExitAux.Vmx.cbInstr); 10011 10012 VMXVEXITEVENTINFO ExitEventInfo; 10013 RT_ZERO(ExitEventInfo); 10014 ExitEventInfo.uIdtVectoringInfo = HmExitAux.Vmx.uIdtVectoringInfo; 10015 ExitEventInfo.uIdtVectoringErrCode = HmExitAux.Vmx.uIdtVectoringErrCode; 10016 10017 /* 10018 * Raise the APIC-access VM-exit. 10019 */ 10020 LogFlowFunc(("Raising APIC-access VM-exit from #PF handler at offset %#x\n", offAccess)); 10021 VBOXSTRICTRC rcStrict = iemVmxVmexitApicAccessWithInfo(pVCpu, &ExitInfo, &ExitEventInfo); 10010 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(HmExitAux.Vmx.uIdtVectoringInfo, 10011 HmExitAux.Vmx.uIdtVectoringErrCode); 10012 VBOXSTRICTRC const rcStrict = iemVmxVmexitApicAccessWithInfo(pVCpu, &ExitInfo, &ExitEventInfo); 10022 10013 return iemExecStatusCodeFiddling(pVCpu, rcStrict); 10023 10014 } -
trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h
r97005 r97019 9412 9412 * software exception causes a VM-exit, that too provides the VM-exit instruction length. 9413 9413 */ 9414 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9415 9416 VMXVEXITEVENTINFO ExitEventInfo; 9417 RT_ZERO(ExitEventInfo); 9418 ExitEventInfo.uExitIntInfo = pVmxTransient->uExitIntInfo; 9419 ExitEventInfo.uExitIntErrCode = pVmxTransient->uExitIntErrorCode; 9420 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 9421 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 9422 9414 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9415 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT(pVmxTransient->uExitIntInfo, 9416 pVmxTransient->uExitIntErrorCode, 9417 pVmxTransient->uIdtVectoringInfo, 9418 pVmxTransient->uIdtVectoringErrorCode); 9423 9419 #ifdef DEBUG_ramshankar 9424 9420 vmxHCImportGuestState(pVCpu, pVmxTransient->pVmcsInfo, HMVMX_CPUMCTX_EXTRN_ALL); 9425 Log4Func(("exit_int_info=%#RX32 err_code=%#RX32 exit_qual=%#RX64\n", pVmxTransient->uExitIntInfo,9426 pVmxTransient->uExitInt ErrorCode, pVmxTransient->uExitQual));9421 Log4Func(("exit_int_info=%#RX32 err_code=%#RX32 exit_qual=%#RX64\n", 9422 pVmxTransient->uExitIntInfo, pVmxTransient->uExitIntErrorCode, pVmxTransient->uExitQual)); 9427 9423 if (VMX_IDT_VECTORING_INFO_IS_VALID(pVmxTransient->uIdtVectoringInfo)) 9428 { 9429 Log4Func(("idt_info=%#RX32 idt_errcode=%#RX32 cr2=%#RX64\n", pVmxTransient->uIdtVectoringInfo, 9430 pVmxTransient->uIdtVectoringErrorCode, pCtx->cr2)); 9431 } 9424 Log4Func(("idt_info=%#RX32 idt_errcode=%#RX32 cr2=%#RX64\n", 9425 pVmxTransient->uIdtVectoringInfo, pVmxTransient->uIdtVectoringErrorCode, pCtx->cr2)); 9432 9426 #endif 9433 9427 return IEMExecVmxVmexitXcpt(pVCpu, &ExitInfo, &ExitEventInfo); … … 9510 9504 vmxHCReadIdtVectoringErrorCodeVmcs(pVCpu, pVmxTransient); 9511 9505 9512 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9513 9514 VMXVEXITEVENTINFO ExitEventInfo; 9515 RT_ZERO(ExitEventInfo); 9516 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 9517 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 9506 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9507 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(pVmxTransient->uIdtVectoringInfo, 9508 pVmxTransient->uIdtVectoringErrorCode); 9518 9509 return IEMExecVmxVmexitTaskSwitch(pVCpu, &ExitInfo, &ExitEventInfo); 9519 9510 } … … 9992 9983 VMX_EXIT_QUAL_APIC_ACCESS_TYPE(pVmxTransient->uExitQual))); 9993 9984 9994 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9995 9996 VMXVEXITEVENTINFO ExitEventInfo; 9997 RT_ZERO(ExitEventInfo); 9998 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 9999 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 9985 VMXVEXITINFO const ExitInfo = VMXVEXITINFO_INIT_WITH_QUALIFIER_AND_INSTR_LEN_FROM_TRANSIENT(pVmxTransient); 9986 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(pVmxTransient->uIdtVectoringInfo, 9987 pVmxTransient->uIdtVectoringErrorCode); 10000 9988 return IEMExecVmxVmexitApicAccess(pVCpu, &ExitInfo, &ExitEventInfo); 10001 9989 } … … 10294 10282 # endif 10295 10283 10296 VMXVEXITEVENTINFO ExitEventInfo; 10297 RT_ZERO(ExitEventInfo); 10298 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 10299 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 10300 10284 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(pVmxTransient->uIdtVectoringInfo, 10285 pVmxTransient->uIdtVectoringErrorCode); 10301 10286 if (Walk.fFailed & PGM_WALKFAIL_EPT_VIOLATION) 10302 10287 { … … 10351 10336 vmxHCReadIdtVectoringErrorCodeVmcs(pVCpu, pVmxTransient); 10352 10337 10353 VMXVEXITEVENTINFO ExitEventInfo; 10354 RT_ZERO(ExitEventInfo); 10355 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 10356 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 10357 10338 VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(pVmxTransient->uIdtVectoringInfo, 10339 pVmxTransient->uIdtVectoringErrorCode); 10358 10340 return IEMExecVmxVmexitEptMisconfig(pVCpu, pVmxTransient->uGuestPhysicalAddr, &ExitEventInfo); 10359 10341 }
Note:
See TracChangeset
for help on using the changeset viewer.