VirtualBox

Changeset 100038 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 1, 2023 6:18:08 PM (20 months ago)
Author:
vboxsync
Message:

Main: Start simple ResourceStore implementation similar to NvramStore but without all the file loading and saving as it will contain only resources created on the fly when the VM is created, bugref:10467

Location:
trunk/src/VBox/Main
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r99941 r100038  
    11681168        src-client/MouseImpl.cpp \
    11691169        src-client/RemoteUSBDeviceImpl.cpp \
     1170        $(if $(VBOX_WITH_VIRT_ARMV8),src-client/ResourceStoreImpl.cpp,) \
    11701171        src-client/SessionImpl.cpp \
    11711172        src-client/USBDeviceImpl.cpp \
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r99991 r100038  
    65186518  </interface>
    65196519
     6520  <interface
     6521    name="IResourceStore" extends="$unknown"
     6522    uuid="d96a2540-8aab-4c71-8af9-95379f23b23d"
     6523    wsmap="managed"
     6524    >
     6525
     6526    <desc>
     6527      Provides access to resources accessed by various device implementations and created when the VM
     6528      is started (only the FDT currently). This is not accessible from anywhere right now but just for
     6529      convenience if required later on.
     6530    </desc>
     6531
     6532    <attribute name="midlDoesNotLikeEmptyInterfaces" readonly="yes" type="boolean"/>
     6533
     6534  </interface>
     6535
    65206536  <enum
    65216537    name="GraphicsControllerType"
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r99913 r100038  
    7777class VMPowerDownTask;
    7878class NvramStore;
     79#ifdef VBOX_WITH_VIRT_ARMV8
     80class ResourceStore;
     81#endif
    7982
    8083#include <iprt/uuid.h>
     
    10141017    const ComObjPtr<EmulatedUSB> mEmulatedUSB;
    10151018    const ComObjPtr<NvramStore> mptrNvramStore;
     1019#ifdef VBOX_WITH_VIRT_ARMV8
     1020    const ComObjPtr<ResourceStore> mptrResourceStore;
     1021#endif
    10161022
    10171023    USBDeviceList mUSBDevices;
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r99970 r100038  
    8888#include "EmulatedUSBImpl.h"
    8989#include "NvramStoreImpl.h"
     90#ifdef VBOX_WITH_VIRT_ARMV8
     91# include "ResourceStoreImpl.h"
     92#endif
    9093#include "StringifyEnums.h"
    9194
     
    558561        AssertComRCReturnRC(hrc);
    559562
     563#ifdef VBOX_WITH_VIRT_ARMV8
     564        unconst(mptrResourceStore).createObject();
     565        hrc = mptrResourceStore->init(this);
     566        AssertComRCReturnRC(hrc);
     567#endif
     568
    560569        hrc = mMachine->COMGETTER(VRDEServer)(unconst(mVRDEServer).asOutParam());
    561570        AssertComRCReturnRC(hrc);
     
    869878
    870879    unconst(mVRDEServer).setNull();
     880
     881#ifdef VBOX_WITH_VIRT_ARMV8
     882    if (mptrResourceStore)
     883    {
     884        mptrResourceStore->uninit();
     885        unconst(mptrResourceStore).setNull();
     886    }
     887#endif
    871888
    872889    unconst(mControl).setNull();
     
    1163711654    }
    1163811655
     11656#ifdef VBOX_WITH_VIRT_ARMV8
     11657    if (UuidCopy == COM_IIDOF(IResourceStore))
     11658    {
     11659        ResourceStore *pResourceStore = static_cast<ResourceStore *>(pConsole->mptrResourceStore);
     11660        return pResourceStore;
     11661    }
     11662#endif
     11663
    1163911664    if (UuidCopy == VMMDEV_OID)
    1164011665        return pConsole->m_pVMMDev;
  • trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp

    r98275 r100038  
    5252#ifdef VBOX_WITH_PCI_PASSTHROUGH
    5353# include "PCIRawDevImpl.h"
     54#endif
     55#ifdef VBOX_WITH_VIRT_ARMV8
     56# include "ResourceStoreImpl.h"
    5457#endif
    5558
     
    120123        return vrc;
    121124
     125#ifdef VBOX_WITH_VIRT_ARMV8
     126    vrc = pCallbacks->pfnRegister(pCallbacks, &ResourceStore::DrvReg);
     127    if (RT_FAILURE(vrc))
     128        return vrc;
     129#endif
     130
    122131    return VINF_SUCCESS;
    123132}
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