VirtualBox

Changeset 78241 in vbox for trunk


Ignore:
Timestamp:
Apr 22, 2019 9:04:39 AM (6 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Don't write 64-bits of guest CR0/CR4 because our VMCS caches (64-bit guest on 32-bit host) doesn't currently have slots for it, use 32-bit VMWRITE for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r78240 r78241  
    48054805
    48064806            /* Commit the CR0 and related fields to the guest VMCS. */
    4807             int rc = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR0, u64GuestCr0);
     4807            int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR0, u64GuestCr0);   /** @todo Fix to 64-bit when we drop 32-bit. */
    48084808            rc    |= VMXWriteVmcsHstN(VMX_VMCS_CTRL_CR0_READ_SHADOW, u64ShadowCr0);
    48094809            if (uProcCtls != pVmcsInfo->u32ProcCtls)
     
    48344834
    48354835            /* Commit the CR0 and CR0 read shadow to the nested-guest VMCS. */
    4836             int rc = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR0,            u64GuestCr0);
     4836            int rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR0, u64GuestCr0);   /** @todo NSTVMX: Fix to 64-bit when we drop 32-bit. */
    48374837            rc    |= VMXWriteVmcsHstN(VMX_VMCS_CTRL_CR0_READ_SHADOW, u64ShadowCr0);
    48384838            AssertRCReturn(rc, rc);
     
    50625062
    50635063        /* Commit the CR4 and CR4 read shadow to the guest VMCS. */
    5064         rc  = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR4, u64GuestCr4);
     5064        rc  = VMXWriteVmcs32(VMX_VMCS_GUEST_CR4, u64GuestCr4);  /** @todo Fix to 64-bit when we drop 32-bit. */
    50655065        rc |= VMXWriteVmcsHstN(VMX_VMCS_CTRL_CR4_READ_SHADOW, u64ShadowCr4);
    50665066        AssertRCReturn(rc, rc);
     
    64406440        {
    64416441            AssertMsgFailed(("VMXWriteVmcs64Ex: Invalid field %#RX32 (pVCpu=%p u64Val=%#RX64)\n", idxField, pVCpu, u64Val));
     6442            pVCpu->hm.s.u32HMError = idxField;
    64426443            rc = VERR_INVALID_PARAMETER;
    64436444            break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette