Index: /trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h	(revision 79077)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h	(revision 79078)
@@ -190,5 +190,5 @@
  *
  * The first array dimension is VMCS field encoding of Width OR'ed with Type and the
- * second dimension is the Index, see VMXVMCSFIELDENC.
+ * second dimension is the Index, see VMXVMCSFIELD.
  */
 uint16_t const g_aoffVmcsMap[16][VMX_V_VMCS_MAX_INDEX + 1] =
@@ -445,12 +445,12 @@
  *
  * @param   pVCpu           The cross context virtual CPU structure.
- * @param   u64FieldEnc     The VMCS field encoding.
+ * @param   u64VmcsField    The VMCS field.
  *
  * @remarks This takes into account the CPU features exposed to the guest.
  */
-IEM_STATIC bool iemVmxIsVmcsFieldValid(PCVMCPU pVCpu, uint64_t u64FieldEnc)
-{
-    uint32_t const uFieldEncHi = RT_HI_U32(u64FieldEnc);
-    uint32_t const uFieldEncLo = RT_LO_U32(u64FieldEnc);
+IEM_STATIC bool iemVmxIsVmcsFieldValid(PCVMCPU pVCpu, uint64_t u64VmcsField)
+{
+    uint32_t const uFieldEncHi = RT_HI_U32(u64VmcsField);
+    uint32_t const uFieldEncLo = RT_LO_U32(u64VmcsField);
     if (!uFieldEncHi)
     { /* likely */ }
@@ -7783,14 +7783,14 @@
  * @param   pu64Dst         Where to write the VMCS value (only updated when
  *                          VINF_SUCCESS is returned).
- * @param   u64FieldEnc     The VMCS field encoding.
+ * @param   u64VmcsField    The VMCS field.
  * @param   pExitInfo       Pointer to the VM-exit information. Optional, can be
  *                          NULL.
  */
-IEM_STATIC VBOXSTRICTRC iemVmxVmreadCommon(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64FieldEnc,
+IEM_STATIC VBOXSTRICTRC iemVmxVmreadCommon(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64VmcsField,
                                            PCVMXVEXITINFO pExitInfo)
 {
     /* Nested-guest intercept. */
     if (   IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
-        && CPUMIsGuestVmxVmreadVmwriteInterceptSet(pVCpu, VMX_EXIT_VMREAD, u64FieldEnc))
+        && CPUMIsGuestVmxVmreadVmwriteInterceptSet(pVCpu, VMX_EXIT_VMREAD, u64VmcsField))
     {
         if (pExitInfo)
@@ -7836,9 +7836,9 @@
 
     /* Supported VMCS field. */
-    if (iemVmxIsVmcsFieldValid(pVCpu, u64FieldEnc))
+    if (iemVmxIsVmcsFieldValid(pVCpu, u64VmcsField))
     { /* likely */ }
     else
     {
-        Log(("vmread: VMCS field %#RX64 invalid -> VMFail\n", u64FieldEnc));
+        Log(("vmread: VMCS field %#RX64 invalid -> VMFail\n", u64VmcsField));
         pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmread_FieldInvalid;
         iemVmxVmFail(pVCpu, VMXINSTRERR_VMREAD_INVALID_COMPONENT);
@@ -7857,10 +7857,10 @@
     Assert(pbVmcs);
 
-    VMXVMCSFIELDENC FieldEnc;
-    FieldEnc.u = u64FieldEnc;
-    uint8_t  const uWidth     = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_WIDTH);
-    uint8_t  const uType      = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_TYPE);
+    VMXVMCSFIELD VmcsField;
+    VmcsField.u = u64VmcsField;
+    uint8_t  const uWidth     = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_WIDTH);
+    uint8_t  const uType      = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_TYPE);
     uint8_t  const uWidthType = (uWidth << 2) | uType;
-    uint8_t  const uIndex     = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_INDEX);
+    uint8_t  const uIndex     = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_INDEX);
     AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2);
     uint16_t const offField   = g_aoffVmcsMap[uWidthType][uIndex];
@@ -7878,5 +7878,5 @@
      */
     uint8_t      *pbField   = pbVmcs + offField;
