VirtualBox

Changeset 65299 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 15, 2017 5:50:11 PM (8 years ago)
Author:
vboxsync
Message:

PGM,PDM: Added API for reducing the size a MMIO2 or pre-registered MMIO region when loading saved state.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r64327 r65299  
    17201720/** The display connector is resizing. */
    17211721#define VINF_VGA_RESIZE_IN_PROGRESS                 (3501)
     1722/** Unexpected PCI region change during VGA saved state loading. */
     1723#define VERR_VGA_UNEXPECTED_PCI_REGION_LOAD_CHANGE  (-3502)
    17221724/** @} */
    17231725
  • trunk/include/VBox/vmm/pdmdev.h

    r65101 r65299  
    18761876
    18771877/** Current PDMDEVHLPR3 version number.
    1878  * @todo Next major revision should add piBus to pfnPCIBusRegister.  */
    1879 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 19, 1)
     1878 * @todo Next major revision should add piBus to pfnPCIBusRegister, and move
     1879 *       pfnMMIOExReduce up to after pfnMMIOExUnmap. */
     1880#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 19, 2)
    18801881//#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 20, 0)
    18811882
     
    32653266    DECLR3CALLBACKMEMBER(VMRESUMEREASON, pfnVMGetResumeReason,(PPDMDEVINS pDevIns));
    32663267
     3268    /**
     3269     * Reduces the length of a MMIO2 or pre-registered MMIO range.
     3270     *
     3271     * This is for implementations of PDMPCIDEV::pfnRegionLoadChangeHookR3 and will
     3272     * only work during saved state restore.  It will not call the PCI bus code, as
     3273     * that is expected to restore the saved resource configuration.
     3274     *
     3275     * It just adjusts the mapping length of the region so that when pfnMMIOExMap is
     3276     * called it will only map @a cbRegion bytes and not the value set during
     3277     * registration.
     3278     *
     3279     * @return VBox status code.
     3280     * @param   pDevIns             The device owning the range.
     3281     * @param   pPciDev             The PCI device the region is associated with, or
     3282     *                              NULL if not associated with any.
     3283     * @param   iRegion             The region.
     3284     * @param   cbRegion            The new size, must be smaller.
     3285     */
     3286    DECLR3CALLBACKMEMBER(int, pfnMMIOExReduce,(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cbRegion));
     3287
    32673288    /** Space reserved for future members.
    32683289     * @{ */
    3269     DECLR3CALLBACKMEMBER(void, pfnReserved1,(void));
    32703290    DECLR3CALLBACKMEMBER(void, pfnReserved2,(void));
    32713291    DECLR3CALLBACKMEMBER(void, pfnReserved3,(void));
     
    43844404{
    43854405    return pDevIns->pHlpR3->pfnMMIOExUnmap(pDevIns, pPciDev, iRegion, GCPhys);
     4406}
     4407
     4408/**
     4409 * @copydoc PDMDEVHLPR3::pfnMMIOExReduce
     4410 */
     4411DECLINLINE(int) PDMDevHlpMMIOExReduce(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cbRegion)
     4412{
     4413    return pDevIns->pHlpR3->pfnMMIOExReduce(pDevIns, pPciDev, iRegion, cbRegion);
    43864414}
    43874415
  • trunk/include/VBox/vmm/pgm.h

    r64373 r65299  
    747747VMMR3DECL(int)      PGMR3PhysMMIOExMap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS GCPhys);
    748748VMMR3DECL(int)      PGMR3PhysMMIOExUnmap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS GCPhys);
     749VMMR3_INT_DECL(int) PGMR3PhysMMIOExReduce(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cbRegion);
    749750VMMR3DECL(bool)     PGMR3PhysMMIOExIsBase(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys);
    750751VMMR3_INT_DECL(int) PGMR3PhysMMIO2GetHCPhys(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS off, PRTHCPHYS pHCPhys);
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