Changeset 13697 in vbox for trunk/include/VBox
- Timestamp:
- Oct 30, 2008 10:13:25 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38662
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm.h
r12989 r13697 110 110 } VMMCALLHOST; 111 111 112 113 114 /** 115 * Gets the bottom of the hypervisor stack - GC Ptr. 116 * I.e. the returned address is not actually writable. 117 * 118 * @returns bottom of the stack. 119 * @param pVM The VM handle. 120 */ 121 RTGCPTR VMMGetStackGC(PVM pVM); 122 123 /** 124 * Gets the bottom of the hypervisor stack - HC Ptr. 125 * I.e. the returned address is not actually writable. 126 * 127 * @returns bottom of the stack. 128 * @param pVM The VM handle. 129 */ 130 RTHCPTR VMMGetHCStack(PVM pVM); 131 132 VMCPUID VMMGetCpuId(PVM pVM); 133 134 VMMDECL(uint32_t) VMMGetSvnRev(void); 112 RTGCPTR VMMGetStackGC(PVM pVM); 113 RTHCPTR VMMGetHCStack(PVM pVM); 114 VMCPUID VMMGetCpuId(PVM pVM); 115 VMMDECL(uint32_t) VMMGetSvnRev(void); 135 116 136 117 … … 140 121 * @{ 141 122 */ 142 143 /** 144 * Initializes the VMM. 145 * 146 * @returns VBox status code. 147 * @param pVM The VM to operate on. 148 */ 149 VMMR3DECL(int) VMMR3Init(PVM pVM); 150 151 /** 152 * Ring-3 init finalizing. 153 * 154 * @returns VBox status code. 155 * @param pVM The VM handle. 156 */ 157 VMMR3DECL(int) VMMR3InitFinalize(PVM pVM); 158 159 /** 160 * Initializes the R0 VMM. 161 * 162 * @returns VBox status code. 163 * @param pVM The VM to operate on. 164 */ 165 VMMR3DECL(int) VMMR3InitR0(PVM pVM); 166 167 /** 168 * Initializes the GC VMM. 169 * 170 * @returns VBox status code. 171 * @param pVM The VM to operate on. 172 */ 173 VMMR3DECL(int) VMMR3InitGC(PVM pVM); 174 175 /** 176 * Destroy the VMM bits. 177 * 178 * @returns VINF_SUCCESS. 179 * @param pVM The VM handle. 180 */ 181 VMMR3DECL(int) VMMR3Term(PVM pVM); 182 183 /** 184 * Applies relocations to data and code managed by this 185 * component. This function will be called at init and 186 * whenever the VMM need to relocate it self inside the GC. 187 * 188 * The VMM will need to apply relocations to the core code. 189 * 190 * @param pVM The VM handle. 191 * @param offDelta The relocation delta. 192 */ 193 VMMR3DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta); 194 195 /** 196 * Updates the settings for the GC (and R0?) loggers. 197 * 198 * @returns VBox status code. 199 * @param pVM The VM handle. 200 */ 201 VMMR3DECL(int) VMMR3UpdateLoggers(PVM pVM); 202 203 /** 204 * Gets the pointer to g_szRTAssertMsg1 in GC. 205 * @returns Pointer to VMMGC::g_szRTAssertMsg1. 206 * Returns NULL if not present. 207 * @param pVM The VM handle. 208 */ 123 VMMR3DECL(int) VMMR3Init(PVM pVM); 124 VMMR3DECL(int) VMMR3InitFinalize(PVM pVM); 125 VMMR3DECL(int) VMMR3InitR0(PVM pVM); 126 VMMR3DECL(int) VMMR3InitRC(PVM pVM); 127 VMMR3DECL(int) VMMR3Term(PVM pVM); 128 VMMR3DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta); 129 VMMR3DECL(int) VMMR3UpdateLoggers(PVM pVM); 209 130 VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM); 210 211 /**212 * Gets the pointer to g_szRTAssertMsg2 in GC.213 * @returns Pointer to VMMGC::g_szRTAssertMsg2.214 * Returns NULL if not present.215 * @param pVM The VM handle.216 */217 131 VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM); 218 219 /** 220 * Resolve a builtin GC symbol. 221 * Called by PDM when loading or relocating GC modules. 222 * 223 * @returns VBox status. 224 * @param pVM VM Handle. 225 * @param pszSymbol Symbol to resolv 226 * @param pGCPtrValue Where to store the symbol value. 227 * @remark This has to work before VMMR3Relocate() is called. 228 */ 229 VMMR3DECL(int) VMMR3GetImportGC(PVM pVM, const char *pszSymbol, PRTGCPTR pGCPtrValue); 230 231 /** 232 * Selects the switcher to be used for switching to GC. 233 * 234 * @returns VBox status code. 235 * @param pVM VM handle. 236 * @param enmSwitcher The new switcher. 237 * @remark This function may be called before the VMM is initialized. 238 */ 239 VMMR3DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher); 240 241 /** 242 * Disable the switcher logic permanently. 243 * 244 * @returns VBox status code. 245 * @param pVM VM handle. 246 */ 247 VMMR3DECL(int) VMMR3DisableSwitcher(PVM pVM); 248 249 /** 250 * Executes guest code. 251 * 252 * @param pVM VM handle. 253 */ 254 VMMR3DECL(int) VMMR3RawRunGC(PVM pVM); 255 256 /** 257 * Executes guest code (Intel VMX and AMD SVM). 258 * 259 * @param pVM VM handle. 260 */ 261 VMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM); 262 263 /** 264 * Calls GC a function. 265 * 266 * @param pVM The VM handle. 267 * @param GCPtrEntry The GC function address. 268 * @param cArgs The number of arguments in the .... 269 * @param ... Arguments to the function. 270 */ 271 VMMR3DECL(int) VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...); 272 273 /** 274 * Calls GC a function. 275 * 276 * @param pVM The VM handle. 277 * @param GCPtrEntry The GC function address. 278 * @param cArgs The number of arguments in the .... 279 * @param args Arguments to the function. 280 */ 281 VMMR3DECL(int) VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args); 282 283 /** 284 * Resumes executing hypervisor code when interrupted 285 * by a queue flush or a debug event. 286 * 287 * @returns VBox status code. 288 * @param pVM VM handle. 289 */ 290 VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM); 291 292 /** 293 * Dumps the VM state on a fatal error. 294 * 295 * @param pVM VM Handle. 296 * @param rcErr VBox status code. 297 */ 298 VMMR3DECL(void) VMMR3FatalDump(PVM pVM, int rcErr); 299 300 /** 301 * Acquire global VM lock 302 * 303 * @returns VBox status code 304 * @param pVM The VM to operate on. 305 */ 306 VMMR3DECL(int) VMMR3Lock(PVM pVM); 307 308 /** 309 * Release global VM lock 310 * 311 * @returns VBox status code 312 * @param pVM The VM to operate on. 313 */ 314 VMMR3DECL(int) VMMR3Unlock(PVM pVM); 315 316 /** 317 * Return global VM lock owner 318 * 319 * @returns NIL_RTNATIVETHREAD -> no owner, otherwise thread id of owner 320 * @param pVM The VM to operate on. 321 */ 132 VMMR3DECL(int) VMMR3GetImportGC(PVM pVM, const char *pszSymbol, PRTGCPTR pGCPtrValue); 133 VMMR3DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher); 134 VMMR3DECL(int) VMMR3DisableSwitcher(PVM pVM); 135 VMMR3DECL(int) VMMR3RawRunGC(PVM pVM); 136 VMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM); 137 VMMR3DECL(int) VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...); 138 VMMR3DECL(int) VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args); 139 VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM); 140 VMMR3DECL(void) VMMR3FatalDump(PVM pVM, int rcErr); 141 VMMR3DECL(int) VMMR3Lock(PVM pVM); 142 VMMR3DECL(int) VMMR3Unlock(PVM pVM); 322 143 VMMR3DECL(RTNATIVETHREAD) VMMR3LockGetOwner(PVM pVM); 323 324 /** 325 * Checks if the current thread is the owner of the global VM lock. 326 * 327 * @returns true if owner. 328 * @returns false if not owner. 329 * @param pVM The VM to operate on. 330 */ 331 VMMR3DECL(bool) VMMR3LockIsOwner(PVM pVM); 332 333 /** 334 * Suspends the the CPU yielder. 335 * 336 * @param pVM The VM handle. 337 */ 338 VMMR3DECL(void) VMMR3YieldSuspend(PVM pVM); 339 340 /** 341 * Stops the the CPU yielder. 342 * 343 * @param pVM The VM handle. 344 */ 345 VMMR3DECL(void) VMMR3YieldStop(PVM pVM); 346 347 /** 348 * Resumes the CPU yielder when it has been a suspended or stopped. 349 * 350 * @param pVM The VM handle. 351 */ 352 VMMR3DECL(void) VMMR3YieldResume(PVM pVM); 353 144 VMMR3DECL(bool) VMMR3LockIsOwner(PVM pVM); 145 VMMR3DECL(void) VMMR3YieldSuspend(PVM pVM); 146 VMMR3DECL(void) VMMR3YieldStop(PVM pVM); 147 VMMR3DECL(void) VMMR3YieldResume(PVM pVM); 354 148 /** @} */ 355 #endif 149 #endif /* IN_RING3 */ 150 356 151 357 152 /** @defgroup grp_vmm_r0 The VMM Host Context Ring 0 API … … 480 275 typedef GCFGMVALUEREQ *PGCFGMVALUEREQ; 481 276 482 483 /** 484 * The Ring 0 entry point, called by the interrupt gate. 485 * 486 * @returns VBox status code. 487 * @param pVM The VM to operate on. 488 * @param enmOperation Which operation to execute. 489 * @param pvArg Argument to the operation. 490 * @remarks Assume called with interrupts or preemption disabled. 491 */ 492 VMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg); 493 494 /** 495 * The Ring 0 entry point, called by the fast-ioctl path. 496 * 497 * @returns VBox status code. 498 * @param pVM The VM to operate on. 499 * @param enmOperation Which operation to execute. 500 * @remarks Assume called with interrupts _enabled_. 501 */ 502 VMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation); 503 504 /** 505 * The Ring 0 entry point, called by the support library (SUP). 506 * 507 * @returns VBox status code. 508 * @param pVM The VM to operate on. 509 * @param enmOperation Which operation to execute. 510 * @param pReq This points to a SUPVMMR0REQHDR packet. Optional. 511 * @param u64Arg Some simple constant argument. 512 * @param pSession The session of the caller. 513 * @remarks Assume called with interrupts _enabled_. 514 */ 515 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION); 516 517 /** 518 * Calls the ring-3 host code. 519 * 520 * @returns VBox status code of the ring-3 call. 521 * @param pVM The VM handle. 522 * @param enmOperation The operation. 523 * @param uArg The argument to the operation. 524 */ 525 VMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg); 277 VMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg); 278 VMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation); 279 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION); 280 VMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg); 526 281 527 282 /** @} */ … … 529 284 530 285 #ifdef IN_GC 531 /** @defgroup grp_vmm_ gc The VMM GuestContext API286 /** @defgroup grp_vmm_rc The VMM Raw-Mode Context API 532 287 * @ingroup grp_vmm 533 288 * @{ 534 289 */ 535 536 /** 537 * The GC entry point. 538 * 539 * @returns VBox status code. 540 * @param pVM The VM to operate on. 541 * @param uOperation Which operation to execute (VMMGCOPERATION). 542 * @param uArg Argument to that operation. 543 * @param ... Additional arguments. 544 */ 545 VMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...); 546 547 /** 548 * Switches from guest context to host context. 549 * 550 * @param pVM The VM handle. 551 * @param rc The status code. 552 */ 553 VMMRCDECL(void) VMMGCGuestToHost(PVM pVM, int rc); 554 555 /** 556 * Calls the ring-3 host code. 557 * 558 * @returns VBox status code of the ring-3 call. 559 * @param pVM The VM handle. 560 * @param enmOperation The operation. 561 * @param uArg The argument to the operation. 562 */ 563 VMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg); 564 290 VMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...); 291 VMMRCDECL(void) VMMGCGuestToHost(PVM pVM, int rc); 292 VMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg); 565 293 /** @} */ 566 #endif 294 #endif /* IN_RC */ 567 295 568 296 … … 570 298 __END_DECLS 571 299 572 573 300 #endif 301
Note:
See TracChangeset
for help on using the changeset viewer.