VirtualBox

Changeset 101035 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Sep 7, 2023 8:59:15 AM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158992
Message:

Initial commit (based draft v2 / on patch v5) for implementing platform architecture support for x86 and ARM. bugref:10384

Location:
trunk/src/VBox/Main/include
Files:
7 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r100609 r101035  
    739739                                   const ComPtr<IMachine> &ptrMachine,
    740740                                   const ComPtr<IGraphicsAdapter> &ptrGraphicsAdapter,
    741                                    const ComPtr<IBIOSSettings> &ptrBiosSettings,
     741                                   const ComPtr<IFirmwareSettings> &ptrFirmwareSettings,
    742742                                   bool fHMEnabled);
    743743    int i_checkMediumLocation(IMedium *pMedium, bool *pfUseHostIOCache);
  • trunk/src/VBox/Main/include/Global.h

    r98103 r101035  
    124124
    125125    /**
    126      * Get the network adapter limit for each chipset type.
    127      */
    128     static uint32_t getMaxNetworkAdapters(ChipsetType_T aChipsetType);
    129 
    130     /**
    131126     * Returns @c true if the given machine state is an online state. This is a
    132127     * recommended way to detect if the VM is online (being executed in a
  • trunk/src/VBox/Main/include/HostImpl.h

    r98103 r101035  
    109109
    110110    // wrapped IHost properties
     111    HRESULT getArchitecture(PlatformArchitecture_T *platformArchitecture);
    111112    HRESULT getDVDDrives(std::vector<ComPtr<IMedium> > &aDVDDrives);
    112113    HRESULT getFloppyDrives(std::vector<ComPtr<IMedium> > &aFloppyDrives);
     
    137138    HRESULT getUpdateURL(com::Utf8Str &aUpdateURL);
    138139    HRESULT getUpdateCheckNeeded(BOOL *aUpdateCheckNeeded);
     140    HRESULT getX86(ComPtr<IHostX86> &aHostX86);
    139141
    140142    // wrapped IHost methods
     
    145147    HRESULT getProcessorDescription(ULONG aCpuId,
    146148                                    com::Utf8Str &aDescription);
    147     HRESULT getProcessorCPUIDLeaf(ULONG aCpuId,
    148                                   ULONG aLeaf,
    149                                   ULONG aSubLeaf,
    150                                   ULONG *aValEax,
    151                                   ULONG *aValEbx,
    152                                   ULONG *aValEcx,
    153                                   ULONG *aValEdx);
    154149    HRESULT createHostOnlyNetworkInterface(ComPtr<IHostNetworkInterface> &aHostInterface,
    155150                                           ComPtr<IProgress> &aProgress);
  • trunk/src/VBox/Main/include/MachineImpl.h

    r98288 r101035  
    4343#include "SerialPortImpl.h"
    4444#include "ParallelPortImpl.h"
    45 #include "BIOSSettingsImpl.h"
     45#include "FirmwareSettingsImpl.h"
    4646#include "RecordingSettingsImpl.h"
    4747#include "GraphicsAdapterImpl.h"
     
    5757# include "PerformanceImpl.h"
    5858#endif
     59#include "PlatformImpl.h"
     60#include "PlatformPropertiesImpl.h"
    5961#include "ThreadTask.h"
    6062
     
    304306        BOOL                mPageFusionEnabled;
    305307        settings::RecordingSettings mRecordSettings;
    306         BOOL                mHWVirtExEnabled;
    307         BOOL                mHWVirtExNestedPagingEnabled;
    308         BOOL                mHWVirtExLargePagesEnabled;
    309         BOOL                mHWVirtExVPIDEnabled;
    310         BOOL                mHWVirtExUXEnabled;
    311         BOOL                mHWVirtExForceEnabled;
    312         BOOL                mHWVirtExUseNativeApi;
    313         BOOL                mHWVirtExVirtVmsaveVmload;
    314         BOOL                mPAEEnabled;
    315         settings::Hardware::LongModeType mLongMode;
    316         BOOL                mTripleFaultReset;
    317         BOOL                mAPIC;
    318         BOOL                mX2APIC;
    319         BOOL                mIBPBOnVMExit;
    320         BOOL                mIBPBOnVMEntry;
    321         BOOL                mSpecCtrl;
    322         BOOL                mSpecCtrlByHost;
    323         BOOL                mL1DFlushOnSched;
    324         BOOL                mL1DFlushOnVMEntry;
    325         BOOL                mMDSClearOnSched;
    326         BOOL                mMDSClearOnVMEntry;
    327         BOOL                mNestedHWVirt;
    328308        ULONG               mCPUCount;
    329309        BOOL                mCPUHotPlugEnabled;
     
    331311        uint32_t            mCpuIdPortabilityLevel;
    332312        Utf8Str             mCpuProfile;
    333         BOOL                mHPETEnabled;
    334313
    335314        BOOL                mCPUAttached[SchemaDefs::MaxCPUCount];
    336 
    337         std::list<settings::CpuIdLeaf> mCpuIdLeafList;
    338315
    339316        DeviceType_T        mBootOrder[SchemaDefs::MaxBootPosition];
     
    350327        GuestPropertyMap    mGuestProperties;
    351328
    352         FirmwareType_T      mFirmwareType;
    353329        KeyboardHIDType_T   mKeyboardHIDType;
    354330        PointingHIDType_T   mPointingHIDType;
    355         ChipsetType_T       mChipsetType;
    356         IommuType_T         mIommuType;
    357331        ParavirtProvider_T  mParavirtProvider;
    358332        Utf8Str             mParavirtDebug;
     
    384358                 const Utf8Str &strConfigFile,
    385359                 const Utf8Str &strName,
     360                 PlatformArchitecture_T aArchitecture,
    386361                 const StringsList &llGroups,
    387362                 const Utf8Str &strOsTypeId,
     
    463438
    464439    /**
     440     * Returns the machine's platform object.
     441     *
     442     * @returns Platform object.
     443     */
     444    Platform *i_getPlatform() const { return mPlatform; }
     445
     446    /**
     447     * Returns the machine's platform properties object.
     448     *
     449     * @returns Platform properties object.
     450     */
     451    PlatformProperties *i_getPlatformProperties() const { return mPlatformProperties; }
     452
     453    /**
    465454     * Checks if this machine is accessible, without attempting to load the
    466455     * config file.
     
    519508        IsModified_AudioSettings         = 0x000080,
    520509        IsModified_USB                   = 0x000100,
    521         IsModified_BIOS                  = 0x000200,
     510        IsModified_Firmware              = 0x000200,
    522511        IsModified_SharedFolders         = 0x000400,
    523512        IsModified_Snapshots             = 0x000800,
     
    528517        IsModified_NvramStore            = 0x010000,
    529518        IsModified_GuestDebugControl     = 0x020000,
     519        IsModified_Platform              = 0x040000,
    530520    };
    531521
     
    538528     */
    539529    Utf8Str i_getOSTypeId() const { return mUserData->s.strOsType; }
    540     ChipsetType_T i_getChipsetType() const { return mHWData->mChipsetType; }
    541     FirmwareType_T i_getFirmwareType() const { return mHWData->mFirmwareType; }
     530    FirmwareType_T i_getFirmwareType() const;
    542531    ParavirtProvider_T i_getParavirtProvider() const { return mHWData->mParavirtProvider; }
    543532    Utf8Str i_getParavirtDebug() const { return mHWData->mParavirtDebug; }
     
    591580    Utf8Str i_getDefaultNVRAMFilename();
    592581    Utf8Str i_getSnapshotNVRAMFilename();
     582    NvramStore *i_getNVRAMStore() const { return mNvramStore; };
    593583    SettingsVersion_T i_getSettingsVersion(void);
    594584
     
    809799#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    810800
     801    void i_platformPropertiesUpdate();
     802
    811803    Machine * const         mPeer;
    812804
     
    818810    Backupable<UserData>    mUserData;
    819811    Backupable<HWData>      mHWData;
     812
     813    // const objectsf not requiring locking
     814    /** The machine's platform properties.
     815     *  We keep a (const) object around for performance reasons. */
     816    const ComObjPtr<PlatformProperties> mPlatformProperties;
    820817
    821818    /**
     
    840837    const ComObjPtr<AudioSettings>     mAudioSettings;
    841838    const ComObjPtr<USBDeviceFilters>  mUSBDeviceFilters;
    842     const ComObjPtr<BIOSSettings>      mBIOSSettings;
     839    const ComObjPtr<Platform>          mPlatform;
     840    const ComObjPtr<FirmwareSettings>  mFirmwareSettings;
    843841    const ComObjPtr<RecordingSettings> mRecordingSettings;
    844842    const ComObjPtr<GraphicsAdapter>   mGraphicsAdapter;
     
    907905
    908906    friend class Appliance;
     907    friend class Platform;
     908    friend class PlatformX86;
    909909    friend class RecordingSettings;
    910910    friend class RecordingScreenSettings;
     
    918918    // wrapped IMachine properties
    919919    HRESULT getParent(ComPtr<IVirtualBox> &aParent);
     920    HRESULT getPlatform(ComPtr<IPlatform> &aPlatform);
    920921    HRESULT getIcon(std::vector<BYTE> &aIcon);
    921922    HRESULT setIcon(const std::vector<BYTE> &aIcon);
     
    952953    HRESULT setPageFusionEnabled(BOOL aPageFusionEnabled);
    953954    HRESULT getGraphicsAdapter(ComPtr<IGraphicsAdapter> &aGraphicsAdapter);
    954     HRESULT getBIOSSettings(ComPtr<IBIOSSettings> &aBIOSSettings);
     955    HRESULT getFirmwareSettings(ComPtr<IFirmwareSettings> &aFirmwareSettings);
    955956    HRESULT getTrustedPlatformModule(ComPtr<ITrustedPlatformModule> &aTrustedPlatformModule);
    956957    HRESULT getNonVolatileStore(ComPtr<INvramStore> &aNvramStore);
    957958    HRESULT getRecordingSettings(ComPtr<IRecordingSettings> &aRecordingSettings);
    958     HRESULT getFirmwareType(FirmwareType_T *aFirmwareType);
    959     HRESULT setFirmwareType(FirmwareType_T aFirmwareType);
    960959    HRESULT getPointingHIDType(PointingHIDType_T *aPointingHIDType);
    961960    HRESULT setPointingHIDType(PointingHIDType_T aPointingHIDType);
    962961    HRESULT getKeyboardHIDType(KeyboardHIDType_T *aKeyboardHIDType);
    963962    HRESULT setKeyboardHIDType(KeyboardHIDType_T aKeyboardHIDType);
    964     HRESULT getHPETEnabled(BOOL *aHPETEnabled);
    965     HRESULT setHPETEnabled(BOOL aHPETEnabled);
    966     HRESULT getChipsetType(ChipsetType_T *aChipsetType);
    967     HRESULT setChipsetType(ChipsetType_T aChipsetType);
    968     HRESULT getIommuType(IommuType_T *aIommuType);
    969     HRESULT setIommuType(IommuType_T aIommuType);
    970963    HRESULT getSnapshotFolder(com::Utf8Str &aSnapshotFolder);
    971964    HRESULT setSnapshotFolder(const com::Utf8Str &aSnapshotFolder);
     
    10111004    HRESULT getParavirtDebug(com::Utf8Str &aParavirtDebug);
    10121005    HRESULT setParavirtDebug(const com::Utf8Str &aParavirtDebug);
    1013     HRESULT getRTCUseUTC(BOOL *aRTCUseUTC);
    1014     HRESULT setRTCUseUTC(BOOL aRTCUseUTC);
    10151006    HRESULT getIOCacheEnabled(BOOL *aIOCacheEnabled);
    10161007    HRESULT setIOCacheEnabled(BOOL aIOCacheEnabled);
     
    11451136    HRESULT setExtraData(const com::Utf8Str &aKey,
    11461137                         const com::Utf8Str &aValue);
    1147     HRESULT getCPUProperty(CPUPropertyType_T aProperty,
    1148                            BOOL *aValue);
    1149     HRESULT setCPUProperty(CPUPropertyType_T aProperty,
    1150                            BOOL aValue);
    1151     HRESULT getCPUIDLeafByOrdinal(ULONG aOrdinal,
    1152                                   ULONG *aIdx,
    1153                                   ULONG *aSubIdx,
    1154                                   ULONG *aValEax,
    1155                                   ULONG *aValEbx,
    1156                                   ULONG *aValEcx,
    1157                                   ULONG *aValEdx);
    1158     HRESULT getCPUIDLeaf(ULONG aIdx, ULONG aSubIdx,
    1159                          ULONG *aValEax,
    1160                          ULONG *aValEbx,
    1161                          ULONG *aValEcx,
    1162                          ULONG *aValEdx);
    1163     HRESULT setCPUIDLeaf(ULONG aIdx, ULONG aSubIdx,
    1164                          ULONG aValEax,
    1165                          ULONG aValEbx,
    1166                          ULONG aValEcx,
    1167                          ULONG aValEdx);
    1168     HRESULT removeCPUIDLeaf(ULONG aIdx, ULONG aSubIdx);
    1169     HRESULT removeAllCPUIDLeaves();
    1170     HRESULT getHWVirtExProperty(HWVirtExPropertyType_T aProperty,
    1171                                 BOOL *aValue);
    1172     HRESULT setHWVirtExProperty(HWVirtExPropertyType_T aProperty,
    1173                                 BOOL aValue);
    11741138    HRESULT setSettingsFilePath(const com::Utf8Str &aSettingsFilePath,
    11751139                                ComPtr<IProgress> &aProgress);
  • trunk/src/VBox/Main/include/SerialPortImpl.h

    r98103 r101035  
    8686    HRESULT getIRQ(ULONG *aIRQ);
    8787    HRESULT setIRQ(ULONG aIRQ);
    88     HRESULT getIOBase(ULONG *aIOBase);
    89     HRESULT setIOBase(ULONG aIOBase);
     88    HRESULT getIOAddress(ULONG *aIOAddress);
     89    HRESULT setIOAddress(ULONG aIOAddress);
    9090    HRESULT getServer(BOOL *aServer);
    9191    HRESULT setServer(BOOL aServer);
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r98103 r101035  
    3838
    3939class CPUProfile;
     40class PlatformProperties;
    4041
    4142namespace settings
     
    8485    HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors) RT_OVERRIDE;
    8586    HRESULT getInfoVDSize(LONG64 *aInfoVDSize) RT_OVERRIDE;
    86     HRESULT getSerialPortCount(ULONG *aSerialPortCount) RT_OVERRIDE;
    87     HRESULT getParallelPortCount(ULONG *aParallelPortCount) RT_OVERRIDE;
    88     HRESULT getMaxBootPosition(ULONG *aMaxBootPosition) RT_OVERRIDE;
    89     HRESULT getRawModeSupported(BOOL *aRawModeSupported) RT_OVERRIDE;
    90     HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt) RT_OVERRIDE;
    91     HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt) RT_OVERRIDE;
    9287    HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder) RT_OVERRIDE;
    9388    HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder) RT_OVERRIDE;
     
    123118    HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend) RT_OVERRIDE;
    124119    HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats) RT_OVERRIDE;
     120    HRESULT getPlatform(ComPtr<IPlatformProperties> &aPlatformProperties) RT_OVERRIDE;
    125121    HRESULT getProxyMode(ProxyMode_T *pProxyMode) RT_OVERRIDE;
    126122    HRESULT setProxyMode(ProxyMode_T aProxyMode) RT_OVERRIDE;
    127123    HRESULT getProxyURL(com::Utf8Str &aProxyURL) RT_OVERRIDE;
    128124    HRESULT setProxyURL(const com::Utf8Str &aProxyURL) RT_OVERRIDE;
    129     HRESULT getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders) RT_OVERRIDE;
    130125    HRESULT getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes) RT_OVERRIDE;
    131126    HRESULT getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes) RT_OVERRIDE;
    132     HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) RT_OVERRIDE;
    133127    HRESULT getSupportedPointingHIDTypes(std::vector<PointingHIDType_T> &aSupportedPointingHIDTypes) RT_OVERRIDE;
    134128    HRESULT getSupportedKeyboardHIDTypes(std::vector<KeyboardHIDType_T> &aSupportedKeyboardHIDTypes) RT_OVERRIDE;
     
    142136    HRESULT getSupportedRecordingARCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingAudioRateControlModes) RT_OVERRIDE;
    143137    HRESULT getSupportedRecordingVRCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingVideoRateControlModes) RT_OVERRIDE;
    144     HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE;
    145138    HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) RT_OVERRIDE;
    146139    HRESULT getSupportedAutostopTypes(std::vector<AutostopType_T> &aSupportedAutostopTypes) RT_OVERRIDE;
    147140    HRESULT getSupportedVMProcPriorities(std::vector<VMProcPriority_T> &aSupportedVMProcPriorities) RT_OVERRIDE;
    148141    HRESULT getSupportedNetworkAttachmentTypes(std::vector<NetworkAttachmentType_T> &aSupportedNetworkAttachmentTypes) RT_OVERRIDE;
    149     HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) RT_OVERRIDE;
    150142    HRESULT getSupportedPortModes(std::vector<PortMode_T> &aSupportedPortModes) RT_OVERRIDE;
    151     HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) RT_OVERRIDE;
    152     HRESULT getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes) RT_OVERRIDE;
    153143    HRESULT getSupportedAudioDriverTypes(std::vector<AudioDriverType_T> &aSupportedAudioDriverTypes) RT_OVERRIDE;
    154     HRESULT getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) RT_OVERRIDE;
    155     HRESULT getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) RT_OVERRIDE;
    156     HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) RT_OVERRIDE;
    157     HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) RT_OVERRIDE;
    158     HRESULT getSupportedIommuTypes(std::vector<IommuType_T> &aSupportedIommuTypes) RT_OVERRIDE;
    159     HRESULT getSupportedTpmTypes(std::vector<TpmType_T> &aSupportedTpmTypes) RT_OVERRIDE;
    160144    HRESULT getLanguageId(com::Utf8Str &aLanguageId) RT_OVERRIDE;
    161145    HRESULT setLanguageId(const com::Utf8Str &aLanguageId) RT_OVERRIDE;
    162146
    163147    // wrapped ISystemProperties methods
    164     HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
    165                                   ULONG *aMaxNetworkAdapters) RT_OVERRIDE;
    166     HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
    167                                         NetworkAttachmentType_T aType,
    168                                         ULONG *aMaxNetworkAdapters) RT_OVERRIDE;
    169     HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
    170                                               ULONG *aMaxDevicesPerPort) RT_OVERRIDE;
    171     HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
    172                                          ULONG *aMinPortCount) RT_OVERRIDE;
    173     HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
    174                                          ULONG *aMaxPortCount) RT_OVERRIDE;
    175     HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
    176                                         StorageBus_T aBus,
    177                                         ULONG *aMaxInstances) RT_OVERRIDE;
    178     HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
    179                                         std::vector<DeviceType_T> &aDeviceTypes) RT_OVERRIDE;
    180     HRESULT getStorageBusForStorageControllerType(StorageControllerType_T aStorageControllerType,
    181                                                   StorageBus_T *aStorageBus) RT_OVERRIDE;
    182     HRESULT getStorageControllerTypesForStorageBus(StorageBus_T aStorageBus,
    183                                                    std::vector<StorageControllerType_T> &aStorageControllerTypes) RT_OVERRIDE;
    184148    HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
    185149                                                         BOOL *aEnabled) RT_OVERRIDE;
    186     HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
    187                                                BOOL *aHotplugCapable) RT_OVERRIDE;
    188     HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
    189                                                USBControllerType_T aType,
    190                                                ULONG *aMaxInstances) RT_OVERRIDE;
    191150    HRESULT getCPUProfiles(CPUArchitecture_T aArchitecture, const com::Utf8Str &aNamePattern,
    192151                           std::vector<ComPtr<ICPUProfile> > &aProfiles) RT_OVERRIDE;
     
    211170    MediumFormatList m_llMediumFormats;
    212171
    213     bool                m_fLoadedX86CPUProfiles;    /**< Set if we've loaded the x86 and AMD64 CPU profiles. */
    214     CPUProfileList_T    m_llCPUProfiles;            /**< List of loaded CPU profiles. */
     172    ComObjPtr<PlatformProperties> const m_platformProperties;       /**< The host's platform properties. */
     173    bool                                m_fLoadedX86CPUProfiles;    /**< Set if we've loaded the x86 and AMD64 CPU profiles. */
     174    CPUProfileList_T                    m_llCPUProfiles;            /**< List of loaded CPU profiles. */
    215175
    216176    friend class VirtualBox;
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r100737 r101035  
    338338    HRESULT getSettingsFilePath(com::Utf8Str &aSettingsFilePath);
    339339    HRESULT getHost(ComPtr<IHost> &aHost);
     340    HRESULT getPlatformProperties(PlatformArchitecture_T platformArchitecture, ComPtr<IPlatformProperties> &aPlatformProperties);
    340341    HRESULT getSystemProperties(ComPtr<ISystemProperties> &aSystemProperties);
    341342    HRESULT getMachines(std::vector<ComPtr<IMachine> > &aMachines);
     
    366367    HRESULT createMachine(const com::Utf8Str &aSettingsFile,
    367368                          const com::Utf8Str &aName,
     369                          PlatformArchitecture_T aArchitecture,
    368370                          const std::vector<com::Utf8Str> &aGroups,
    369371                          const com::Utf8Str &aOsTypeId,
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