VirtualBox

Changeset 26459 in vbox


Ignore:
Timestamp:
Feb 12, 2010 11:42:36 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57608
Message:

Main: HPET machine property, cleanups

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/settings.h

    r26440 r26459  
    565565                        fPAE;
    566566    uint32_t            cCPUs;
    567     bool                fCpuHotPlug;            // requires settings version 1.11 (VirtualBox 3.2)
    568     CpuList             llCpus;                 // requires settings version 1.11 (VirtualBox 3.2)
     567    bool                fCpuHotPlug;            // requires settings version 1.10 (VirtualBox 3.2)
     568    CpuList             llCpus;                 // requires settings version 1.10 (VirtualBox 3.2)
     569    bool                fHpetEnabled;           // requires settings version 1.10 (VirtualBox 3.2)
     570
    569571    CpuIdLeafsList      llCpuIdLeafs;
    570572
     
    578580                        fAccelerate2DVideo;     // requires settings version 1.8 (VirtualBox 3.1)
    579581    FirmwareType_T      firmwareType;           // requires settings version 1.9 (VirtualBox 3.1)
     582
    580583    PointingHidType_T   pointingHidType;        // requires settings version 1.10 (VirtualBox 3.2)
    581584    KeyboardHidType_T   keyboardHidType;        // requires settings version 1.10 (VirtualBox 3.2)
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r26392 r26459  
    594594    BOOL fHpetEnabled;
    595595#ifdef VBOX_WITH_HPET
    596     /* Need ability to allow enabling HPET in other profiles too */
    597     fHpetEnabled = fExtProfile;
     596    hrc = pMachine->COMGETTER(HpetEnabled)(&fHpetEnabled);                          H();
     597    /* Always enable HPET in extended profile */
     598    fHpetEnabled |= fExtProfile;
    598599#else
    599600    fHpetEnabled = false;
  • trunk/src/VBox/Main/MachineImpl.cpp

    r26443 r26459  
    177177    mSyntheticCpu = false;
    178178    mPropertyServiceActive = false;
     179    mHpetEnabled = false;
    179180
    180181    /* default boot order: floppy - DVD - HDD */
     
    189190
    190191    mFirmwareType = FirmwareType_BIOS;
     192    mKeyboardHidType = KeyboardHidType_PS2Keyboard;
     193    mPointingHidType = PointingHidType_PS2Mouse;
    191194
    192195    for (size_t i = 0; i < RT_ELEMENTS(mCPUAttached); i++)
     
    11361139
    11371140    mHWData->mCPUHotPlugEnabled = enabled;
     1141
     1142    return rc;
     1143}
     1144
     1145STDMETHODIMP Machine::COMGETTER(HpetEnabled)(BOOL *enabled)
     1146{
     1147    CheckComArgOutPointerValid(enabled);
     1148
     1149    AutoCaller autoCaller(this);
     1150    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1151    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     1152
     1153    *enabled = mHWData->mHpetEnabled;
     1154
     1155    return S_OK;
     1156}
     1157
     1158STDMETHODIMP Machine::COMSETTER(HpetEnabled)(BOOL enabled)
     1159{
     1160    HRESULT rc = S_OK;
     1161
     1162    AutoCaller autoCaller(this);
     1163    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1164    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     1165
     1166    rc = checkStateDependency(MutableStateDep);
     1167    if (FAILED(rc)) return rc;
     1168
     1169    setModified(IsModified_MachineData);
     1170    mHWData.backup();
     1171
     1172    mHWData->mHpetEnabled = enabled;
    11381173
    11391174    return rc;
     
    62596294        mHWData->mPointingHidType = data.pointingHidType;
    62606295        mHWData->mKeyboardHidType = data.keyboardHidType;
     6296        mHWData->mHpetEnabled = data.fHpetEnabled;
    62616297
    62626298#ifdef VBOX_WITH_VRDP
     
    72737309        data.pointingHidType = mHWData->mPointingHidType;
    72747310        data.keyboardHidType = mHWData->mKeyboardHidType;
     7311
     7312        // HPET
     7313        data.fHpetEnabled = mHWData->mHpetEnabled;
    72757314
    72767315        // boot order
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r26444 r26459  
    42274227  <interface
    42284228     name="IMachine" extends="$unknown"
    4229      uuid="91470ab5-8457-48ab-8a3f-a2e68d8ae923"
     4229     uuid="f2816298-7408-4c44-a117-0ed8ea09b9bc"
    42304230     wsmap="managed"
    42314231     >
     
    44784478
    44794479    <attribute name="keyboardHidType" type="KeyboardHidType">
    4480       <desc>Type of keyboard HID used in this VM
     4480      <desc>Type of keyboard HID used in this VM.
    44814481        The default is typically "PS2Keyboard" but can vary depending on the
    44824482        requirements of the guest operating system.</desc>
     4483    </attribute>
     4484
     4485    <attribute name="hpetEnabled" type="boolean">
     4486      <desc>This attribute controls if High Precision Event Timer (HPET) is
     4487        enabled in this VM. Use this property if you want to provide guests
     4488        with additional time source, or if guest requires HPET to function correctly.
     4489        Default is false.</desc>
    44834490    </attribute>
    44844491
  • trunk/src/VBox/Main/include/MachineImpl.h

    r26440 r26459  
    282282        BOOL                 mCPUHotPlugEnabled;
    283283        BOOL                 mAccelerate3DEnabled;
     284        BOOL                 mHpetEnabled;
    284285
    285286        BOOL                 mCPUAttached[SchemaDefs::MaxCPUCount];
     
    376377    STDMETHOD(COMGETTER(CPUHotPlugEnabled))(BOOL *enabled);
    377378    STDMETHOD(COMSETTER(CPUHotPlugEnabled))(BOOL enabled);
     379    STDMETHOD(COMGETTER(HpetEnabled))(BOOL *enabled);
     380    STDMETHOD(COMSETTER(HpetEnabled))(BOOL enabled);
    378381    STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize);
    379382    STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize);
     
    423426    STDMETHOD(COMGETTER(RTCUseUTC))(BOOL *aEnabled);
    424427    STDMETHOD(COMSETTER(RTCUseUTC))(BOOL aEnabled);
     428    STDMETHOD(COMGETTER(FirmwareType)) (FirmwareType_T *aFirmware);
     429    STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T  aFirmware);
     430    STDMETHOD(COMGETTER(KeyboardHidType)) (KeyboardHidType_T *aKeyboardHidType);
     431    STDMETHOD(COMSETTER(KeyboardHidType)) (KeyboardHidType_T  aKeyboardHidType);
     432    STDMETHOD(COMGETTER(PointingHidType)) (PointingHidType_T *aPointingHidType);
     433    STDMETHOD(COMSETTER(PointingHidType)) (PointingHidType_T  aPointingHidType);
    425434
    426435    // IMachine methods
     
    472481    STDMETHOD(GetStorageControllerByName(IN_BSTR aName, IStorageController **storageController));
    473482    STDMETHOD(GetStorageControllerByInstance(ULONG aInstance, IStorageController **storageController));
    474     STDMETHOD(COMGETTER(FirmwareType)) (FirmwareType_T *aFirmware);
    475     STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T  aFirmware);
    476     STDMETHOD(COMGETTER(KeyboardHidType)) (KeyboardHidType_T *aKeyboardHidType);
    477     STDMETHOD(COMSETTER(KeyboardHidType)) (KeyboardHidType_T  aKeyboardHidType);
    478     STDMETHOD(COMGETTER(PointingHidType)) (PointingHidType_T *aPointingHidType);
    479     STDMETHOD(COMSETTER(PointingHidType)) (PointingHidType_T  aPointingHidType);
    480 
    481483    STDMETHOD(QuerySavedThumbnailSize)(ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
    482484    STDMETHOD(ReadSavedThumbnailToArray)(BOOL aBGR, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
  • trunk/src/VBox/Main/xml/Settings.cpp

    r26444 r26459  
    14661466          cCPUs(1),
    14671467          fCpuHotPlug(false),
     1468          fHpetEnabled(false),
    14681469          ulMemorySizeMB((uint32_t)-1),
    14691470          ulVRAMSizeMB(8),
     
    15091510                  && (cCPUs                     == h.cCPUs)
    15101511                  && (fCpuHotPlug               == h.fCpuHotPlug)
     1512                  && (fHpetEnabled              == h.fHpetEnabled)
    15111513                  && (llCpus                    == h.llCpus)
    15121514                  && (llCpuIdLeafs              == h.llCpuIdLeafs)
     
    20932095            }
    20942096        }
     2097        else if (pelmHwChild->nameEquals("HPET"))
     2098        {
     2099            pelmHwChild->getAttributeValue("enabled", hw.fHpetEnabled);
     2100        }
    20952101        else if (pelmHwChild->nameEquals("Boot"))
    20962102        {
     
    29872993    }
    29882994
     2995    if (    (m->sv >= SettingsVersion_v1_10)
     2996       )
     2997    {
     2998         xml::ElementNode *pelmHpet = pelmHardware->createChild("HPET");
     2999         pelmHpet->setAttribute("enabled", hw.fHpetEnabled);
     3000    }
     3001
    29893002    xml::ElementNode *pelmBoot = pelmHardware->createChild("Boot");
    29903003    for (BootOrderMap::const_iterator it = hw.mapBootOrder.begin();
     
    35563569    }
    35573570
     3571    // VirtualBox 3.2 adds support for CPU hotplug, RTC timezone control, HID type and HPET
    35583572    if (    m->sv < SettingsVersion_v1_10
    35593573         && (    fRTCUseUTC
     
    35613575              || hardwareMachine.pointingHidType != PointingHidType_PS2Mouse
    35623576              || hardwareMachine.keyboardHidType != KeyboardHidType_PS2Keyboard
     3577              || hardwareMachine.fHpetEnabled
    35633578            )
    35643579       )
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