VirtualBox

Changeset 74392 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Sep 20, 2018 4:55:05 PM (6 years ago)
Author:
vboxsync
Message:

VMM/CPU, IEM: Nested VMX: bugref:9180 Access the CR0 and CR4 fixed bits from the corresponding MSRs for now.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp

    r74258 r74392  
    15571557{
    15581558    PCCPUMFEATURES pGuestFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures;
    1559     uint64_t const uVmxMsr = pGuestFeatures->fVmx ? VMX_V_CR0_FIXED0 : 0;
    1560     return uVmxMsr;
     1559    if (pGuestFeatures->fVmx)
     1560    {
     1561        uint64_t const uVmxMsr = pGuestFeatures->fVmxUnrestrictedGuest ? VMX_V_CR0_FIXED0_UX : VMX_V_CR0_FIXED0;
     1562        return uVmxMsr;
     1563    }
     1564    return 0;
    15611565}
    15621566
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r74385 r74392  
    53385338            if (IEM_IS_VMX_ROOT_MODE(pVCpu))
    53395339            {
    5340                 uint32_t const uCr0Fixed0 = IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmxUnrestrictedGuest ?
    5341                                             VMX_V_CR0_FIXED0_UX : VMX_V_CR0_FIXED0;
     5340                uint32_t const uCr0Fixed0 = CPUMGetGuestIa32VmxCr0Fixed0(pVCpu);
    53425341                if ((uNewCrX & uCr0Fixed0) != uCr0Fixed0)
    53435342                {
     
    55655564            if (IEM_IS_VMX_ROOT_MODE(pVCpu))
    55665565            {
    5567                 uint32_t const uCr4Fixed0 = VMX_V_CR4_FIXED0;
     5566                uint32_t const uCr4Fixed0 = CPUMGetGuestIa32VmxCr4Fixed0(pVCpu);
    55685567                if ((uNewCrX & uCr4Fixed0) != uCr4Fixed0)
    55695568                {
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