VirtualBox

Changeset 7988 in vbox


Ignore:
Timestamp:
Apr 15, 2008 1:29:51 PM (17 years ago)
Author:
vboxsync
Message:

Argh!

Location:
trunk/src/VBox
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Makefile.kmk

    r7987 r7988  
    3030ifndef VBOX_OSE
    3131include $(PATH_SUB_CURRENT)/Network/Makefile.kmk
    32 include $(PATH_SUB_CURRENT)/VBoxUSB/Makefile.kmk
    3332endif
    3433ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r7987 r7988  
    326326                 "                            [-acpi on|off]\n"
    327327                 "                            [-ioapic on|off]\n"
     328                 "                            [-pae on|off]\n"
    328329                 "                            [-hwvirtex on|off|default]\n"
    329330                 "                            [-monitorcount <number>]\n"
     
    919920    else
    920921        RTPrintf("IOAPIC:          %s\n", ioapicEnabled ? "on" : "off");
     922
     923    BOOL PAEEnabled;
     924    machine->COMGETTER(PAEEnabled)(&PAEEnabled);
     925    if (details == VMINFO_MACHINEREADABLE)
     926        RTPrintf("pae=\"%s\"\n", PAEEnabled ? "on" : "off");
     927    else
     928        RTPrintf("PAE: %s\n", PAEEnabled ? "on" : "off");
    921929
    922930    LONG64 timeOffset;
     
    37143722    char *acpi = NULL;
    37153723    char *hwvirtex = NULL;
     3724    char *pae = NULL;
    37163725    char *ioapic = NULL;
    37173726    int monitorcount = -1;
     
    38503859            hwvirtex = argv[i];
    38513860        }
     3861        else if (strcmp(argv[i], "-pae") == 0)
     3862        {
     3863            if (argc <= i + 1)
     3864            {
     3865                return errorArgument("Missing argument to '%s'", argv[i]);
     3866            }
     3867            i++;
     3868            pae = argv[i];
     3869        }
    38523870        else if (strcmp(argv[i], "-monitorcount") == 0)
    38533871        {
     
    45334551            {
    45344552                errorArgument("Invalid -hwvirtex argument '%s'", hwvirtex);
     4553                rc = E_FAIL;
     4554                break;
     4555            }
     4556        }
     4557        if (pae)
     4558        {
     4559            if (strcmp(pae, "on") == 0)
     4560            {
     4561                CHECK_ERROR(machine, COMSETTER(PAEEnabled)(true));
     4562            }
     4563            else if (strcmp(pae, "off") == 0)
     4564            {
     4565                CHECK_ERROR(machine, COMSETTER(PAEEnabled)(false));
     4566            }
     4567            else
     4568            {
     4569                errorArgument("Invalid -pae argument '%s'", ioapic);
    45354570                rc = E_FAIL;
    45364571                break;
  • trunk/src/VBox/Frontends/VirtualBox/src/HappyHttp.cpp

    r7987 r7988  
    272272    m_Sock(-1)
    273273{
     274#ifdef RT_OS_WINDOWS
     275    WSADATA wsaData;
     276
     277    int ret = WSAStartup(MAKEWORD(1,1), &wsaData);
     278#endif
    274279}
    275280
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r7987 r7988  
    168168         * thread to several seconds). */
    169169        PlaySound (NULL, NULL, 0);
    170 
    171     /* Initialize windows sockets for the process */
    172     WSADATA wsaData;
    173     int ret = WSAStartup(MAKEWORD(1,1), &wsaData);
    174170#endif
    175171
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r7987 r7988  
    167167    }
    168168#endif
     169
     170    /* Physical Address Extension (PAE) */
     171    BOOL fEnablePAE = false;
     172    hrc = pMachine->COMGETTER(PAEEnabled)(&fEnablePAE);                             H();
     173    rc = CFGMR3InsertInteger(pRoot, "EnablePAE", fEnablePAE);                       RC_CHECK();
    169174
    170175    BOOL fIOAPIC;
  • trunk/src/VBox/Main/MachineDebuggerImpl.cpp

    r7987 r7988  
    510510
    511511/**
     512 * Returns the current PAE flag.
     513 *
     514 * @returns COM status code
     515 * @param   enabled address of result variable
     516 */
     517STDMETHODIMP MachineDebugger::COMGETTER(PAEEnabled)(BOOL *enabled)
     518{
     519    if (!enabled)
     520        return E_POINTER;
     521
     522    AutoLock lock(this);
     523    CHECK_READY();
     524
     525    Console::SafeVMPtrQuiet pVM (mParent);
     526    if (pVM.isOk())
     527    {
     528        uint64_t cr4 = CPUMGetGuestCR4(pVM.raw());
     529        *enabled = !!(cr4 & X86_CR4_PAE);
     530    }
     531    else
     532        *enabled = false;
     533    return S_OK;
     534}
     535
     536/**
    512537 * Returns the current virtual time rate.
    513538 *
  • trunk/src/VBox/Main/MachineImpl.cpp

    r7987 r7988  
    173173    mMonitorCount = 1;
    174174    mHWVirtExEnabled = TSBool_False;
     175    mPAEEnabled = false;
    175176
    176177    /* default boot order: floppy - DVD - HDD */
     
    199200        mMonitorCount != that.mMonitorCount ||
    200201        mHWVirtExEnabled != that.mHWVirtExEnabled ||
     202        mPAEEnabled != that.mPAEEnabled ||
    201203        mClipboardMode != that.mClipboardMode)
    202204        return false;
     
    11121114    mHWData.backup();
    11131115    mHWData->mHWVirtExEnabled = enable;
     1116
     1117    return S_OK;
     1118}
     1119
     1120STDMETHODIMP Machine::COMGETTER(PAEEnabled)(BOOL *enabled)
     1121{
     1122    if (!enabled)
     1123        return E_POINTER;
     1124
     1125    AutoCaller autoCaller (this);
     1126    CheckComRCReturnRC (autoCaller.rc());
     1127
     1128    AutoReaderLock alock (this);
     1129
     1130    *enabled = mHWData->mPAEEnabled;
     1131
     1132    return S_OK;
     1133}
     1134
     1135STDMETHODIMP Machine::COMSETTER(PAEEnabled)(BOOL enable)
     1136{
     1137    AutoCaller autoCaller (this);
     1138    CheckComRCReturnRC (autoCaller.rc());
     1139
     1140    AutoLock alock (this);
     1141
     1142    HRESULT rc = checkStateDependency (MutableStateDep);
     1143    CheckComRCReturnRC (rc);
     1144
     1145    /** @todo check validity! */
     1146
     1147    mHWData.backup();
     1148    mHWData->mPAEEnabled = enable;
    11141149
    11151150    return S_OK;
     
    42454280        /* default value in case the node is not there */
    42464281        mHWData->mHWVirtExEnabled = TSBool_Default;
     4282        mHWData->mPAEEnabled      = false;
    42474283
    42484284        Key cpuNode = aNode.findKey ("CPU");
     
    42604296                    mHWData->mHWVirtExEnabled = TSBool_Default;
    42614297            }
     4298            /* PAE (optional, default is false) */
     4299            mHWData->mPAEEnabled = cpuNode.value <BOOL> ("PAE");
    42624300        }
    42634301    }
     
    56155653            case TSBool_Default:
    56165654                value = "default";
    5617         }
    5618         hwVirtExNode.setStringValue ("enabled", value);
     5655                break;
     5656        }
     5657        cpuNode.setStringValue ("enabled", value);
     5658
     5659        /* PAE (optional, default is false) */
     5660        cpuNode.setValue <BOOL> ("PAE", mHWData->mPAEEnabled);
    56195661    }
    56205662
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r7987 r7988  
    24842484  <interface
    24852485     name="IMachine" extends="$unknown"
    2486      uuid="4f6b4977-95fd-40b1-8391-fc165c040635"
     2486     uuid="f95c0793-7737-49a1-85d9-6da81097173b"
    24872487     wsmap="managed"
    24882488     >
     
    27072707    </attribute>
    27082708
     2709    <attribute name="PAEEnabled" type="boolean" default="false">
     2710      <desc>
     2711        This setting determines whether VirtualBox will expose the Physical Address
     2712        Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
     2713        is not available, it will not be reported.
     2714      </desc>
     2715    </attribute>
     2716
    27092717    <attribute name="snapshotFolder" type="wstring">
    27102718      <desc>
     
    85588566      </desc>
    85598567    </attribute>
     8568   
     8569    <attribute name="PAEEnabled" type="boolean" readonly="yes">
     8570      <desc>
     8571        Flag indicating whether the VM is currently making use of the Physical
     8572        Address Extension CPU feature.
     8573      </desc>
     8574    </attribute>
    85608575
    85618576    <attribute name="virtualTimeRate" type="unsigned long">
  • trunk/src/VBox/Main/include/MachineDebuggerImpl.h

    r7987 r7988  
    6363    STDMETHOD(COMSETTER(LogEnabled))(BOOL enable);
    6464    STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);
     65    STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled);
    6566    STDMETHOD(COMGETTER(VirtualTimeRate))(ULONG *pct);
    6667    STDMETHOD(COMSETTER(VirtualTimeRate))(ULONG pct);
  • trunk/src/VBox/Main/include/MachineImpl.h

    r7987 r7988  
    231231        ULONG          mMonitorCount;
    232232        TSBool_T       mHWVirtExEnabled;
     233        BOOL           mPAEEnabled;
    233234
    234235        DeviceType_T   mBootOrder [SchemaDefs::MaxBootPosition];
     
    459460    STDMETHOD(COMGETTER(HWVirtExEnabled))(TSBool_T *enabled);
    460461    STDMETHOD(COMSETTER(HWVirtExEnabled))(TSBool_T enabled);
     462    STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled);
     463    STDMETHOD(COMSETTER(PAEEnabled))(BOOL enabled);
    461464    STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
    462465    STDMETHOD(COMSETTER(SnapshotFolder))(INPTR BSTR aSavedStateFolder);
  • trunk/src/VBox/VMM/CPUM.cpp

    r7987 r7988  
    407407
    408408    /* Check if PAE was explicitely enabled by the user. */
    409     PCFGMNODE pNode = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "CPUM/CPUID");
    410     if (pNode)
    411     {
    412         bool fEnable;
    413         int rc = CFGMR3QueryBool(pNode, "EnablePAE", &fEnable);
    414         if (VBOX_SUCCESS(rc) && fEnable)
    415             CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE);
    416     }
     409    bool fEnable = false;
     410    int rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "EnablePAE", &fEnable);
     411    if (VBOX_SUCCESS(rc) && fEnable)
     412        CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE);
    417413
    418414    /*
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