VirtualBox

Ignore:
Timestamp:
Sep 17, 2019 5:44:30 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Tighten up the CR0 guest/host mask to include reserved/unknown bits in CR0.

File:
1 edited

Legend:

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

    r80815 r80840  
    852852     * Modifications to CR0 bits that VT-x ignores saving/restoring (CD, ET, NW) and
    853853     * to CR0 bits that we require for shadow paging (PG) by the guest must cause VM-exits.
     854     *
     855     * Furthermore, modifications to any bits that are reserved/unspecified currently
     856     * by the Intel spec. must also cause a VM-exit. This prevents unpredictable behavior
     857     * when future CPUs specify and use currently reserved/unspecified bits.
    854858     */
    855859    /** @todo Avoid intercepting CR0.PE with unrestricted guest execution. Fix PGM
    856860     *        enmGuestMode to be in-sync with the current mode. See @bugref{6398}
    857861     *        and @bugref{6944}. */
    858     PVMCC pVM = pVCpu->CTX_SUFF(pVM);
     862    PCVMCC pVM = pVCpu->CTX_SUFF(pVM);
    859863    return (  X86_CR0_PE
    860864            | X86_CR0_NE
    861865            | (pVM->hm.s.fNestedPaging ? 0 : X86_CR0_WP)
    862866            | X86_CR0_PG
    863             | X86_CR0_ET     /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.ET */
    864             | X86_CR0_CD     /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.CD */
    865             | X86_CR0_NW);   /* Bit ignored on VM-entry and VM-exit. Don't let the guest modify the host CR0.NW */
     867            | VMX_EXIT_HOST_CR0_IGNORE_MASK);
    866868}
    867869
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