Changeset 44351 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 24, 2013 12:04:39 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r43971 r44351 205 205 * @param pVM Pointer to the VM. 206 206 */ 207 VMM DECL(bool) PDMHasIoApic(PVM pVM)207 VMM_INT_DECL(bool) PDMHasIoApic(PVM pVM) 208 208 { 209 209 return pVM->pdm.s.IoApic.CTX_SUFF(pDevIns) != NULL; … … 272 272 * @param pfPending Pending state (out). 273 273 */ 274 VMM DECL(int) PDMApicHasPendingIrq(PVMCPU pVCpu, bool *pfPending)274 VMM_INT_DECL(int) PDMApicHasPendingIrq(PVMCPU pVCpu, bool *pfPending) 275 275 { 276 276 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 347 347 * @param u64Value Value to write. 348 348 */ 349 VMM DECL(int) PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value)349 VMM_INT_DECL(int) PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value) 350 350 { 351 351 if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns)) … … 367 367 * @param pu64Value Value read. 368 368 */ 369 VMM DECL(int) PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value)369 VMM_INT_DECL(int) PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value) 370 370 { 371 371 if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns)) … … 431 431 * @param pGCPhys GC phys address (out). 432 432 */ 433 VMM DECL(int) PDMVMMDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys)433 VMM_INT_DECL(int) PDMVmmDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys) 434 434 { 435 435 /* Don't assert here as this is called before we can catch ring-0 assertions. */ 436 436 if (RT_UNLIKELY((RTR3UINTPTR)pv - (RTR3UINTPTR)pVM->pdm.s.pvVMMDevHeap >= pVM->pdm.s.cbVMMDevHeap)) 437 437 { 438 Log(("PDMV MMDevHeapR3ToGCPhys: pv=%p pvVMMDevHeap=%p cbVMMDevHeap=%#x\n",438 Log(("PDMVmmDevHeapR3ToGCPhys: pv=%p pvVMMDevHeap=%p cbVMMDevHeap=%#x\n", 439 439 pv, pVM->pdm.s.pvVMMDevHeap, pVM->pdm.s.cbVMMDevHeap)); 440 440 return VERR_PDM_DEV_HEAP_R3_TO_GCPHYS; … … 451 451 * @param pVM Pointer to the VM. 452 452 */ 453 VMM DECL(bool) PDMVMMDevHeapIsEnabled(PVM pVM)453 VMM_INT_DECL(bool) PDMVmmDevHeapIsEnabled(PVM pVM) 454 454 { 455 455 return (pVM->pdm.s.pvVMMDevHeap != NULL); -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r44269 r44351 1813 1813 1814 1814 /* We convert it here every time as PCI regions could be reconfigured. */ 1815 rc = PDMV MMDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pRealModeTSS, &GCPhys);1815 rc = PDMVmmDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pRealModeTSS, &GCPhys); 1816 1816 AssertRC(rc); 1817 1817 … … 2064 2064 2065 2065 /* We convert it here every time as PCI regions could be reconfigured. */ 2066 rc = PDMV MMDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pNonPagingModeEPTPageTable, &GCPhys);2066 rc = PDMVmmDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pNonPagingModeEPTPageTable, &GCPhys); 2067 2067 AssertMsgRC(rc, ("pNonPagingModeEPTPageTable = %RGv\n", pVM->hm.s.vmx.pNonPagingModeEPTPageTable)); 2068 2068 -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r44275 r44351 1173 1173 { 1174 1174 /* Allocate three pages for the TSS we need for real mode emulation. (2 pages for the IO bitmap) */ 1175 rc = PDMR3V MMDevHeapAlloc(pVM, HM_VTX_TOTAL_DEVHEAP_MEM, (RTR3PTR *)&pVM->hm.s.vmx.pRealModeTSS);1175 rc = PDMR3VmmDevHeapAlloc(pVM, HM_VTX_TOTAL_DEVHEAP_MEM, (RTR3PTR *)&pVM->hm.s.vmx.pRealModeTSS); 1176 1176 if (RT_SUCCESS(rc)) 1177 1177 { … … 1202 1202 1203 1203 /* We convert it here every time as pci regions could be reconfigured. */ 1204 rc = PDMV MMDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pRealModeTSS, &GCPhys);1204 rc = PDMVmmDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pRealModeTSS, &GCPhys); 1205 1205 AssertRC(rc); 1206 1206 LogRel(("HM: Real Mode TSS guest physaddr = %RGp\n", GCPhys)); 1207 1207 1208 rc = PDMV MMDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pNonPagingModeEPTPageTable, &GCPhys);1208 rc = PDMVmmDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pNonPagingModeEPTPageTable, &GCPhys); 1209 1209 AssertRC(rc); 1210 1210 LogRel(("HM: Non-Paging Mode EPT CR3 = %RGp\n", GCPhys)); … … 1623 1623 if (pVM->hm.s.vmx.pRealModeTSS) 1624 1624 { 1625 PDMR3V MMDevHeapFree(pVM, pVM->hm.s.vmx.pRealModeTSS);1625 PDMR3VmmDevHeapFree(pVM, pVM->hm.s.vmx.pRealModeTSS); 1626 1626 pVM->hm.s.vmx.pRealModeTSS = 0; 1627 1627 } … … 2362 2362 || (!pVM->hm.s.vmx.fUnrestrictedGuest && pVM->hm.s.vmx.pRealModeTSS)); 2363 2363 2364 bool fSupportsRealMode = pVM->hm.s.vmx.fUnrestrictedGuest || PDMV MMDevHeapIsEnabled(pVM);2364 bool fSupportsRealMode = pVM->hm.s.vmx.fUnrestrictedGuest || PDMVmmDevHeapIsEnabled(pVM); 2365 2365 if (!pVM->hm.s.vmx.fUnrestrictedGuest) 2366 2366 { … … 2532 2532 && !pVM->hm.s.vmx.fUnrestrictedGuest 2533 2533 && !CPUMIsGuestInPagedProtectedModeEx(pCtx) 2534 && !PDMV MMDevHeapIsEnabled(pVM)2534 && !PDMVmmDevHeapIsEnabled(pVM) 2535 2535 && (pVM->hm.s.fNestedPaging || CPUMIsGuestInRealModeEx(pCtx))) 2536 2536 return true; -
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r43472 r44351 337 337 * @param pUVM Pointer to the user mode VM structure. 338 338 */ 339 VMMR3 DECL(int) PDMR3InitUVM(PUVM pUVM)339 VMMR3_INT_DECL(int) PDMR3InitUVM(PUVM pUVM) 340 340 { 341 341 AssertCompile(sizeof(pUVM->pdm.s) <= sizeof(pUVM->pdm.padding)); … … 353 353 * @param pVM Pointer to the VM. 354 354 */ 355 VMMR3 DECL(int) PDMR3Init(PVM pVM)355 VMMR3_INT_DECL(int) PDMR3Init(PVM pVM) 356 356 { 357 357 LogFlow(("PDMR3Init\n")); … … 445 445 * early in the relocation phase. 446 446 */ 447 VMMR3 DECL(void) PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta)447 VMMR3_INT_DECL(void) PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta) 448 448 { 449 449 LogFlow(("PDMR3Relocate\n")); … … 617 617 * @param pVM Pointer to the VM. 618 618 */ 619 VMMR3 DECL(int) PDMR3Term(PVM pVM)619 VMMR3_INT_DECL(int) PDMR3Term(PVM pVM) 620 620 { 621 621 LogFlow(("PDMR3Term:\n")); … … 712 712 * @param pUVM Pointer to the user mode VM structure. 713 713 */ 714 VMMR3 DECL(void) PDMR3TermUVM(PUVM pUVM)714 VMMR3_INT_DECL(void) PDMR3TermUVM(PUVM pUVM) 715 715 { 716 716 /* … … 1405 1405 * @param pVCpu Pointer to the VMCPU. 1406 1406 */ 1407 VMMR3 DECL(void) PDMR3ResetCpu(PVMCPU pVCpu)1407 VMMR3_INT_DECL(void) PDMR3ResetCpu(PVMCPU pVCpu) 1408 1408 { 1409 1409 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC); … … 1420 1420 * @param pVM Pointer to the VM. 1421 1421 */ 1422 VMMR3 DECL(void) PDMR3Reset(PVM pVM)1422 VMMR3_INT_DECL(void) PDMR3Reset(PVM pVM) 1423 1423 { 1424 1424 LogFlow(("PDMR3Reset:\n")); … … 1654 1654 * @thread EMT(0) 1655 1655 */ 1656 VMMR3 DECL(void) PDMR3Suspend(PVM pVM)1656 VMMR3_INT_DECL(void) PDMR3Suspend(PVM pVM) 1657 1657 { 1658 1658 LogFlow(("PDMR3Suspend:\n")); … … 1815 1815 * @param pVM Pointer to the VM. 1816 1816 */ 1817 VMMR3 DECL(void) PDMR3Resume(PVM pVM)1817 VMMR3_INT_DECL(void) PDMR3Resume(PVM pVM) 1818 1818 { 1819 1819 LogFlow(("PDMR3Resume:\n")); … … 2094 2094 * 2095 2095 * @returns VBox status code. 2096 * @param p VM Pointer to the VM.2096 * @param pUVM The user mode VM handle. 2097 2097 * @param pszDevice Device name. 2098 2098 * @param iInstance Device instance. … … 2101 2101 * device chain is known to be updated. 2102 2102 */ 2103 VMMR3DECL(int) PDMR3QueryDevice(P VM pVM, const char *pszDevice, unsigned iInstance, PPDMIBASE *ppBase)2103 VMMR3DECL(int) PDMR3QueryDevice(PUVM pUVM, const char *pszDevice, unsigned iInstance, PPDMIBASE *ppBase) 2104 2104 { 2105 2105 LogFlow(("PDMR3DeviceQuery: pszDevice=%p:{%s} iInstance=%u ppBase=%p\n", pszDevice, pszDevice, iInstance, ppBase)); 2106 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 2107 VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, VERR_INVALID_VM_HANDLE); 2106 2108 2107 2109 /* … … 2109 2111 */ 2110 2112 size_t cchDevice = strlen(pszDevice); 2111 for (PPDMDEV pDev = p VM->pdm.s.pDevs; pDev; pDev = pDev->pNext)2113 for (PPDMDEV pDev = pUVM->pVM->pdm.s.pDevs; pDev; pDev = pDev->pNext) 2112 2114 { 2113 2115 if ( pDev->cchName == cchDevice … … 2150 2152 * 2151 2153 * @returns VBox status code. 2152 * @param p VM Pointer to the VM.2154 * @param pUVM The user mode VM handle. 2153 2155 * @param pszDevice Device name. 2154 2156 * @param iInstance Device instance. … … 2158 2160 * device chain is known to be updated. 2159 2161 */ 2160 VMMR3DECL(int) PDMR3QueryDeviceLun(P VM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase)2162 VMMR3DECL(int) PDMR3QueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase) 2161 2163 { 2162 2164 LogFlow(("PDMR3QueryLun: pszDevice=%p:{%s} iInstance=%u iLun=%u ppBase=%p\n", 2163 2165 pszDevice, pszDevice, iInstance, iLun, ppBase)); 2166 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 2167 VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, VERR_INVALID_VM_HANDLE); 2164 2168 2165 2169 /* … … 2167 2171 */ 2168 2172 PPDMLUN pLun; 2169 int rc = pdmR3DevFindLun(p VM, pszDevice, iInstance, iLun, &pLun);2173 int rc = pdmR3DevFindLun(pUVM->pVM, pszDevice, iInstance, iLun, &pLun); 2170 2174 if (RT_SUCCESS(rc)) 2171 2175 { … … 2183 2187 * 2184 2188 * @returns VBox status code. 2185 * @param p VM Pointer to the VM.2189 * @param pUVM The user mode VM handle. 2186 2190 * @param pszDevice Device name. 2187 2191 * @param iInstance Device instance. … … 2191 2195 * device chain is known to be updated. 2192 2196 */ 2193 VMMR3DECL(int) PDMR3QueryLun(P VM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase)2197 VMMR3DECL(int) PDMR3QueryLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase) 2194 2198 { 2195 2199 LogFlow(("PDMR3QueryLun: pszDevice=%p:{%s} iInstance=%u iLun=%u ppBase=%p\n", 2196 2200 pszDevice, pszDevice, iInstance, iLun, ppBase)); 2201 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 2202 PVM pVM = pUVM->pVM; 2197 2203 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 2198 2204 … … 2224 2230 * 2225 2231 * @returns VBox status code. 2226 * @param p VM Pointer to the VM.2232 * @param pUVM The user mode VM handle. 2227 2233 * @param pszDevice Device name. 2228 2234 * @param iInstance Device instance. … … 2234 2240 * device chain is known to be updated. 2235 2241 */ 2236 VMMR3DECL(int) PDMR3QueryDriverOnLun(P VM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, const char *pszDriver, PPPDMIBASE ppBase)2242 VMMR3DECL(int) PDMR3QueryDriverOnLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, const char *pszDriver, PPPDMIBASE ppBase) 2237 2243 { 2238 2244 LogFlow(("PDMR3QueryDriverOnLun: pszDevice=%p:{%s} iInstance=%u iLun=%u pszDriver=%p:{%s} ppBase=%p\n", 2239 2245 pszDevice, pszDevice, iInstance, iLun, pszDriver, pszDriver, ppBase)); 2246 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 2247 VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, VERR_INVALID_VM_HANDLE); 2240 2248 2241 2249 /* … … 2243 2251 */ 2244 2252 PPDMLUN pLun; 2245 int rc = pdmR3DevFindLun(p VM, pszDevice, iInstance, iLun, &pLun);2253 int rc = pdmR3DevFindLun(pUVM->pVM, pszDevice, iInstance, iLun, &pLun); 2246 2254 if (RT_SUCCESS(rc)) 2247 2255 { … … 2295 2303 * @param pVM Pointer to the VM. 2296 2304 */ 2297 VMMR3 DECL(int) PDMR3LockCall(PVM pVM)2305 VMMR3_INT_DECL(int) PDMR3LockCall(PVM pVM) 2298 2306 { 2299 2307 return PDMR3CritSectEnterEx(&pVM->pdm.s.CritSect, true /* fHostCall */); … … 2310 2318 * @param cbSize Size of the heap. 2311 2319 */ 2312 VMMR3 DECL(int) PDMR3RegisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize)2320 VMMR3_INT_DECL(int) PDMR3VmmDevHeapRegister(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize) 2313 2321 { 2314 2322 Assert(pVM->pdm.s.pvVMMDevHeap == NULL); 2315 2323 2316 Log(("PDMR3 RegisterVMMDevHeap%RGp %RHv %x\n", GCPhys, pvHeap, cbSize));2324 Log(("PDMR3VmmDevHeapRegister %RGp %RHv %x\n", GCPhys, pvHeap, cbSize)); 2317 2325 pVM->pdm.s.pvVMMDevHeap = pvHeap; 2318 2326 pVM->pdm.s.GCPhysVMMDevHeap = GCPhys; … … 2330 2338 * @param GCPhys The physical address. 2331 2339 */ 2332 VMMR3 DECL(int) PDMR3UnregisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys)2340 VMMR3_INT_DECL(int) PDMR3VmmDevHeapUnregister(PVM pVM, RTGCPHYS GCPhys) 2333 2341 { 2334 2342 Assert(pVM->pdm.s.GCPhysVMMDevHeap == GCPhys); 2335 2343 2336 Log(("PDMR3 UnregisterVMMDevHeap%RGp\n", GCPhys));2344 Log(("PDMR3VmmDevHeapUnregister %RGp\n", GCPhys)); 2337 2345 pVM->pdm.s.pvVMMDevHeap = NULL; 2338 2346 pVM->pdm.s.GCPhysVMMDevHeap = NIL_RTGCPHYS; … … 2351 2359 * @param pv Ring-3 pointer. (out) 2352 2360 */ 2353 VMMR3 DECL(int) PDMR3VMMDevHeapAlloc(PVM pVM, unsignedcbSize, RTR3PTR *ppv)2361 VMMR3_INT_DECL(int) PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, RTR3PTR *ppv) 2354 2362 { 2355 2363 #ifdef DEBUG_bird … … 2360 2368 #endif 2361 2369 2362 Log(("PDMR3VMMDevHeapAlloc %x\n", cbSize));2363 2364 /** @todo not a real heap as there's currently only one user. */2370 Log(("PDMR3VMMDevHeapAlloc: %#zx\n", cbSize)); 2371 2372 /** @todo Not a real heap as there's currently only one user. */ 2365 2373 *ppv = pVM->pdm.s.pvVMMDevHeap; 2366 2374 pVM->pdm.s.cbVMMDevHeapLeft = 0; … … 2376 2384 * @param pv Ring-3 pointer. 2377 2385 */ 2378 VMMR3 DECL(int) PDMR3VMMDevHeapFree(PVM pVM, RTR3PTR pv)2379 { 2380 Log(("PDMR3V MMDevHeapFree%RHv\n", pv));2386 VMMR3_INT_DECL(int) PDMR3VmmDevHeapFree(PVM pVM, RTR3PTR pv) 2387 { 2388 Log(("PDMR3VmmDevHeapFree: %RHv\n", pv)); 2381 2389 2382 2390 /** @todo not a real heap as there's currently only one user. */ -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r44340 r44351 2167 2167 pDevIns->iInstance, rc)); 2168 2168 return rc; 2169 } 2170 2171 2172 /** @interface_method_impl{PDMDEVHLPR3,pfnGetUVM} */ 2173 static DECLCALLBACK(PUVM) pdmR3DevHlp_GetUVM(PPDMDEVINS pDevIns) 2174 { 2175 PDMDEV_ASSERT_DEVINS(pDevIns); 2176 LogFlow(("pdmR3DevHlp_GetUVM: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns->Internal.s.pVMR3)); 2177 return pDevIns->Internal.s.pVMR3->pUVM; 2169 2178 } 2170 2179 … … 3100 3109 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 3101 3110 3102 int rc = PDMR3 RegisterVMMDevHeap(pDevIns->Internal.s.pVMR3, GCPhys, pvHeap, cbSize);3111 int rc = PDMR3VmmDevHeapRegister(pDevIns->Internal.s.pVMR3, GCPhys, pvHeap, cbSize); 3103 3112 return rc; 3104 3113 } … … 3113 3122 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 3114 3123 3115 int rc = PDMR3 UnregisterVMMDevHeap(pDevIns->Internal.s.pVMR3, GCPhys);3124 int rc = PDMR3VmmDevHeapUnregister(pDevIns->Internal.s.pVMR3, GCPhys); 3116 3125 return rc; 3117 3126 } … … 3410 3419 0, 3411 3420 0, 3412 0,3421 pdmR3DevHlp_GetUVM, 3413 3422 pdmR3DevHlp_GetVM, 3414 3423 pdmR3DevHlp_GetVMCPU, … … 3429 3438 3430 3439 3440 3441 3442 /** @interface_method_impl{PDMDEVHLPR3,pfnGetUVM} */ 3443 static DECLCALLBACK(PUVM) pdmR3DevHlp_Untrusted_GetUVM(PPDMDEVINS pDevIns) 3444 { 3445 PDMDEV_ASSERT_DEVINS(pDevIns); 3446 AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance)); 3447 return NULL; 3448 } 3431 3449 3432 3450 … … 3631 3649 0, 3632 3650 0, 3633 0,3651 pdmR3DevHlp_Untrusted_GetUVM, 3634 3652 pdmR3DevHlp_Untrusted_GetVM, 3635 3653 pdmR3DevHlp_Untrusted_GetVMCPU, -
trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
r41965 r44351 615 615 { 616 616 PPDMIBASE pBase; 617 rc = PDMR3QueryDevice(pDevIns->Internal.s.pVMR3 , "i8254", 0, &pBase);617 rc = PDMR3QueryDevice(pDevIns->Internal.s.pVMR3->pUVM, "i8254", 0, &pBase); 618 618 if (RT_SUCCESS(rc)) 619 619 { -
trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
r41965 r44351 32 32 #include <VBox/vmm/dbgf.h> 33 33 #include <VBox/vmm/vm.h> 34 #include <VBox/vmm/uvm.h> 34 35 #include <VBox/vmm/vmm.h> 35 36 … … 776 777 * 777 778 * @returns VBox status code. 778 * @param p VM Pointer to the VM.779 * @param pUVM The user mode VM handle. 779 780 * @param pszDevice Device name. 780 781 * @param iInstance Device instance. … … 784 785 * @thread EMT 785 786 */ 786 VMMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPPDMIBASE ppBase) 787 { 787 VMMR3DECL(int) PDMR3DeviceAttach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPPDMIBASE ppBase) 788 { 789 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 790 PVM pVM = pUVM->pVM; 791 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 788 792 VM_ASSERT_EMT(pVM); 789 793 LogFlow(("PDMR3DeviceAttach: pszDevice=%p:{%s} iInstance=%d iLun=%d fFlags=%#x ppBase=%p\n", … … 835 839 * 836 840 * @returns VBox status code. 837 * @param p VM Pointer to the VM.841 * @param pUVM The user mode VM handle. 838 842 * @param pszDevice Device name. 839 843 * @param iInstance Device instance. … … 842 846 * @thread EMT 843 847 */ 844 VMMR3DECL(int) PDMR3DeviceDetach(P VM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags)845 { 846 return PDMR3DriverDetach(p VM, pszDevice, iInstance, iLun, NULL, 0, fFlags);848 VMMR3DECL(int) PDMR3DeviceDetach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags) 849 { 850 return PDMR3DriverDetach(pUVM, pszDevice, iInstance, iLun, NULL, 0, fFlags); 847 851 } 848 852 … … 880 884 * 881 885 * @returns VBox status code. 882 * @param p VM Pointer to the VM.886 * @param pUVM The user mode VM handle. 883 887 * @param pszDevice Device name. 884 888 * @param iInstance Device instance. … … 889 893 * @thread EMT 890 894 */ 891 VMMR3DECL(int) PDMR3DriverAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPPDMIBASE ppBase) 892 { 893 VM_ASSERT_EMT(pVM); 895 VMMR3DECL(int) PDMR3DriverAttach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPPDMIBASE ppBase) 896 { 894 897 LogFlow(("PDMR3DriverAttach: pszDevice=%p:{%s} iInstance=%d iLun=%d fFlags=%#x ppBase=%p\n", 895 898 pszDevice, pszDevice, iInstance, iLun, fFlags, ppBase)); 899 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 900 PVM pVM = pUVM->pVM; 901 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 902 VM_ASSERT_EMT(pVM); 896 903 897 904 if (ppBase) … … 962 969 * 963 970 * @returns VBox status code. 964 * @param p VM Pointer to the VM.971 * @param pUVM The user mode VM handle. 965 972 * @param pszDevice Device name. 966 973 * @param iDevIns Device instance. … … 973 980 * @thread EMT 974 981 */ 975 VMMR3DECL(int) PDMR3DriverDetach(P VM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,982 VMMR3DECL(int) PDMR3DriverDetach(PUVM pUVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, 976 983 const char *pszDriver, unsigned iOccurance, uint32_t fFlags) 977 984 { 978 985 LogFlow(("PDMR3DriverDetach: pszDevice=%p:{%s} iDevIns=%u iLun=%u pszDriver=%p:{%s} iOccurance=%u fFlags=%#x\n", 979 986 pszDevice, pszDevice, iDevIns, iLun, pszDriver, iOccurance, fFlags)); 987 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 988 PVM pVM = pUVM->pVM; 989 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 980 990 VM_ASSERT_EMT(pVM); 981 991 AssertPtr(pszDevice); … … 1033 1043 * 1034 1044 * @returns VBox status code. 1035 * @param p VM Pointer to the VM.1045 * @param pUVM The user mode VM handle. 1036 1046 * @param pszDevice Device name. 1037 1047 * @param iDevIns Device instance. … … 1054 1064 * @thread Any thread. The EMTs will be involved at some point though. 1055 1065 */ 1056 VMMR3DECL(int) PDMR3DriverReattach(P VM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,1066 VMMR3DECL(int) PDMR3DriverReattach(PUVM pUVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, 1057 1067 const char *pszDriver, unsigned iOccurance, uint32_t fFlags, 1058 1068 PCFGMNODE pCfg, PPPDMIBASE ppBase) 1059 1069 { 1060 NOREF(p VM); NOREF(pszDevice); NOREF(iDevIns); NOREF(iLun); NOREF(pszDriver); NOREF(iOccurance);1070 NOREF(pUVM); NOREF(pszDevice); NOREF(iDevIns); NOREF(iLun); NOREF(pszDriver); NOREF(iOccurance); 1061 1071 NOREF(fFlags); NOREF(pCfg); NOREF(ppBase); 1062 1072 return VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp
r43387 r44351 78 78 * @param pUVM Pointer to the user mode VM structure. 79 79 */ 80 VMMR3 DECL(int) PDMR3LdrLoadVMMR0U(PUVM pUVM)80 VMMR3_INT_DECL(int) PDMR3LdrLoadVMMR0U(PUVM pUVM) 81 81 { 82 82 return pdmR3LoadR0U(pUVM, NULL, VMMR0_MAIN_MODULE_NAME, NULL); … … 178 178 * @param offDelta Relocation delta relative to old location. 179 179 */ 180 VMMR3 DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta)180 VMMR3_INT_DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta) 181 181 { 182 182 #ifdef VBOX_WITH_RAW_MODE … … 720 720 * @param ppvValue Where to store the symbol value. 721 721 */ 722 VMMR3 DECL(int) PDMR3LdrGetSymbolR3(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue)722 VMMR3_INT_DECL(int) PDMR3LdrGetSymbolR3(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue) 723 723 { 724 724 /* … … 1359 1359 * @param pNearSym2 The address of pszNearSym2. 1360 1360 */ 1361 VMMR3 DECL(int) PDMR3LdrQueryRCModFromPC(PVM pVM, RTRCPTR uPC,1362 char *pszModName, size_t cchModName, PRTRCPTR pMod,1363 char *pszNearSym1, size_t cchNearSym1, PRTRCPTR pNearSym1,1364 char *pszNearSym2, size_t cchNearSym2, PRTRCPTR pNearSym2)1361 VMMR3_INT_DECL(int) PDMR3LdrQueryRCModFromPC(PVM pVM, RTRCPTR uPC, 1362 char *pszModName, size_t cchModName, PRTRCPTR pMod, 1363 char *pszNearSym1, size_t cchNearSym1, PRTRCPTR pNearSym1, 1364 char *pszNearSym2, size_t cchNearSym2, PRTRCPTR pNearSym2) 1365 1365 { 1366 1366 RTUINTPTR AddrMod = 0; … … 1403 1403 * @param pNearSym2 The address of pszNearSym2. Optional. 1404 1404 */ 1405 VMMR3 DECL(int) PDMR3LdrQueryR0ModFromPC(PVM pVM, RTR0PTR uPC,1406 char *pszModName, size_t cchModName, PRTR0PTR pMod,1407 char *pszNearSym1, size_t cchNearSym1, PRTR0PTR pNearSym1,1408 char *pszNearSym2, size_t cchNearSym2, PRTR0PTR pNearSym2)1405 VMMR3_INT_DECL(int) PDMR3LdrQueryR0ModFromPC(PVM pVM, RTR0PTR uPC, 1406 char *pszModName, size_t cchModName, PRTR0PTR pMod, 1407 char *pszNearSym1, size_t cchNearSym1, PRTR0PTR pNearSym1, 1408 char *pszNearSym2, size_t cchNearSym2, PRTR0PTR pNearSym2) 1409 1409 { 1410 1410 RTUINTPTR AddrMod = 0; … … 1552 1552 * it's raw-mode context interface. 1553 1553 */ 1554 VMMR3 DECL(int) PDMR3LdrGetInterfaceSymbols(PVM pVM, void *pvInterface, size_t cbInterface,1555 const char *pszModule, const char *pszSearchPath,1556 const char *pszSymPrefix, const char *pszSymList,1557 bool fRing0)1554 VMMR3_INT_DECL(int) PDMR3LdrGetInterfaceSymbols(PVM pVM, void *pvInterface, size_t cbInterface, 1555 const char *pszModule, const char *pszSearchPath, 1556 const char *pszSymPrefix, const char *pszSymList, 1557 bool fRing0) 1558 1558 { 1559 1559 /* -
trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp
r43814 r44351 29 29 #include <VBox/sup.h> 30 30 #include <VBox/vmm/vm.h> 31 #include <VBox/vmm/uvm.h> 31 32 #include <VBox/version.h> 32 33 #include <VBox/err.h> … … 850 851 * 851 852 * @returns VBox status code. 852 * @param p VM Pointer to the VM.853 * @param pUVM The user mode VM handle. 853 854 * @param pUuid The UUID to be associated with the device. 854 855 * @param fRemote Whether it's a remove or local device. … … 858 859 * @param fMaskedIfs The interfaces to hide from the guest. 859 860 */ 860 VMMR3DECL(int) PDMR3U SBCreateProxyDevice(PVM pVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend,861 VMMR3DECL(int) PDMR3UsbCreateProxyDevice(PUVM pUVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend, 861 862 uint32_t iUsbVersion, uint32_t fMaskedIfs) 862 863 { … … 864 865 * Validate input. 865 866 */ 867 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 868 PVM pVM = pUVM->pVM; 869 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 866 870 VM_ASSERT_EMT(pVM); 867 871 AssertPtrReturn(pUuid, VERR_INVALID_POINTER); … … 876 880 if (!pUsbDev) 877 881 { 878 LogRel(("PDMR3U SBCreateProxyDevice: The USBProxy device class wasn't found\n"));882 LogRel(("PDMR3UsbCreateProxyDevice: The USBProxy device class wasn't found\n")); 879 883 return VERR_PDM_NO_USBPROXY; 880 884 } … … 911 915 { 912 916 CFGMR3RemoveNode(pConfig); 913 LogRel(("PDMR3U SBCreateProxyDevice: failed to setup CFGM config, rc=%Rrc\n", rc));917 LogRel(("PDMR3UsbCreateProxyDevice: failed to setup CFGM config, rc=%Rrc\n", rc)); 914 918 return rc; 915 919 } … … 1022 1026 * 1023 1027 * @returns VBox status code. 1024 * @param p VM Pointer to the VM.1028 * @param pUVM The user mode VM handle. 1025 1029 * @param pUuid The UUID associated with the device to detach. 1026 1030 * @thread EMT 1027 1031 */ 1028 VMMR3DECL(int) PDMR3U SBDetachDevice(PVM pVM, PCRTUUID pUuid)1032 VMMR3DECL(int) PDMR3UsbDetachDevice(PUVM pUVM, PCRTUUID pUuid) 1029 1033 { 1030 1034 /* 1031 1035 * Validate input. 1032 1036 */ 1037 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 1038 PVM pVM = pUVM->pVM; 1039 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1033 1040 VM_ASSERT_EMT(pVM); 1034 1041 AssertPtrReturn(pUuid, VERR_INVALID_POINTER); 1035 AssertPtrReturn(pVM, VERR_INVALID_POINTER);1036 1042 1037 1043 /* … … 1077 1083 * 1078 1084 * @returns true / false accordingly. 1079 * @param pVM Pointer to the VM. 1080 */ 1081 VMMR3DECL(bool) PDMR3USBHasHub(PVM pVM) 1082 { 1085 * @param pUVM The user mode VM handle. 1086 */ 1087 VMMR3DECL(bool) PDMR3UsbHasHub(PUVM pUVM) 1088 { 1089 UVM_ASSERT_VALID_EXT_RETURN(pUVM, false); 1090 PVM pVM = pUVM->pVM; 1091 VM_ASSERT_VALID_EXT_RETURN(pVM, false); 1083 1092 return pVM->pdm.s.pUsbHubs != NULL; 1084 1093 }
Note:
See TracChangeset
for help on using the changeset viewer.