- Timestamp:
- Jan 9, 2019 2:39:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r76738 r76741 745 745 uint8_t const uType = VMX_VMCS_ENC_TYPE_HOST_STATE; 746 746 uint8_t const uWidthType = (uWidth << 2) | uType; 747 uint8_t const uIndex = (iSegReg << 1) + RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX);747 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS16_HOST_ES_SEL, VMX_BF_VMCS_ENC_INDEX); 748 748 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 749 749 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 772 772 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 773 773 uint8_t const uWidthType = (uWidth << 2) | uType; 774 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX);774 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX); 775 775 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 776 776 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 785 785 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 786 786 uint8_t const uWidthType = (uWidth << 2) | uType; 787 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS32_GUEST_ES_LIMIT, VMX_BF_VMCS_ENC_INDEX);787 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS32_GUEST_ES_LIMIT, VMX_BF_VMCS_ENC_INDEX); 788 788 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 789 789 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 798 798 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 799 799 uint8_t const uWidthType = (uWidth << 2) | uType; 800 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS_GUEST_ES_BASE, VMX_BF_VMCS_ENC_INDEX);800 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS_GUEST_ES_BASE, VMX_BF_VMCS_ENC_INDEX); 801 801 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 802 802 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 814 814 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 815 815 uint8_t const uWidthType = (uWidth << 2) | uType; 816 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS, VMX_BF_VMCS_ENC_INDEX);816 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS, VMX_BF_VMCS_ENC_INDEX); 817 817 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 818 818 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 847 847 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 848 848 uint8_t const uWidthType = (uWidth << 2) | uType; 849 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX);849 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS16_GUEST_ES_SEL, VMX_BF_VMCS_ENC_INDEX); 850 850 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_3); 851 851 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 861 861 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 862 862 uint8_t const uWidthType = (uWidth << 2) | uType; 863 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS32_GUEST_ES_LIMIT, VMX_BF_VMCS_ENC_INDEX);863 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS32_GUEST_ES_LIMIT, VMX_BF_VMCS_ENC_INDEX); 864 864 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_3); 865 865 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 875 875 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 876 876 uint8_t const uWidthType = (uWidth << 2) | uType; 877 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS_GUEST_ES_BASE, VMX_BF_VMCS_ENC_INDEX);877 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS_GUEST_ES_BASE, VMX_BF_VMCS_ENC_INDEX); 878 878 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_3); 879 879 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 890 890 uint8_t const uType = VMX_VMCS_ENC_TYPE_GUEST_STATE; 891 891 uint8_t const uWidthType = (uWidth << 2) | uType; 892 uint8_t const uIndex = (iSegReg << 1)+ RT_BF_GET(VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS, VMX_BF_VMCS_ENC_INDEX);892 uint8_t const uIndex = iSegReg + RT_BF_GET(VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS, VMX_BF_VMCS_ENC_INDEX); 893 893 AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_3); 894 894 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; … … 922 922 uint8_t const uType = VMX_VMCS_ENC_TYPE_CONTROL; 923 923 uint8_t const uWidthType = (uWidth << 2) | uType; 924 uint8_t const uIndex = (idxCr3Target << 1)+ RT_BF_GET(VMX_VMCS_CTRL_CR3_TARGET_VAL0, VMX_BF_VMCS_ENC_INDEX);924 uint8_t const uIndex = idxCr3Target + RT_BF_GET(VMX_VMCS_CTRL_CR3_TARGET_VAL0, VMX_BF_VMCS_ENC_INDEX); 925 925 Assert(uIndex <= VMX_V_VMCS_MAX_INDEX); 926 926 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex];
Note:
See TracChangeset
for help on using the changeset viewer.