Changeset 92703 in vbox for trunk/src/VBox/VMM/VMMR3/PGMHandler.cpp
- Timestamp:
- Dec 2, 2021 12:45:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMHandler.cpp
r92162 r92703 82 82 { 83 83 AssertPtrReturn(pfnHandlerR3, VERR_INVALID_POINTER); 84 AssertReturn(pfnHandlerR0 != NIL_RTR0PTR , VERR_INVALID_POINTER);85 AssertReturn(pfnPfHandlerR0 != NIL_RTR0PTR , VERR_INVALID_POINTER);84 AssertReturn(pfnHandlerR0 != NIL_RTR0PTR || SUPR3IsDriverless(), VERR_INVALID_POINTER); 85 AssertReturn(pfnPfHandlerR0 != NIL_RTR0PTR || SUPR3IsDriverless(), VERR_INVALID_POINTER); 86 86 AssertPtrReturn(pszDesc, VERR_INVALID_POINTER); 87 87 AssertReturn( enmKind == PGMPHYSHANDLERKIND_WRITE … … 168 168 */ 169 169 R0PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR0 = NIL_RTR0PTR; 170 int rc = PDMR3LdrGetSymbolR0Lazy(pVM, pszHandlerR0 ? pszModR0 : NULL, NULL /*pszSearchPath*/, 171 pszHandlerR0 ? pszHandlerR0 : "pgmPhysHandlerRedirectToHC", &pfnHandlerR0); 172 if (RT_SUCCESS(rc)) 173 { 174 R0PTRTYPE(PFNPGMR0PHYSPFHANDLER) pfnPfHandlerR0 = NIL_RTR0PTR; 175 rc = PDMR3LdrGetSymbolR0Lazy(pVM, pszPfHandlerR0 ? pszModR0 : NULL, NULL /*pszSearchPath*/, 176 pszPfHandlerR0 ? pszPfHandlerR0 : "pgmPhysPfHandlerRedirectToHC", &pfnPfHandlerR0); 170 R0PTRTYPE(PFNPGMR0PHYSPFHANDLER) pfnPfHandlerR0 = NIL_RTR0PTR; 171 int rc = VINF_SUCCESS; 172 if (!SUPR3IsDriverless()) 173 { 174 rc = PDMR3LdrGetSymbolR0Lazy(pVM, pszHandlerR0 ? pszModR0 : NULL, NULL /*pszSearchPath*/, 175 pszHandlerR0 ? pszHandlerR0 : "pgmPhysHandlerRedirectToHC", &pfnHandlerR0); 177 176 if (RT_SUCCESS(rc)) 178 177 { 179 /* 180 * Resolve the GC handler. 181 */ 182 RTRCPTR pfnHandlerRC = NIL_RTRCPTR; 183 RTRCPTR pfnPfHandlerRC = NIL_RTRCPTR; 184 if (VM_IS_RAW_MODE_ENABLED(pVM)) 185 { 186 rc = PDMR3LdrGetSymbolRCLazy(pVM, pszHandlerRC ? pszModRC : NULL, NULL /*pszSearchPath*/, 187 pszHandlerRC ? pszHandlerRC : "pgmPhysHandlerRedirectToHC", &pfnHandlerRC); 188 if (RT_SUCCESS(rc)) 189 { 190 rc = PDMR3LdrGetSymbolRCLazy(pVM, pszPfHandlerRC ? pszModRC : NULL, NULL /*pszSearchPath*/, 191 pszPfHandlerRC ? pszPfHandlerRC : "pgmPhysPfHandlerRedirectToHC", &pfnPfHandlerRC); 192 AssertMsgRC(rc, ("Failed to resolve %s.%s, rc=%Rrc.\n", pszPfHandlerRC ? pszModRC : VMMRC_MAIN_MODULE_NAME, 193 pszPfHandlerRC ? pszPfHandlerRC : "pgmPhysPfHandlerRedirectToHC", rc)); 194 } 195 else 196 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszHandlerRC ? pszModRC : VMMRC_MAIN_MODULE_NAME, 197 pszHandlerRC ? pszHandlerRC : "pgmPhysHandlerRedirectToHC", rc)); 198 199 } 200 if (RT_SUCCESS(rc)) 201 return PGMR3HandlerPhysicalTypeRegisterEx(pVM, enmKind, fKeepPgmLock, pfnHandlerR3, 202 pfnHandlerR0, pfnPfHandlerR0, pszDesc, phType); 178 rc = PDMR3LdrGetSymbolR0Lazy(pVM, pszPfHandlerR0 ? pszModR0 : NULL, NULL /*pszSearchPath*/, 179 pszPfHandlerR0 ? pszPfHandlerR0 : "pgmPhysPfHandlerRedirectToHC", &pfnPfHandlerR0); 180 AssertMsgRC(rc, ("Failed to resolve %s.%s, rc=%Rrc.\n", pszPfHandlerR0 ? pszModR0 : VMMR0_MAIN_MODULE_NAME, 181 pszPfHandlerR0 ? pszPfHandlerR0 : "pgmPhysHandlerRedirectToHC", rc)); 203 182 } 204 183 else 205 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszPfHandlerR0 ? pszModR0 : VMMR0_MAIN_MODULE_NAME, 206 pszPfHandlerR0 ? pszPfHandlerR0 : "pgmPhysHandlerRedirectToHC", rc)); 207 } 208 else 209 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszHandlerR0 ? pszModR0 : VMMR0_MAIN_MODULE_NAME, 210 pszHandlerR0 ? pszHandlerR0 : "pgmPhysHandlerRedirectToHC", rc)); 184 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszHandlerR0 ? pszModR0 : VMMR0_MAIN_MODULE_NAME, 185 pszHandlerR0 ? pszHandlerR0 : "pgmPhysHandlerRedirectToHC", rc)); 186 } 187 if (RT_SUCCESS(rc)) 188 { 189 /* 190 * Resolve the GC handler. 191 */ 192 RTRCPTR pfnHandlerRC = NIL_RTRCPTR; 193 RTRCPTR pfnPfHandlerRC = NIL_RTRCPTR; 194 if (VM_IS_RAW_MODE_ENABLED(pVM)) 195 { 196 rc = PDMR3LdrGetSymbolRCLazy(pVM, pszHandlerRC ? pszModRC : NULL, NULL /*pszSearchPath*/, 197 pszHandlerRC ? pszHandlerRC : "pgmPhysHandlerRedirectToHC", &pfnHandlerRC); 198 if (RT_SUCCESS(rc)) 199 { 200 rc = PDMR3LdrGetSymbolRCLazy(pVM, pszPfHandlerRC ? pszModRC : NULL, NULL /*pszSearchPath*/, 201 pszPfHandlerRC ? pszPfHandlerRC : "pgmPhysPfHandlerRedirectToHC", &pfnPfHandlerRC); 202 AssertMsgRC(rc, ("Failed to resolve %s.%s, rc=%Rrc.\n", pszPfHandlerRC ? pszModRC : VMMRC_MAIN_MODULE_NAME, 203 pszPfHandlerRC ? pszPfHandlerRC : "pgmPhysPfHandlerRedirectToHC", rc)); 204 } 205 else 206 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszHandlerRC ? pszModRC : VMMRC_MAIN_MODULE_NAME, 207 pszHandlerRC ? pszHandlerRC : "pgmPhysHandlerRedirectToHC", rc)); 208 209 } 210 if (RT_SUCCESS(rc)) 211 return PGMR3HandlerPhysicalTypeRegisterEx(pVM, enmKind, fKeepPgmLock, pfnHandlerR3, 212 pfnHandlerR0, pfnPfHandlerR0, pszDesc, phType); 213 } 211 214 212 215 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.