Changeset 76632 in vbox
- Timestamp:
- Jan 4, 2019 11:59:19 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r76631 r76632 7507 7507 */ 7508 7508 uint8_t *pbVmcs; 7509 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 7509 if (!IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 7510 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 7511 else 7510 7512 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pShadowVmcs); 7511 else7512 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs);7513 7513 Assert(pbVmcs); 7514 7514 7515 7515 VMXVMCSFIELDENC FieldEnc; 7516 FieldEnc.u = RT_LO_U32(u64FieldEnc);7517 uint8_t const uWidth = FieldEnc.n.u2Width;7518 uint8_t const uType = FieldEnc.n.u2Type;7516 FieldEnc.u = u64FieldEnc; 7517 uint8_t const uWidth = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_WIDTH); 7518 uint8_t const uType = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_TYPE); 7519 7519 uint8_t const uWidthType = (uWidth << 2) | uType; 7520 uint8_t const uIndex = FieldEnc.n.u8Index;7520 uint8_t const uIndex = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_INDEX); 7521 7521 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2); 7522 7522 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; 7523 Assert(offField < VMX_V_VMCS_SIZE); 7523 7524 7524 7525 /* … … 7765 7766 */ 7766 7767 uint8_t *pbVmcs; 7767 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 7768 if (!IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 7769 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 7770 else 7768 7771 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pShadowVmcs); 7769 else7770 pbVmcs = (uint8_t *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs);7771 7772 Assert(pbVmcs); 7772 7773 7773 7774 VMXVMCSFIELDENC FieldEnc; 7774 FieldEnc.u = RT_LO_U32(u64FieldEnc);7775 uint8_t const uWidth = FieldEnc.n.u2Width;7776 uint8_t const uType = FieldEnc.n.u2Type;7775 FieldEnc.u = u64FieldEnc; 7776 uint8_t const uWidth = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_WIDTH); 7777 uint8_t const uType = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_TYPE); 7777 7778 uint8_t const uWidthType = (uWidth << 2) | uType; 7778 uint8_t const uIndex = FieldEnc.n.u8Index;7779 uint8_t const uIndex = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_INDEX); 7779 7780 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2); 7780 7781 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; 7782 Assert(offField < VMX_V_VMCS_SIZE); 7781 7783 7782 7784 /* … … 8074 8076 if (VmcsRevId.n.u31RevisionId != VMX_V_VMCS_REVISION_ID) 8075 8077 { 8076 Log(("vmptrld: VMCS revision mismatch, expected %#RX32 got %#RX32 -> VMFail()\n", VMX_V_VMCS_REVISION_ID,8077 V mcsRevId.n.u31RevisionId));8078 Log(("vmptrld: VMCS revision mismatch, expected %#RX32 got %#RX32. GCPhysVmcs=%#RX64 -> VMFail()\n", 8079 VMX_V_VMCS_REVISION_ID, VmcsRevId.n.u31RevisionId, GCPhysVmcs)); 8078 8080 pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmptrld_VmcsRevId; 8079 8081 iemVmxVmFail(pVCpu, VMXINSTRERR_VMPTRLD_INCORRECT_VMCS_REV);
Note:
See TracChangeset
for help on using the changeset viewer.