Changeset 82316 in vbox
- Timestamp:
- Dec 2, 2019 12:06:08 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
include/VBox/vmm/mm.h (modified) (1 diff)
-
include/VBox/vmm/pdmdev.h (modified) (2 diffs)
-
include/VBox/vmm/pgm.h (modified) (1 diff)
-
src/VBox/VMM/VMMR3/PDM.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMR3/PDMDevHlp.cpp (modified) (6 diffs)
-
src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp (modified) (4 diffs)
-
src/VBox/VMM/VMMR3/PGMPhys.cpp (modified) (41 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/mm.h
r80281 r82316 264 264 VMMR3DECL(int) MMR3HyperMapHCPhys(PVM pVM, void *pvR3, RTR0PTR pvR0, RTHCPHYS HCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr); 265 265 VMMR3DECL(int) MMR3HyperMapGCPhys(PVM pVM, RTGCPHYS GCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr); 266 VMMR3DECL(int) MMR3HyperMapMMIO2(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTRCPTR pRCPtr);267 266 VMMR3DECL(int) MMR3HyperReserve(PVM pVM, unsigned cb, const char *pszDesc, PRTGCPTR pGCPtr); 268 267 #endif -
trunk/include/VBox/vmm/pdmdev.h
r82313 r82316 1164 1164 1165 1165 /** Current PDMPCIHLPR0 version number. */ 1166 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 4, 0)1166 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 5, 0) 1167 1167 1168 1168 /** … … 1203 1203 */ 1204 1204 DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc)); 1205 1206 /**1207 * Checks if the given address is an MMIO2 or pre-registered MMIO base address.1208 *1209 * @returns true/false accordingly.1210 * @param pDevIns The PCI device instance.1211 * @param pOwner The owner of the memory, optional.1212 * @param GCPhys The address to check.1213 * @sa PGMR3PhysMMIOExIsBase1214 */1215 DECLR3CALLBACKMEMBER(bool, pfnIsMMIOExBase,(PPDMDEVINS pDevIns, PPDMDEVINS pOwner, RTGCPHYS GCPhys));1216 1205 1217 1206 /** -
trunk/include/VBox/vmm/pgm.h
r82094 r82316 726 726 RTR3PTR pvUserR3, RTR0PTR pvUserR0, RTRCPTR pvUserRC, const char *pszDesc); 727 727 VMMR3DECL(int) PGMR3PhysMMIODeregister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb); 728 VMMR3_INT_DECL(int) PGMR3PhysM MIO2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb,728 VMMR3_INT_DECL(int) PGMR3PhysMmio2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb, 729 729 uint32_t fFlags, const char *pszDesc, void **ppv, PGMMMIO2HANDLE *phRegion); 730 VMMR3_INT_DECL(int) PGMR3PhysM MIOExDeregister(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2);731 VMMR3_INT_DECL(int) PGMR3PhysM MIOExMap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys);732 VMMR3_INT_DECL(int) PGMR3PhysM MIOExUnmap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys);733 VMMR3_INT_DECL(int) PGMR3PhysM MIOExReduce(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion);730 VMMR3_INT_DECL(int) PGMR3PhysMmio2Deregister(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2); 731 VMMR3_INT_DECL(int) PGMR3PhysMmio2Map(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys); 732 VMMR3_INT_DECL(int) PGMR3PhysMmio2Unmap(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys); 733 VMMR3_INT_DECL(int) PGMR3PhysMmio2Reduce(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion); 734 734 VMMR3_INT_DECL(int) PGMR3PhysMmio2ValidateHandle(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2); 735 735 VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysMmio2GetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2); 736 VMMR3_INT_DECL(int) PGMR3PhysMMIOExChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion); 737 VMMR3DECL(bool) PGMR3PhysMMIOExIsBase(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys); 736 VMMR3_INT_DECL(int) PGMR3PhysMmio2ChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion); 738 737 VMMR3_INT_DECL(int) PGMR3PhysMMIO2GetHCPhys(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS off, PRTHCPHYS pHCPhys); 739 VMMR3_INT_DECL(int) PGMR3PhysMMIO2MapKernel(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTR0PTR pR0Ptr);740 738 741 739 -
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r82261 r82316 837 837 pdmR3ThreadDestroyDevice(pVM, pDevIns); 838 838 PDMR3QueueDestroyDevice(pVM, pDevIns); 839 PGMR3PhysM MIOExDeregister(pVM, pDevIns, UINT32_MAX, UINT32_MAX, NIL_PGMMMIO2HANDLE);839 PGMR3PhysMmio2Deregister(pVM, pDevIns, NIL_PGMMMIO2HANDLE); 840 840 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 841 841 pdmR3AsyncCompletionTemplateDestroyDevice(pVM, pDevIns); -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r82313 r82316 237 237 AssertReturn(!(iPciRegion & UINT16_MAX), VERR_INVALID_PARAMETER); /* not implemented. */ 238 238 239 /** @todo PGMR3PhysM MIO2Register mangles the description, move it here and239 /** @todo PGMR3PhysMmio2Register mangles the description, move it here and 240 240 * use a real string cache. */ 241 int rc = PGMR3PhysM MIO2Register(pVM, pDevIns, pPciDev ? pPciDev->Int.s.idxDevCfg : 254, iPciRegion >> 16,241 int rc = PGMR3PhysMmio2Register(pVM, pDevIns, pPciDev ? pPciDev->Int.s.idxDevCfg : 254, iPciRegion >> 16, 242 242 cbRegion, fFlags, pszDesc, ppvMapping, phRegion); 243 243 … … 261 261 ("state %s, expected DESTROYING or LOADING\n", VMGetStateName(pVM->enmVMState)), VERR_VM_INVALID_VM_STATE); 262 262 263 int rc = PGMR3PhysM MIOExDeregister(pDevIns->Internal.s.pVMR3, pDevIns, UINT32_MAX, UINT32_MAX, hRegion);263 int rc = PGMR3PhysMmio2Deregister(pDevIns->Internal.s.pVMR3, pDevIns, hRegion); 264 264 265 265 LogFlow(("pdmR3DevHlp_Mmio2Destroy: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 277 277 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 278 278 279 int rc = PGMR3PhysM MIOExMap(pDevIns->Internal.s.pVMR3, pDevIns, UINT32_MAX, UINT32_MAX, hRegion, GCPhys);279 int rc = PGMR3PhysMmio2Map(pDevIns->Internal.s.pVMR3, pDevIns, hRegion, GCPhys); 280 280 281 281 LogFlow(("pdmR3DevHlp_Mmio2Map: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 293 293 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 294 294 295 int rc = PGMR3PhysM MIOExUnmap(pDevIns->Internal.s.pVMR3, pDevIns, UINT32_MAX, UINT32_MAX, hRegion, NIL_RTGCPHYS);295 int rc = PGMR3PhysMmio2Unmap(pDevIns->Internal.s.pVMR3, pDevIns, hRegion, NIL_RTGCPHYS); 296 296 297 297 LogFlow(("pdmR3DevHlp_Mmio2Unmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 309 309 VM_ASSERT_STATE_RETURN(pVM, VMSTATE_LOADING, VERR_VM_INVALID_VM_STATE); 310 310 311 int rc = PGMR3PhysM MIOExReduce(pDevIns->Internal.s.pVMR3, pDevIns, UINT32_MAX, UINT32_MAX, hRegion, cbRegion);311 int rc = PGMR3PhysMmio2Reduce(pDevIns->Internal.s.pVMR3, pDevIns, hRegion, cbRegion); 312 312 313 313 LogFlow(("pdmR3DevHlp_Mmio2Reduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 340 340 VM_ASSERT_EMT0_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 341 341 342 int rc = PGMR3PhysM MIOExChangeRegionNo(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hRegion, iNewRegion);342 int rc = PGMR3PhysMmio2ChangeRegionNo(pVM, pDevIns, hRegion, iNewRegion); 343 343 344 344 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); -
trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
r81961 r82316 169 169 } 170 170 171 171 172 /** @interface_method_impl{PDMPCIHLPR3,pfnIoApicSetIrq} */ 172 173 static DECLCALLBACK(void) pdmR3PciHlp_IoApicSetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc) … … 177 178 } 178 179 180 179 181 /** @interface_method_impl{PDMPCIHLPR3,pfnIoApicSendMsi} */ 180 182 static DECLCALLBACK(void) pdmR3PciHlp_IoApicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc) … … 183 185 Log4(("pdmR3PciHlp_IoApicSendMsi: address=%p value=%x uTagSrc=%#x\n", GCPhys, uValue, uTagSrc)); 184 186 PDMIoApicSendMsi(pDevIns->Internal.s.pVMR3, GCPhys, uValue, uTagSrc); 185 }186 187 /** @interface_method_impl{PDMPCIHLPR3,pfnIsMMIOExBase} */188 static DECLCALLBACK(bool) pdmR3PciHlp_IsMMIO2Base(PPDMDEVINS pDevIns, PPDMDEVINS pOwner, RTGCPHYS GCPhys)189 {190 PDMDEV_ASSERT_DEVINS(pDevIns);191 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);192 bool fRc = PGMR3PhysMMIOExIsBase(pDevIns->Internal.s.pVMR3, pOwner, GCPhys);193 Log4(("pdmR3PciHlp_IsMMIOExBase: pOwner=%p GCPhys=%RGp -> %RTbool\n", pOwner, GCPhys, fRc));194 return fRc;195 187 } 196 188 … … 235 227 pdmR3PciHlp_IoApicSetIrq, 236 228 pdmR3PciHlp_IoApicSendMsi, 237 pdmR3PciHlp_IsMMIO2Base,238 229 pdmR3PciHlp_Lock, 239 230 pdmR3PciHlp_Unlock, -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r82313 r82316 2602 2602 * @a iRegion. 2603 2603 */ 2604 DECLINLINE(PPGMREGMMIO2RANGE) pgmR3PhysM MIOExFind(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev,2605 uint32_t iRegion, PGMMMIO2HANDLE hMmio2)2604 DECLINLINE(PPGMREGMMIO2RANGE) pgmR3PhysMmio2Find(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, 2605 uint32_t iRegion, PGMMMIO2HANDLE hMmio2) 2606 2606 { 2607 2607 if (hMmio2 != NIL_PGMMMIO2HANDLE) … … 2650 2650 * @sa pgmR3PhysRamRangeRelocate 2651 2651 */ 2652 static DECLCALLBACK(bool) pgmR3PhysM MIOExRangeRelocate(PVM pVM, RTGCPTR GCPtrOld, RTGCPTR GCPtrNew,2653 PGMRELOCATECALL enmMode, void *pvUser)2652 static DECLCALLBACK(bool) pgmR3PhysMmio2RangeRelocate(PVM pVM, RTGCPTR GCPtrOld, RTGCPTR GCPtrNew, 2653 PGMRELOCATECALL enmMode, void *pvUser) 2654 2654 { 2655 2655 PPGMREGMMIO2RANGE pMmio = (PPGMREGMMIO2RANGE)pvUser; … … 2696 2696 * @param pcbChunk Where to return the guest mapping size for a chunk. 2697 2697 */ 2698 static uint16_t pgmR3PhysM MIOExCalcChunkCount(PVM pVM, RTGCPHYS cb, uint32_t *pcPagesPerChunk, uint32_t *pcbChunk)2698 static uint16_t pgmR3PhysMmio2CalcChunkCount(PVM pVM, RTGCPHYS cb, uint32_t *pcPagesPerChunk, uint32_t *pcbChunk) 2699 2699 { 2700 2700 RT_NOREF_PV(pVM); /* without raw mode */ … … 2731 2731 * Caller must set type specfic members and initialize the PGMPAGE structures. 2732 2732 * 2733 * This was previously also used by PGMR3PhysM MIOExPreRegister, a function for2733 * This was previously also used by PGMR3PhysMmio2PreRegister, a function for 2734 2734 * pre-registering MMIO that was later (6.1) replaced by a new handle based IOM 2735 2735 * interface. The reference to caller and type above is purely historical. … … 2750 2750 * @thread EMT 2751 2751 */ 2752 static int pgmR3PhysM MIOExCreate(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb,2753 const char *pszDesc, PPGMREGMMIO2RANGE *ppHeadRet)2752 static int pgmR3PhysMmio2Create(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb, 2753 const char *pszDesc, PPGMREGMMIO2RANGE *ppHeadRet) 2754 2754 { 2755 2755 /* … … 2757 2757 */ 2758 2758 uint32_t cPagesPerChunk; 2759 uint16_t cChunks = pgmR3PhysM MIOExCalcChunkCount(pVM, cb, &cPagesPerChunk, NULL);2759 uint16_t cChunks = pgmR3PhysMmio2CalcChunkCount(pVM, cb, &cPagesPerChunk, NULL); 2760 2760 AssertReturn(cChunks, VERR_PGM_PHYS_MMIO_EX_IPE); 2761 2761 … … 2877 2877 2878 2878 /** 2879 * Common worker PGMR3PhysM MIOExPreRegister & PGMR3PhysMMIO2Register that links2880 * acomplete registration entry into the lists and lookup tables.2879 * Common worker PGMR3PhysMmio2PreRegister & PGMR3PhysMMIO2Register that links a 2880 * complete registration entry into the lists and lookup tables. 2881 2881 * 2882 2882 * @param pVM The cross context VM structure. 2883 2883 * @param pNew The new MMIO / MMIO2 registration to link. 2884 2884 */ 2885 static void pgmR3PhysM MIOExLink(PVM pVM, PPGMREGMMIO2RANGE pNew)2885 static void pgmR3PhysMmio2Link(PVM pVM, PPGMREGMMIO2RANGE pNew) 2886 2886 { 2887 2887 /* … … 2968 2968 * @thread EMT 2969 2969 */ 2970 VMMR3_INT_DECL(int) PGMR3PhysM MIO2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb,2970 VMMR3_INT_DECL(int) PGMR3PhysMmio2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb, 2971 2971 uint32_t fFlags, const char *pszDesc, void **ppv, PGMMMIO2HANDLE *phRegion) 2972 2972 { … … 2987 2987 AssertPtrReturn(pszDesc, VERR_INVALID_POINTER); 2988 2988 AssertReturn(*pszDesc, VERR_INVALID_PARAMETER); 2989 AssertReturn(pgmR3PhysM MIOExFind(pVM, pDevIns, iSubDev, iRegion, NIL_PGMMMIO2HANDLE) == NULL, VERR_ALREADY_EXISTS);2989 AssertReturn(pgmR3PhysMmio2Find(pVM, pDevIns, iSubDev, iRegion, NIL_PGMMMIO2HANDLE) == NULL, VERR_ALREADY_EXISTS); 2990 2990 AssertReturn(!(cb & PAGE_OFFSET_MASK), VERR_INVALID_PARAMETER); 2991 2991 AssertReturn(cb, VERR_INVALID_PARAMETER); … … 3012 3012 * the IDs goes from 1 thru PGM_MMIO2_MAX_RANGES. 3013 3013 */ 3014 unsigned cChunks = pgmR3PhysM MIOExCalcChunkCount(pVM, cb, NULL, NULL);3014 unsigned cChunks = pgmR3PhysMmio2CalcChunkCount(pVM, cb, NULL, NULL); 3015 3015 pgmLock(pVM); 3016 3016 uint8_t idMmio2 = pVM->pgm.s.cMmio2Regions + 1; … … 3044 3044 */ 3045 3045 PPGMREGMMIO2RANGE pNew; 3046 rc = pgmR3PhysM MIOExCreate(pVM, pDevIns, iSubDev, iRegion, cb, pszDesc, &pNew);3046 rc = pgmR3PhysMmio2Create(pVM, pDevIns, iSubDev, iRegion, cb, pszDesc, &pNew); 3047 3047 if (RT_SUCCESS(rc)) 3048 3048 { … … 3082 3082 pVM->pgm.s.cPrivatePages += cPages; 3083 3083 3084 pgmR3PhysM MIOExLink(pVM, pNew);3084 pgmR3PhysMmio2Link(pVM, pNew); 3085 3085 3086 3086 *ppv = pvPages; … … 3101 3101 3102 3102 /** 3103 * Deregisters and frees an MMIO2 region or a pre-registered MMIO region3104 * 3105 * Any physical (and virtual) access handlers registered for the region must3106 * be deregistered before calling this function.3103 * Deregisters and frees an MMIO2 region. 3104 * 3105 * Any physical access handlers registered for the region must be deregistered 3106 * before calling this function. 3107 3107 * 3108 3108 * @returns VBox status code. 3109 3109 * @param pVM The cross context VM structure. 3110 3110 * @param pDevIns The device instance owning the region. 3111 * @param iSubDev The sub-device number. Pass UINT32_MAX for wildcard 3112 * matching or using @a hMmio2. 3113 * @param iRegion The region. Pass UINT32_MAX for wildcard matching 3114 * or using @a hMmio2. 3115 * @param hMmio2 The MMIO2 handle to use instead of iSubDev and 3116 * iRegion, pass NIL to use those two. 3117 */ 3118 VMMR3_INT_DECL(int) PGMR3PhysMMIOExDeregister(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, 3119 uint32_t iRegion, PGMMMIO2HANDLE hMmio2) 3111 * @param hMmio2 The MMIO2 handle to deregister, or NIL if all 3112 * regions for the given device is to be deregistered. 3113 */ 3114 VMMR3_INT_DECL(int) PGMR3PhysMmio2Deregister(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2) 3120 3115 { 3121 3116 /* … … 3124 3119 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3125 3120 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 3126 if (hMmio2 != NIL_PGMMMIO2HANDLE)3127 {3128 AssertReturn(iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER);3129 AssertReturn(iRegion == UINT32_MAX, VERR_INVALID_PARAMETER);3130 }3131 else3132 {3133 AssertReturn(iSubDev <= UINT8_MAX || iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER);3134 AssertReturn(iRegion <= UINT8_MAX || iRegion == UINT32_MAX, VERR_INVALID_PARAMETER);3135 }3136 3121 3137 3122 /* … … 3148 3133 uint32_t const fFlags = pCur->fFlags; 3149 3134 if ( pCur->pDevInsR3 == pDevIns 3150 && ( hMmio2 == NIL_PGMMMIO2HANDLE 3151 ? ( iRegion == UINT32_MAX 3152 || pCur->iRegion == iRegion) 3153 && ( iSubDev == UINT32_MAX 3154 || pCur->iSubDev == iSubDev) 3155 : pCur->idMmio2 == hMmio2 3156 && (fFlags & PGMREGMMIO2RANGE_F_MMIO2) 3157 ) 3158 ) 3159 { 3135 && ( hMmio2 == NIL_PGMMMIO2HANDLE 3136 || pCur->idMmio2 == hMmio2)) 3137 { 3138 Assert(fFlags & PGMREGMMIO2RANGE_F_MMIO2); 3160 3139 cFound++; 3161 3140 … … 3165 3144 if (fFlags & PGMREGMMIO2RANGE_F_MAPPED) 3166 3145 { 3167 int rc2 = PGMR3PhysM MIOExUnmap(pVM, pCur->pDevInsR3, pCur->iSubDev, pCur->iRegion, hMmio2, pCur->RamRange.GCPhys);3146 int rc2 = PGMR3PhysMmio2Unmap(pVM, pCur->pDevInsR3, pCur->idMmio2, pCur->RamRange.GCPhys); 3168 3147 AssertRC(rc2); 3169 3148 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) … … 3260 3239 pgmPhysInvalidatePageMapTLB(pVM); 3261 3240 pgmUnlock(pVM); 3262 return !cFound && (hMmio2 != NIL_PGMMMIO2HANDLE || (iRegion != UINT32_MAX && iSubDev != UINT32_MAX))? VERR_NOT_FOUND : rc;3263 } 3264 3265 3266 /** 3267 * Maps a MMIO2 region or a pre-registered MMIO region.3268 * 3269 * This is done when a guest / the bios / state loading changes the3270 * PCI config. The replacing of base memory has the same restrictions3271 * as duringregistration, of course.3241 return !cFound && hMmio2 != NIL_PGMMMIO2HANDLE ? VERR_NOT_FOUND : rc; 3242 } 3243 3244 3245 /** 3246 * Maps a MMIO2 region. 3247 * 3248 * This is typically done when a guest / the bios / state loading changes the 3249 * PCI config. The replacing of base memory has the same restrictions as during 3250 * registration, of course. 3272 3251 * 3273 3252 * @returns VBox status code. … … 3275 3254 * @param pVM The cross context VM structure. 3276 3255 * @param pDevIns The device instance owning the region. 3277 * @param iSubDev The sub-device number of the registered region. 3278 * Pass UINT32_MAX if @a hMmio2 is given. 3279 * @param iRegion The index of the registered region. Pass UINT32_MAX 3280 * if @a hMmio2 is given. 3281 * @param hMmio2 The handle of the region to map as an alternative to 3282 * @a iSubDev and @a iRegion, pass NIL to use the 3283 * other two. 3256 * @param hMmio2 The handle of the region to map. 3284 3257 * @param GCPhys The guest-physical address to be remapped. 3285 3258 */ 3286 VMMR3_INT_DECL(int) PGMR3PhysMMIOExMap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, 3287 PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys) 3259 VMMR3_INT_DECL(int) PGMR3PhysMmio2Map(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys) 3288 3260 { 3289 3261 /* … … 3295 3267 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3296 3268 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 3297 if (hMmio2 != NIL_PGMMMIO2HANDLE)3298 {3299 AssertReturn(iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER);3300 AssertReturn(iRegion == UINT32_MAX, VERR_INVALID_PARAMETER);3301 }3302 else3303 {3304 AssertReturn(iSubDev <= UINT8_MAX, VERR_INVALID_PARAMETER);3305 AssertReturn(iRegion <= UINT8_MAX, VERR_INVALID_PARAMETER);3306 }3307 3269 AssertReturn(GCPhys != NIL_RTGCPHYS, VERR_INVALID_PARAMETER); 3308 3270 AssertReturn(GCPhys != 0, VERR_INVALID_PARAMETER); 3309 3271 AssertReturn(!(GCPhys & PAGE_OFFSET_MASK), VERR_INVALID_PARAMETER); 3310 3311 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysMMIOExFind(pVM, pDevIns, iSubDev, iRegion, hMmio2); 3272 AssertReturn(hMmio2 != NIL_PGMMMIO2HANDLE, VERR_INVALID_HANDLE); 3273 3274 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3312 3275 AssertReturn(pFirstMmio, VERR_NOT_FOUND); 3313 3276 Assert(pFirstMmio->fFlags & PGMREGMMIO2RANGE_F_FIRST_CHUNK); … … 3386 3349 pRam = pRam->pNextR3; 3387 3350 } 3388 Log(("PGMR3PhysM MIOExMap: %RGp-%RGp fRamExists=%RTbool %s\n", GCPhys, GCPhysLast, fRamExists, pFirstMmio->RamRange.pszDesc));3351 Log(("PGMR3PhysMmio2Map: %RGp-%RGp fRamExists=%RTbool %s\n", GCPhys, GCPhysLast, fRamExists, pFirstMmio->RamRange.pszDesc)); 3389 3352 3390 3353 … … 3573 3536 3574 3537 /** 3575 * Unmaps a MMIO2 or a pre-registered MMIO region. 3576 * 3577 * This is done when a guest / the bios / state loading changes the 3578 * PCI config. The replacing of base memory has the same restrictions 3579 * as during registration, of course. 3580 */ 3581 VMMR3_INT_DECL(int) PGMR3PhysMMIOExUnmap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, 3582 PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys) 3538 * Unmaps an MMIO2 region. 3539 * 3540 * This is typically done when a guest / the bios / state loading changes the 3541 * PCI config. The replacing of base memory has the same restrictions as during 3542 * registration, of course. 3543 */ 3544 VMMR3_INT_DECL(int) PGMR3PhysMmio2Unmap(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys) 3583 3545 { 3584 3546 /* … … 3587 3549 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3588 3550 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 3589 if (hMmio2 != NIL_PGMMMIO2HANDLE) 3590 { 3591 AssertReturn(iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER); 3592 AssertReturn(iRegion == UINT32_MAX, VERR_INVALID_PARAMETER); 3593 } 3594 else 3595 { 3596 AssertReturn(iSubDev <= UINT8_MAX, VERR_INVALID_PARAMETER); 3597 AssertReturn(iRegion <= UINT8_MAX, VERR_INVALID_PARAMETER); 3598 AssertReturn(GCPhys != NIL_RTGCPHYS, VERR_INVALID_PARAMETER); 3599 } 3551 AssertReturn(hMmio2 != NIL_PGMMMIO2HANDLE, VERR_INVALID_HANDLE); 3600 3552 if (GCPhys != NIL_RTGCPHYS) 3601 3553 { … … 3604 3556 } 3605 3557 3606 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysM MIOExFind(pVM, pDevIns, iSubDev, iRegion, hMmio2);3558 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3607 3559 AssertReturn(pFirstMmio, VERR_NOT_FOUND); 3608 3560 Assert(pFirstMmio->fFlags & PGMREGMMIO2RANGE_F_FIRST_CHUNK); 3561 3562 int rc = pgmLock(pVM); 3563 AssertRCReturn(rc, rc); 3609 3564 3610 3565 PPGMREGMMIO2RANGE pLastMmio = pFirstMmio; … … 3612 3567 for (;;) 3613 3568 { 3614 AssertReturn (pLastMmio->fFlags & PGMREGMMIO2RANGE_F_MAPPED, VERR_WRONG_ORDER);3615 AssertReturn (pLastMmio->RamRange.GCPhys == GCPhys + cbRange || GCPhys == NIL_RTGCPHYS, VERR_INVALID_PARAMETER);3569 AssertReturnStmt(pLastMmio->fFlags & PGMREGMMIO2RANGE_F_MAPPED, pgmUnlock(pVM), VERR_WRONG_ORDER); 3570 AssertReturnStmt(pLastMmio->RamRange.GCPhys == GCPhys + cbRange || GCPhys == NIL_RTGCPHYS, pgmUnlock(pVM), VERR_INVALID_PARAMETER); 3616 3571 Assert(pLastMmio->pDevInsR3 == pFirstMmio->pDevInsR3); 3617 3572 Assert(pLastMmio->iSubDev == pFirstMmio->iSubDev); … … 3623 3578 } 3624 3579 3625 Log(("PGMR3PhysM MIOExUnmap: %RGp-%RGp %s\n",3580 Log(("PGMR3PhysMmio2Unmap: %RGp-%RGp %s\n", 3626 3581 pFirstMmio->RamRange.GCPhys, pLastMmio->RamRange.GCPhysLast, pFirstMmio->RamRange.pszDesc)); 3627 3582 3628 int rc = pgmLock(pVM);3629 AssertRCReturn(rc, rc);3630 3583 uint16_t const fOldFlags = pFirstMmio->fFlags; 3631 3584 AssertReturnStmt(fOldFlags & PGMREGMMIO2RANGE_F_MAPPED, pgmUnlock(pVM), VERR_WRONG_ORDER); … … 3722 3675 | (fOldFlags & PGMREGMMIO2RANGE_F_OVERLAPPING ? NEM_NOTIFY_PHYS_MMIO_EX_F_REPLACE : 0); 3723 3676 rc = NEMR3NotifyPhysMmioExUnmap(pVM, GCPhysRangeNotify, cbRange, fNemFlags); 3677 3724 3678 pgmUnlock(pVM); 3725 3679 return rc; … … 3728 3682 3729 3683 /** 3730 * Reduces the mapping size of a MMIO2 or pre-registered MMIOregion.3684 * Reduces the mapping size of a MMIO2 region. 3731 3685 * 3732 3686 * This is mainly for dealing with old saved states after changing the default … … 3740 3694 * @param pVM The cross context VM structure. 3741 3695 * @param pDevIns The device instance owning the region. 3742 * @param iSubDev The sub-device number of the registered region. 3743 * Pass UINT32_MAX if @a hMmio2 is given. 3744 * @param iRegion The index of the registered region. Pass UINT32_MAX 3745 * if @a hMmio2 is given. 3746 * @param hMmio2 The handle of the region to reduce as an alternative 3747 * to @a iSubDev and @a iRegion, pass NIL to use the 3748 * other two. 3696 * @param hMmio2 The handle of the region to reduce. 3749 3697 * @param cbRegion The new mapping size. 3750 3698 */ 3751 VMMR3_INT_DECL(int) PGMR3PhysMMIOExReduce(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, 3752 PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion) 3699 VMMR3_INT_DECL(int) PGMR3PhysMmio2Reduce(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion) 3753 3700 { 3754 3701 /* … … 3757 3704 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3758 3705 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 3759 if (hMmio2 != NIL_PGMMMIO2HANDLE) 3760 { 3761 AssertReturn(iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER); 3762 AssertReturn(iRegion == UINT32_MAX, VERR_INVALID_PARAMETER); 3763 } 3764 else 3765 { 3766 AssertReturn(iSubDev <= UINT8_MAX, VERR_INVALID_PARAMETER); 3767 AssertReturn(iRegion <= UINT8_MAX, VERR_INVALID_PARAMETER); 3768 } 3706 AssertReturn(hMmio2 != NIL_PGMMMIO2HANDLE, VERR_INVALID_HANDLE); 3769 3707 AssertReturn(cbRegion >= X86_PAGE_SIZE, VERR_INVALID_PARAMETER); 3770 3708 AssertReturn(!(cbRegion & X86_PAGE_OFFSET_MASK), VERR_UNSUPPORTED_ALIGNMENT); … … 3778 3716 AssertRCReturn(rc, rc); 3779 3717 3780 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysM MIOExFind(pVM, pDevIns, iSubDev, iRegion, hMmio2);3718 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3781 3719 if (pFirstMmio) 3782 3720 { … … 3796 3734 * Make the change. 3797 3735 */ 3798 Log(("PGMR3PhysM MIOExReduce: %s changes from %RGp bytes (%RGp) to %RGp bytes.\n",3736 Log(("PGMR3PhysMmio2Reduce: %s changes from %RGp bytes (%RGp) to %RGp bytes.\n", 3799 3737 pFirstMmio->RamRange.pszDesc, pFirstMmio->RamRange.cb, pFirstMmio->cbReal, cbRegion)); 3800 3738 … … 3839 3777 */ 3840 3778 pgmLock(pVM); 3841 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysM MIOExFind(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2);3779 PPGMREGMMIO2RANGE pFirstMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3842 3780 pgmUnlock(pVM); 3843 3781 AssertReturn(pFirstMmio, VERR_INVALID_HANDLE); … … 3848 3786 3849 3787 3850 /** 3851 * Checks if the given address is an MMIO2 or pre-registered MMIO base address 3852 * or not. 3853 * 3854 * @returns true/false accordingly. 3855 * @param pVM The cross context VM structure. 3856 * @param pDevIns The owner of the memory, optional. 3857 * @param GCPhys The address to check. 3858 */ 3859 VMMR3DECL(bool) PGMR3PhysMMIOExIsBase(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys) 3860 { 3861 /* 3862 * Validate input 3863 */ 3864 VM_ASSERT_EMT_RETURN(pVM, false); 3865 AssertPtrReturn(pDevIns, false); 3866 AssertReturn(GCPhys != NIL_RTGCPHYS, false); 3867 AssertReturn(GCPhys != 0, false); 3868 AssertReturn(!(GCPhys & PAGE_OFFSET_MASK), false); 3869 3870 /* 3871 * Search the list. 3872 */ 3873 pgmLock(pVM); 3874 for (PPGMREGMMIO2RANGE pCurMmio = pVM->pgm.s.pRegMmioRangesR3; pCurMmio; pCurMmio = pCurMmio->pNextR3) 3875 if (pCurMmio->RamRange.GCPhys == GCPhys) 3876 { 3877 Assert(pCurMmio->fFlags & PGMREGMMIO2RANGE_F_MAPPED); 3878 bool fRet = RT_BOOL(pCurMmio->fFlags & PGMREGMMIO2RANGE_F_FIRST_CHUNK); 3879 pgmUnlock(pVM); 3880 return fRet; 3881 } 3882 pgmUnlock(pVM); 3883 return false; 3884 } 3885 3886 3788 #ifndef PGM_WITHOUT_MAPPINGS 3887 3789 /** 3888 3790 * Gets the HC physical address of a page in the MMIO2 region. … … 3911 3813 3912 3814 pgmLock(pVM); 3913 PPGMREGMMIO2RANGE pCurMmio = pgmR3PhysM MIOExFind(pVM, pDevIns, iSubDev, iRegion, NIL_PGMMMIO2HANDLE);3815 PPGMREGMMIO2RANGE pCurMmio = pgmR3PhysMmio2Find(pVM, pDevIns, iSubDev, iRegion, NIL_PGMMMIO2HANDLE); 3914 3816 AssertReturn(pCurMmio, VERR_NOT_FOUND); 3915 3817 AssertReturn(pCurMmio->fFlags & (PGMREGMMIO2RANGE_F_MMIO2 | PGMREGMMIO2RANGE_F_FIRST_CHUNK), VERR_WRONG_TYPE); … … 3928 3830 return VINF_SUCCESS; 3929 3831 } 3930 3931 3932 /** 3933 * Maps a portion of an MMIO2 region into kernel space (host). 3934 * 3935 * The kernel mapping will become invalid when the MMIO2 memory is deregistered 3936 * or the VM is terminated. 3937 * 3938 * @return VBox status code. 3939 * 3940 * @param pVM The cross context VM structure. 3941 * @param pDevIns The device owning the MMIO2 memory. 3942 * @param iSubDev The sub-device number. 3943 * @param iRegion The region. 3944 * @param off The offset into the region. Must be page aligned. 3945 * @param cb The number of bytes to map. Must be page aligned. 3946 * @param pszDesc Mapping description. 3947 * @param pR0Ptr Where to store the R0 address. 3948 */ 3949 VMMR3_INT_DECL(int) PGMR3PhysMMIO2MapKernel(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, 3950 RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTR0PTR pR0Ptr) 3951 { 3952 /* 3953 * Validate input. 3954 */ 3955 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3956 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 3957 AssertReturn(iSubDev <= UINT8_MAX, VERR_INVALID_PARAMETER); 3958 AssertReturn(iRegion <= UINT8_MAX, VERR_INVALID_PARAMETER); 3959 3960 PPGMREGMMIO2RANGE pFirstRegMmio = pgmR3PhysMMIOExFind(pVM, pDevIns, iSubDev, iRegion, NIL_PGMMMIO2HANDLE); 3961 AssertReturn(pFirstRegMmio, VERR_NOT_FOUND); 3962 AssertReturn(pFirstRegMmio->fFlags & (PGMREGMMIO2RANGE_F_MMIO2 | PGMREGMMIO2RANGE_F_FIRST_CHUNK), VERR_WRONG_TYPE); 3963 AssertReturn(off < pFirstRegMmio->RamRange.cb, VERR_INVALID_PARAMETER); 3964 AssertReturn(cb <= pFirstRegMmio->RamRange.cb, VERR_INVALID_PARAMETER); 3965 AssertReturn(off + cb <= pFirstRegMmio->RamRange.cb, VERR_INVALID_PARAMETER); 3966 NOREF(pszDesc); 3967 3968 /* 3969 * Pass the request on to the support library/driver. 3970 */ 3971 #if defined(RT_OS_WINDOWS) || defined(RT_OS_LINUX) || defined(RT_OS_OS2) /** @todo Fully implement RTR0MemObjMapKernelEx everywhere. */ 3972 AssertLogRelReturn(off == 0, VERR_NOT_SUPPORTED); 3973 AssertLogRelReturn(pFirstRegMmio->fFlags & PGMREGMMIO2RANGE_F_LAST_CHUNK, VERR_NOT_SUPPORTED); 3974 int rc = SUPR3PageMapKernel(pFirstRegMmio->pvR3, 0 /*off*/, pFirstRegMmio->RamRange.cb, 0 /*fFlags*/, pR0Ptr); 3975 #else 3976 int rc = SUPR3PageMapKernel(pFirstRegMmio->pvR3, off, cb, 0 /*fFlags*/, pR0Ptr); 3977 #endif 3978 3979 return rc; 3980 } 3832 #endif /* !PGM_WITHOUT_MAPPINGS */ 3981 3833 3982 3834 … … 3994 3846 AssertPtrReturn(pDevIns, NIL_RTGCPHYS); 3995 3847 3996 PPGMREGMMIO2RANGE pFirstRegMmio = pgmR3PhysM MIOExFind(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2);3848 PPGMREGMMIO2RANGE pFirstRegMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3997 3849 AssertReturn(pFirstRegMmio, NIL_RTGCPHYS); 3998 3850 … … 4003 3855 4004 3856 /** 4005 * Changes the region number of an MMIO2 or pre-registered MMIOregion.3857 * Changes the region number of an MMIO2 region. 4006 3858 * 4007 3859 * This is only for dealing with save state issues, nothing else. … … 4011 3863 * @param pVM The cross context VM structure. 4012 3864 * @param pDevIns The device owning the MMIO2 memory. 4013 * @param iSubDev The sub-device number. Pass UINT32_MAX if @a hMmio2 is 4014 * given. 4015 * @param iRegion The region. Pass UINT32_MAX if @a hMmio2 is given. 4016 * @param hMmio2 The handle of the region to map as an alternative to 4017 * @a iSubDev and @a iRegion, pass NIL to use the 4018 * other two. 3865 * @param hMmio2 The handle of the region. 4019 3866 * @param iNewRegion The new region index. 4020 3867 * … … 4022 3869 * @sa @bugref{9359} 4023 3870 */ 4024 VMMR3_INT_DECL(int) PGMR3PhysMMIOExChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, 4025 PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion) 3871 VMMR3_INT_DECL(int) PGMR3PhysMmio2ChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion) 4026 3872 { 4027 3873 /* … … 4029 3875 */ 4030 3876 VM_ASSERT_EMT0_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 3877 VM_ASSERT_STATE_RETURN(pVM, VMSTATE_LOADING, VERR_VM_INVALID_VM_STATE); 4031 3878 AssertPtrReturn(pDevIns, VERR_INVALID_PARAMETER); 4032 if (hMmio2 != NIL_PGMMMIO2HANDLE) 4033 { 4034 AssertReturn(iSubDev == UINT32_MAX, VERR_INVALID_PARAMETER); 4035 AssertReturn(iRegion == UINT32_MAX, VERR_INVALID_PARAMETER); 4036 } 4037 else 4038 { 4039 AssertReturn(iSubDev <= UINT8_MAX, VERR_INVALID_PARAMETER); 4040 AssertReturn(iRegion <= UINT8_MAX, VERR_INVALID_PARAMETER); 4041 } 3879 AssertReturn(hMmio2 != NIL_PGMMMIO2HANDLE, VERR_INVALID_HANDLE); 4042 3880 AssertReturn(iNewRegion <= UINT8_MAX, VERR_INVALID_PARAMETER); 4043 3881 4044 3882 AssertReturn(pVM->enmVMState == VMSTATE_LOADING, VERR_INVALID_STATE); 4045 3883 4046 PPGMREGMMIO2RANGE pFirstRegMmio = pgmR3PhysMMIOExFind(pVM, pDevIns, iSubDev, iRegion, hMmio2); 4047 AssertReturn(pFirstRegMmio, VERR_NOT_FOUND); 4048 AssertReturn(pgmR3PhysMMIOExFind(pVM, pDevIns, pFirstRegMmio->iSubDev, iNewRegion, NIL_PGMMMIO2HANDLE) == NULL, 4049 VERR_RESOURCE_IN_USE); 3884 int rc = pgmLock(pVM); 3885 AssertRCReturn(rc, rc); 3886 3887 PPGMREGMMIO2RANGE pFirstRegMmio = pgmR3PhysMmio2Find(pVM, pDevIns, UINT32_MAX, UINT32_MAX, hMmio2); 3888 AssertReturnStmt(pFirstRegMmio, pgmUnlock(pVM), VERR_NOT_FOUND); 3889 AssertReturnStmt(pgmR3PhysMmio2Find(pVM, pDevIns, pFirstRegMmio->iSubDev, iNewRegion, NIL_PGMMMIO2HANDLE) == NULL, 3890 pgmUnlock(pVM), VERR_RESOURCE_IN_USE); 4050 3891 4051 3892 /* … … 4054 3895 pFirstRegMmio->iRegion = (uint8_t)iNewRegion; 4055 3896 3897 pgmUnlock(pVM); 4056 3898 return VINF_SUCCESS; 4057 3899 }
Note:
See TracChangeset
for help on using the changeset viewer.

