VirtualBox

Changeset 48701 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Sep 26, 2013 10:20:10 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89328
Message:

Introduced /CPUM/MaxIntelFamilyModelStep config variable to hack Mac OS X guests into working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r48670 r48701  
    881881
    882882        if (fOsXGuest)
    883             InsertConfigInteger(pCPUM, "EnableHVP", 1);
     883        {
     884            if (   osTypeId == "MacOS"
     885                || osTypeId == "MacOS_x64"
     886                || osTypeId >= "MacOS107_x64")
     887                InsertConfigInteger(pCPUM, "EnableHVP", 1);
     888
     889            /* Fake the CPU family/model so the guest works.  This is partly
     890               because older mac releases really doesn't work on newer cpus,
     891               and partly because mac os x expects more from systems with newer
     892               cpus (MSRs, power features, whatever). */
     893            uint32_t uMaxIntelFamilyModelStep = UINT32_MAX;
     894            if (   osTypeId == "MacOS"
     895                || osTypeId == "MacOS_x64")
     896                uMaxIntelFamilyModelStep = RT_MAKE_U32_FROM_U8(1, 23, 6, 0); /* Penryn. */
     897            else if (   osTypeId == "MacOS106"
     898                     || osTypeId == "MacOS106_x64")
     899                uMaxIntelFamilyModelStep = RT_MAKE_U32_FROM_U8(1, 23, 6, 0); /* Penryn */
     900            else if (   osTypeId == "MacOS107"
     901                     || osTypeId == "MacOS107_x64")
     902                uMaxIntelFamilyModelStep = RT_MAKE_U32_FROM_U8(1, 23, 6, 0); /* Penryn */ /** @todo figure out what is required here. */
     903            else if (   osTypeId == "MacOS108"
     904                     || osTypeId == "MacOS108_x64")
     905                uMaxIntelFamilyModelStep = RT_MAKE_U32_FROM_U8(1, 23, 6, 0); /* Penryn */ /** @todo figure out what is required here. */
     906            else if (   osTypeId == "MacOS109"
     907                     || osTypeId == "MacOS109_x64")
     908                uMaxIntelFamilyModelStep = RT_MAKE_U32_FROM_U8(1, 23, 6, 0); /* Penryn */ /** @todo figure out what is required here. */
     909            if (uMaxIntelFamilyModelStep != UINT32_MAX)
     910                InsertConfigInteger(pCPUM, "MaxIntelFamilyModelStep", uMaxIntelFamilyModelStep);
     911        }
     912
    884913
    885914        /* Synthetic CPU */
     
    26732702        if (fACPI)
    26742703        {
    2675             BOOL fCpuHotPlug = false;
    2676             BOOL fShowCpu = fOsXGuest;
    26772704            /* Always show the CPU leafs when we have multiple VCPUs or when the IO-APIC is enabled.
    26782705             * The Windows SMP kernel needs a CPU leaf or else its idle loop will burn cpu cycles; the
    26792706             * intelppm driver refuses to register an idle state handler.
    2680              */
    2681             if ((cCpus > 1) || fIOAPIC)
     2707             * Always show CPU leafs for OS X guests. */
     2708            BOOL fShowCpu = fOsXGuest;
     2709            if (cCpus > 1 || fIOAPIC)
    26822710                fShowCpu = true;
    26832711
     2712            BOOL fCpuHotPlug;
    26842713            hrc = pMachine->COMGETTER(CPUHotPlugEnabled)(&fCpuHotPlug);                     H();
    26852714
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