VirtualBox

Changeset 89868 in vbox


Ignore:
Timestamp:
Jun 23, 2021 6:02:11 PM (3 years ago)
Author:
vboxsync
Message:

Main/Console+Machine: Eliminate CMPXCHG16B hack (see bugref:6300) since it is no longer needed. Also make the ParavirtProvider check (Windows Server versions) for the Hyper-V case somewhat future proof. Add a reminder to Global.cpp when adding new guest OS types.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/Global.cpp

    r89604 r89868  
    2929    /* NOTE1: we assume that unknown is always the first two entries!
    3030     * NOTE2: please use powers of 2 when specifying the size of harddisks since
    31      *        '2GB' looks better than '1.95GB' (= 2000MB) */
     31     *        '2GB' looks better than '1.95GB' (= 2000MB)
     32     * NOTE3: if you add new guest OS types please check if the code in
     33     *        Machine::getEffectiveParavirtProvider and Console::i_configConstructorInner
     34     *        are still covering the relevant cases. */
    3235    { "Other",   "Other",             "Other",              "Other/Unknown",
    3336      VBOXOSTYPE_Unknown,         VBOXOSHINT_NONE,
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r89852 r89868  
    10321032            LogRel(("Limiting CPUID leaf count for NT4 guests\n"));
    10331033            InsertConfigInteger(pCPUM, "NT4LeafLimit", true);
    1034         }
    1035 
    1036         /* Expose CMPXCHG16B. Currently a hack. */
    1037         if (   osTypeId == "Windows81_64"
    1038             || osTypeId == "Windows2012_64"
    1039             || osTypeId == "Windows10_64"
    1040             || osTypeId == "Windows2016_64")
    1041         {
    1042             LogRel(("Enabling CMPXCHG16B for Windows 8.1 / 2k12 or newer guests\n"));
    1043             InsertConfigInteger(pIsaExts, "CMPXCHG16B", true);
    10441034        }
    10451035
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r89718 r89868  
    13761376                             || mUserData->s.strOsType == "WindowsVista"
    13771377                             || mUserData->s.strOsType == "WindowsVista_64"
     1378                             || (   (   mUserData->s.strOsType.startsWith("Windows202")
     1379                                     || mUserData->s.strOsType.startsWith("Windows201"))
     1380                                 && mUserData->s.strOsType.endsWith("_64"))
    13781381                             || mUserData->s.strOsType == "Windows2012"
    13791382                             || mUserData->s.strOsType == "Windows2012_64"
  • trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp

    r87003 r89868  
    42384238    }
    42394239
    4240     /** @cfgm{/CPUM/IsaExts/CMPXCHG16B, boolean, depends}
    4241      * Expose CMPXCHG16B to the guest if supported by the host. For the time
    4242      * being the default is to only do this for VMs with nested paging and AMD-V or
    4243      * unrestricted guest mode.
    4244      */
    4245     rc = cpumR3CpuIdReadIsaExtCfgLegacy(pVM, pIsaExts, pCpumCfg, "CMPXCHG16B", &pConfig->enmCmpXchg16b, fNestedPagingAndFullGuestExec);
     4240    /** @cfgm{/CPUM/IsaExts/CMPXCHG16B, boolean, true}
     4241     * Expose CMPXCHG16B to the guest if available. All host CPUs which support
     4242     * hardware virtualization have it.
     4243     */
     4244    rc = cpumR3CpuIdReadIsaExtCfgLegacy(pVM, pIsaExts, pCpumCfg, "CMPXCHG16B", &pConfig->enmCmpXchg16b, true);
    42464245    AssertLogRelRCReturn(rc, rc);
    42474246
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