-    uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(FieldEnc.u);
+    uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(VmcsField.u);
     switch (uEffWidth)
     {
@@ -7897,12 +7897,12 @@
  * @param   cbInstr         The instruction length in bytes.
  * @param   pu64Dst         Where to store the VMCS field's value.
- * @param   u64FieldEnc     The VMCS field encoding.
+ * @param   u64VmcsField    The VMCS field.
  * @param   pExitInfo       Pointer to the VM-exit information. Optional, can be
  *                          NULL.
  */
-IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg64(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64FieldEnc,
+IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg64(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64VmcsField,
                                           PCVMXVEXITINFO pExitInfo)
 {
-    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, pu64Dst, u64FieldEnc, pExitInfo);
+    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, pu64Dst, u64VmcsField, pExitInfo);
     if (rcStrict == VINF_SUCCESS)
     {
@@ -7923,13 +7923,13 @@
  * @param   cbInstr         The instruction length in bytes.
  * @param   pu32Dst         Where to store the VMCS field's value.
- * @param   u32FieldEnc     The VMCS field encoding.
+ * @param   u32VmcsField    The VMCS field.
  * @param   pExitInfo       Pointer to the VM-exit information. Optional, can be
  *                          NULL.
  */
-IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg32(PVMCPU pVCpu, uint8_t cbInstr, uint32_t *pu32Dst, uint64_t u32FieldEnc,
+IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg32(PVMCPU pVCpu, uint8_t cbInstr, uint32_t *pu32Dst, uint64_t u32VmcsField,
                                           PCVMXVEXITINFO pExitInfo)
 {
     uint64_t u64Dst;
-    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u32FieldEnc, pExitInfo);
+    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u32VmcsField, pExitInfo);
     if (rcStrict == VINF_SUCCESS)
     {
@@ -7954,13 +7954,13 @@
  * @param   GCPtrDst        The guest linear address to store the VMCS field's
  *                          value.
- * @param   u64FieldEnc     The VMCS field encoding.
+ * @param   u64VmcsField    The VMCS field.
  * @param   pExitInfo       Pointer to the VM-exit information. Optional, can be
  *                          NULL.
  */
-IEM_STATIC VBOXSTRICTRC iemVmxVmreadMem(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, RTGCPTR GCPtrDst, uint64_t u64FieldEnc,
+IEM_STATIC VBOXSTRICTRC iemVmxVmreadMem(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, RTGCPTR GCPtrDst, uint64_t u64VmcsField,
                                         PCVMXVEXITINFO pExitInfo)
 {
     uint64_t u64Dst;
-    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u64FieldEnc, pExitInfo);
+    VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u64VmcsField, pExitInfo);
     if (rcStrict == VINF_SUCCESS)
     {
@@ -7999,14 +7999,14 @@
  *                          value), @a iEffSeg will indicate if it's a memory
  *                          operand.
- * @param   u64FieldEnc     The VMCS field encoding.
+ * @param   u64VmcsField    The VMCS field.
  * @param   pExitInfo       Pointer to the VM-exit information. Optional, can be
  *                          NULL.
  */
-IEM_STATIC VBOXSTRICTRC iemVmxVmwrite(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, uint64_t u64Val, uint64_t u64FieldEnc,
+IEM_STATIC VBOXSTRICTRC iemVmxVmwrite(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, uint64_t u64Val, uint64_t u64VmcsField,
                                       PCVMXVEXITINFO pExitInfo)
 {
     /* Nested-guest intercept. */
     if (   IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
-        && CPUMIsGuestVmxVmreadVmwriteInterceptSet(pVCpu, VMX_EXIT_VMWRITE, u64FieldEnc))
+        && CPUMIsGuestVmxVmreadVmwriteInterceptSet(pVCpu, VMX_EXIT_VMWRITE, u64VmcsField))
     {
         if (pExitInfo)
@@ -8077,9 +8077,9 @@
 
     /* Supported VMCS field. */
-    if (iemVmxIsVmcsFieldValid(pVCpu, u64FieldEnc))
+    if (iemVmxIsVmcsFieldValid(pVCpu, u64VmcsField))
     { /* likely */ }
     else
     {
-        Log(("vmwrite: VMCS field %#RX64 invalid -> VMFail\n", u64FieldEnc));
+        Log(("vmwrite: VMCS field %#RX64 invalid -> VMFail\n", u64VmcsField));
         pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmwrite_FieldInvalid;
         iemVmxVmFail(pVCpu, VMXINSTRERR_VMWRITE_INVALID_COMPONENT);
@@ -8089,5 +8089,5 @@
 
     /* Read-only VMCS field. */
-    bool const fIsFieldReadOnly = HMVmxIsVmcsFieldReadOnly(u64FieldEnc);
+    bool const fIsFieldReadOnly = HMVmxIsVmcsFieldReadOnly(u64VmcsField);
     if (   !fIsFieldReadOnly
         ||  IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmxVmwriteAll)
@@ -8095,5 +8095,5 @@
     else
     {
-        Log(("vmwrite: Write to read-only VMCS component %#RX64 -> VMFail\n", u64FieldEnc));
+        Log(("vmwrite: Write to read-only VMCS component %#RX64 -> VMFail\n", u64VmcsField));
         pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmwrite_FieldRo;
         iemVmxVmFail(pVCpu, VMXINSTRERR_VMWRITE_RO_COMPONENT);
@@ -8112,10 +8112,10 @@
     Assert(pbVmcs);
 
-    VMXVMCSFIELDENC FieldEnc;
-    FieldEnc.u = u64FieldEnc;
-    uint8_t  const uWidth     = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_WIDTH);
-    uint8_t  const uType      = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_TYPE);
+    VMXVMCSFIELD VmcsField;
+    VmcsField.u = u64VmcsField;
+    uint8_t  const uWidth     = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_WIDTH);
+    uint8_t  const uType      = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_TYPE);
     uint8_t  const uWidthType = (uWidth << 2) | uType;
-    uint8_t  const uIndex     = RT_BF_GET(FieldEnc.u, VMX_BF_VMCS_ENC_INDEX);
+    uint8_t  const uIndex     = RT_BF_GET(VmcsField.u, VMX_BF_VMCS_ENC_INDEX);
     AssertReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2);
     uint16_t const offField   = g_aoffVmcsMap[uWidthType][uIndex];
@@ -8129,5 +8129,5 @@
      */
     uint8_t      *pbField   = pbVmcs + offField;
-    uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(FieldEnc.u);
+    uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(VmcsField.u);
     switch (uEffWidth)
     {
@@ -9011,7 +9011,7 @@
  * Implements 'VMWRITE' register.
  */
-IEM_CIMPL_DEF_2(iemCImpl_vmwrite_reg, uint64_t, u64Val, uint64_t, u64FieldEnc)
-{
-    return iemVmxVmwrite(pVCpu, cbInstr, UINT8_MAX /* iEffSeg */, u64Val, u64FieldEnc, NULL /* pExitInfo */);
+IEM_CIMPL_DEF_2(iemCImpl_vmwrite_reg, uint64_t, u64Val, uint64_t, u64VmcsField)
+{
+    return iemVmxVmwrite(pVCpu, cbInstr, UINT8_MAX /* iEffSeg */, u64Val, u64VmcsField, NULL /* pExitInfo */);
 }
 
@@ -9020,7 +9020,7 @@
  * Implements 'VMWRITE' memory.
  */
-IEM_CIMPL_DEF_3(iemCImpl_vmwrite_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrVal, uint32_t, u64FieldEnc)
-{
-    return iemVmxVmwrite(pVCpu, cbInstr, iEffSeg, GCPtrVal, u64FieldEnc,  NULL /* pExitInfo */);
+IEM_CIMPL_DEF_3(iemCImpl_vmwrite_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrVal, uint32_t, u64VmcsField)
+{
+    return iemVmxVmwrite(pVCpu, cbInstr, iEffSeg, GCPtrVal, u64VmcsField,  NULL /* pExitInfo */);
 }
 
@@ -9029,7 +9029,7 @@
  * Implements 'VMREAD' register (64-bit).
  */
-IEM_CIMPL_DEF_2(iemCImpl_vmread_reg64, uint64_t *, pu64Dst, uint64_t, u64FieldEnc)
-{
-    return iemVmxVmreadReg64(pVCpu, cbInstr, pu64Dst, u64FieldEnc, NULL /* pExitInfo */);
+IEM_CIMPL_DEF_2(iemCImpl_vmread_reg64, uint64_t *, pu64Dst, uint64_t, u64VmcsField)
+{
+    return iemVmxVmreadReg64(pVCpu, cbInstr, pu64Dst, u64VmcsField, NULL /* pExitInfo */);
 }
 
@@ -9038,7 +9038,7 @@
  * Implements 'VMREAD' register (32-bit).
  */
-IEM_CIMPL_DEF_2(iemCImpl_vmread_reg32, uint32_t *, pu32Dst, uint32_t, u32FieldEnc)
-{
-    return iemVmxVmreadReg32(pVCpu, cbInstr, pu32Dst, u32FieldEnc, NULL /* pExitInfo */);
+IEM_CIMPL_DEF_2(iemCImpl_vmread_reg32, uint32_t *, pu32Dst, uint32_t, u32VmcsField)
+{
+    return iemVmxVmreadReg32(pVCpu, cbInstr, pu32Dst, u32VmcsField, NULL /* pExitInfo */);
 }
 
@@ -9047,7 +9047,7 @@
  * Implements 'VMREAD' memory, 64-bit register.
  */
-IEM_CIMPL_DEF_3(iemCImpl_vmread_mem_reg64, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u64FieldEnc)
-{
-    return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, GCPtrDst, u64FieldEnc, NULL /* pExitInfo */);
+IEM_CIMPL_DEF_3(iemCImpl_vmread_mem_reg64, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u64VmcsField)
+{
+    return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, GCPtrDst, u64VmcsField, NULL /* pExitInfo */);
 }
 
@@ -9056,7 +9056,7 @@
  * Implements 'VMREAD' memory, 32-bit register.
  */
-IEM_CIMPL_DEF_3(iemCImpl_vmread_mem_reg32, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u32FieldEnc)
-{
-    return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, GCPtrDst, u32FieldEnc, NULL /* pExitInfo */);
+IEM_CIMPL_DEF_3(iemCImpl_vmread_mem_reg32, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u32VmcsField)
+{
+    return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, GCPtrDst, u32VmcsField, NULL /* pExitInfo */);
 }
 
