VirtualBox

Changeset 106022 in vbox for trunk/include


Ignore:
Timestamp:
Sep 12, 2024 9:44:36 AM (3 months ago)
Author:
vboxsync
Message:

VMM/PDM: Added PDMR3DriverEnumInstances for use by Console::i_onNATDnsChanged, introducing a read/write lock for the core PDM lists (devices, drivers, usb devices, and more). Medium risk since it involves new locking.

Location:
trunk/include/VBox/vmm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmapi.h

    r98103 r106022  
    169169VMMR3DECL(int)          PDMR3QueryDriverOnLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun,
    170170                                              const char *pszDriver, PPPDMIBASE ppBase);
     171
    171172VMMR3DECL(int)          PDMR3DeviceAttach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags,
    172173                                          PPDMIBASE *ppBase);
     
    180181                                            const char *pszDriver, unsigned iOccurrence, uint32_t fFlags, PCFGMNODE pCfg,
    181182                                            PPPDMIBASE ppBase);
     183/**
     184 * Driver instance enumeration callback function.
     185 *
     186 * @returns VBox status code. Failures will stop the enumeration and be
     187 *          returned, informational statuses will be ignored and not returned.
     188 * @param   pIBase          The base interface of the driver.
     189 * @param   uDrvInstance    The driver instance number.
     190 * @param   fUsbDev         Set if @a pszDevice is a USB device, clear if a
     191 *                          regular device.
     192 * @param   pszDevice       The device the driver is attached to.
     193 * @param   uDevInstance    The device instance number.
     194 * @param   uLun            The LUN on the device this instance is attached to.
     195 * @param   pvUser          User argument.
     196 *
     197 * @note    Called owning the core PDM list lock in shared mode.
     198 */
     199typedef DECLCALLBACKTYPE(int, FNPDMENUMDRVINS,(PPDMIBASE pIBase, uint32_t uDrvInstance, bool fUsbDev, const char *pszDevice,
     200                                               uint32_t uDevInstance, unsigned uLun, void *pvUser));
     201/** Pointer to a FNPDMENUMDRVINS() function. */
     202typedef FNPDMENUMDRVINS *PFNPDMENUMDRVINS;
     203VMMR3DECL(int)          PDMR3DriverEnumInstances(PUVM pUVM, const char *pszDriver, PFNPDMENUMDRVINS pfnCallback, void *pvUser);
     204
    182205VMMR3DECL(void)         PDMR3DmaRun(PVM pVM);
    183206
  • trunk/include/VBox/vmm/vm.h

    r105673 r106022  
    14121412        struct PDM s;
    14131413#endif
    1414         uint8_t     padding[22400];     /* multiple of 64 */
     1414        uint8_t     padding[22528];     /* multiple of 64 */
    14151415    } pdm;
    14161416
     
    15741574
    15751575    /** Padding for aligning the structure size on a page boundrary. */
    1576     uint8_t         abAlignment2[0x3A80 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
     1576    uint8_t         abAlignment2[0x3A00 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];
    15771577
    15781578    /* ---- end small stuff ---- */
  • trunk/include/VBox/vmm/vm.mac

    r105227 r106022  
    157157    .mm                     resb 192
    158158    alignb 64
    159     .pdm                    resb 22400
     159    .pdm                    resb 22528
    160160    alignb 64
    161161    .iom                    resb 1152
  • trunk/include/VBox/vmm/vmmr3vtable-def.h

    r100184 r106022  
    639639VTABLE_ENTRY(PDMR3UsbQueryDriverOnLun)
    640640
    641 VTABLE_RESERVED(pfnPDMR3Reserved1)
     641VTABLE_ENTRY(PDMR3DriverEnumInstances)
     642
    642643VTABLE_RESERVED(pfnPDMR3Reserved2)
    643644VTABLE_RESERVED(pfnPDMR3Reserved3)
  • trunk/include/VBox/vmm/vmmr3vtable.h

    r100184 r106022  
    7272
    7373/** Magic and version for the VMM vtable.  (Magic: Emmet Cohen)   */
    74 #define VMMR3VTABLE_MAGIC_VERSION         RT_MAKE_U64(0x19900525, 0x00050000)
     74#define VMMR3VTABLE_MAGIC_VERSION         RT_MAKE_U64(0x19900525, 0x00050001)
    7575/** Compatibility mask: These bits must match - magic and major version. */
    7676#define VMMR3VTABLE_MAGIC_VERSION_MASK    RT_MAKE_U64(0xffffffff, 0xffff0000)
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