Changeset 35855 in vbox
- Timestamp:
- Feb 4, 2011 5:02:44 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69856
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/cdefs.h
r31508 r35855 60 60 #define IN_INTNET_R0 61 61 #define IN_INTNET_R3 62 #define IN_PCIRAW_R0 63 #define IN_PCIRAW_R3 62 64 #define IN_REM_R3 63 65 #define IN_SUP_R0 … … 145 147 #endif 146 148 149 /** @def IN_PCIRAW_R3 150 * Used to indicate whether we're inside the same link module as the Ring-3 151 * PCI passthrough support. 152 */ 153 /** @def PCIRAWR3DECL(type) 154 * PCI passthrough export or import declaration. 155 * @param type The return type of the function declaration. 156 */ 157 #ifdef IN_PCIRAW_R3 158 # define PCIRAWR3DECL(type) DECLEXPORT(type) VBOXCALL 159 #else 160 # define PCIRAWR3DECL(type) DECLIMPORT(type) VBOXCALL 161 #endif 162 163 /** @def IN_PCIRAW_R0 164 * Used to indicate whether we're inside the same link module as the R0 165 * PCI passthrough support. 166 */ 167 /** @def PCIRAWR0DECL(type) 168 * PCI passthroug export or import declaration. 169 * @param type The return type of the function declaration. 170 */ 171 #ifdef IN_PCIRAW_R0 172 # define PCIRAWR0DECL(type) DECLEXPORT(type) VBOXCALL 173 #else 174 # define PCIRAWR0DECL(type) DECLIMPORT(type) VBOXCALL 175 #endif 147 176 148 177 -
trunk/include/VBox/sup.h
r35191 r35855 1117 1117 /** Multiple release event semaphore. */ 1118 1118 SUPDRVOBJTYPE_SEM_EVENT_MULTI, 1119 /** Raw PCI device. */ 1120 SUPDRVOBJTYPE_RAW_PCI_DEVICE, 1119 1121 /** The first invalid object type in this end. */ 1120 1122 SUPDRVOBJTYPE_END, -
trunk/include/VBox/vmm/vmm.h
r35361 r35855 376 376 /** Call IntNetR0IfAbortWait(). */ 377 377 VMMR0_DO_INTNET_IF_ABORT_WAIT, 378 379 /** Forward call to the PCI driver */ 380 VMMR0_DO_PCIRAW_REQ, 381 378 382 /** The end of the R0 service operations. */ 379 383 VMMR0_DO_SRV_END, … … 456 460 457 461 #endif 458 -
trunk/src/VBox/Devices/Makefile.kmk
r35685 r35855 1120 1120 # 1121 1121 ServicesR0_TEMPLATE = VBoxR0 1122 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 1122 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) 1123 1123 ServicesR0_SOURCES = \ 1124 Network/SrvIntNetR0.cpp 1125 1124 Network/SrvIntNetR0.cpp \ 1125 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,) 1126 1126 1127 1127 # -
trunk/src/VBox/VMM/Makefile.kmk
r35572 r35855 437 437 VMMR0_DEFS += VBOX_WITH_VMMR0_DISABLE_PREEMPTION 438 438 endif 439 ifdef VBOX_WITH_PCI_PASSTHROUGH 440 VMMR0_DEFS += VBOX_WITH_PCI_PASSTHROUGH IN_PCIRAW_R0 441 endif 439 442 VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK 440 443 VMMR0_DEFS.darwin.x86 = \ -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r35810 r35855 30 30 #include "VMMInternal.h" 31 31 #include <VBox/vmm/vm.h> 32 #ifdef VBOX_WITH_PCI_PASSTHROUGH 33 #include <VBox/vmm/pdmpci.h> 34 #endif 32 35 33 36 #include <VBox/vmm/gvmm.h> … … 39 42 #include <VBox/version.h> 40 43 #include <VBox/log.h> 44 41 45 42 46 #include <iprt/asm-amd64-x86.h> … … 127 131 if (RT_SUCCESS(rc)) 128 132 { 129 rc = CPUMR0ModuleInit(); 133 #ifdef VBOX_WITH_PCI_PASSTHROUGH 134 rc = PciRawR0Init(); 135 #endif 130 136 if (RT_SUCCESS(rc)) 131 137 { 132 LogFlow(("ModuleInit: returns success.\n")); 133 return VINF_SUCCESS; 138 rc = CPUMR0ModuleInit(); 139 if (RT_SUCCESS(rc)) 140 { 141 LogFlow(("ModuleInit: returns success.\n")); 142 return VINF_SUCCESS; 143 } 134 144 } 145 146 /* bail out */ 147 LogFlow(("ModuleTerm: returns %Rrc\n", rc)); 148 #ifdef VBOX_WITH_PCI_PASSTHROUGH 149 PciRawR0Term(); 150 #endif 151 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE 152 PGMR0DynMapTerm(); 153 #endif 135 154 } 136 137 /* bail out */138 LogFlow(("ModuleTerm: returns %Rrc\n", rc));139 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE140 PGMR0DynMapTerm();141 #endif142 155 } 143 156 PGMDeregisterStringFormatTypes(); … … 178 191 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE 179 192 PGMR0DynMapTerm(); 193 #endif 194 195 #ifdef VBOX_WITH_PCI_PASSTHROUGH 196 /* 197 * Terminate PCI passthrough service. 198 */ 199 PciRawR0Term(); 180 200 #endif 181 201 PGMDeregisterStringFormatTypes(); … … 1155 1175 return IntNetR0IfAbortWaitReq(pSession, (PINTNETIFABORTWAITREQ)pReqHdr); 1156 1176 1177 #ifdef VBOX_WITH_PCI_PASSTHROUGH 1178 /* 1179 * Requests to host PCI driver service. 1180 */ 1181 case VMMR0_DO_PCIRAW_REQ: 1182 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PPCIRAWSENDREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1183 return VERR_INVALID_PARAMETER; 1184 return PciRawR0ProcessReq(pSession, (PPCIRAWSENDREQ)pReqHdr); 1185 #endif 1157 1186 /* 1158 1187 * For profiling. … … 1178 1207 default: 1179 1208 /* 1180 * We're returning VERR_NOT_SUPPORT here s owe've got something else1209 * We're returning VERR_NOT_SUPPORT here s we've got something else 1181 1210 * than -1 which the interrupt gate glue code might return. 1182 1211 */ … … 1527 1556 RTAssertMsg2V(pszFormat, va); 1528 1557 } 1529
Note:
See TracChangeset
for help on using the changeset viewer.