VirtualBox

Changeset 80871 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 17, 2019 5:41:42 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133442
Message:

VMM/HM: Explicit cast to 64-bit while flipping X86_CR4_VMXE.

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

Legend:

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

    r80844 r80871  
    448448            /* Restore CR4.VMXE if it wasn't set prior to us setting it above. */
    449449            if (!(uOldCr4 & X86_CR4_VMXE))
    450                 SUPR0ChangeCR4(0 /* fOrMask */, ~X86_CR4_VMXE);
     450                SUPR0ChangeCR4(0 /* fOrMask */, ~(uint64_t)X86_CR4_VMXE);
    451451
    452452            /* Restore interrupts. */
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r80843 r80871  
    16211621        /* Restore CR4.VMXE if it was not set prior to our attempt to set it above. */
    16221622        if (!(uOldCr4 & X86_CR4_VMXE))
    1623             SUPR0ChangeCR4(0 /* fOrMask */, ~X86_CR4_VMXE);
     1623            SUPR0ChangeCR4(0 /* fOrMask */, ~(uint64_t)X86_CR4_VMXE);
    16241624
    16251625        if (pVM)
     
    16531653        /* Exit VMX root mode and clear the VMX bit in CR4. */
    16541654        VMXDisable();
    1655         SUPR0ChangeCR4(0 /* fOrMask */, ~X86_CR4_VMXE);
     1655        SUPR0ChangeCR4(0 /* fOrMask */, ~(uint64_t)X86_CR4_VMXE);
    16561656        rc = VINF_SUCCESS;
    16571657    }
Note: See TracChangeset for help on using the changeset viewer.

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