Changeset 74794 in vbox for trunk/include/VBox
- Timestamp:
- Oct 12, 2018 11:06:48 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r74793 r74794 359 359 /** The virtual sync clock has been stopped, go to TM until it has been 360 360 * restarted... */ 361 #define VM_FF_TM_VIRTUAL_SYNC RT_BIT_32(2) 361 #define VM_FF_TM_VIRTUAL_SYNC RT_BIT_32(VM_FF_TM_VIRTUAL_SYNC_BIT) 362 #define VM_FF_TM_VIRTUAL_SYNC_BIT 2 362 363 /** PDM Queues are pending. */ 363 364 #define VM_FF_PDM_QUEUES RT_BIT_32(VM_FF_PDM_QUEUES_BIT) … … 376 377 /** This action forces the VM to service pending requests from other 377 378 * thread or requests which must be executed in another context. */ 378 #define VM_FF_REQUEST RT_BIT_32(9) 379 #define VM_FF_REQUEST RT_BIT_32(VM_FF_REQUEST_BIT) 380 #define VM_FF_REQUEST_BIT 9 379 381 /** Check for VM state changes and take appropriate action. */ 380 382 #define VM_FF_CHECK_VM_STATE RT_BIT_32(VM_FF_CHECK_VM_STATE_BIT) … … 391 393 392 394 /** PGM needs to allocate handy pages. */ 393 #define VM_FF_PGM_NEED_HANDY_PAGES RT_BIT_32(18) 395 #define VM_FF_PGM_NEED_HANDY_PAGES RT_BIT_32(VM_FF_PGM_NEED_HANDY_PAGES_BIT) 396 #define VM_FF_PGM_NEED_HANDY_PAGES_BIT 18 394 397 /** PGM is out of memory. 395 398 * Abandon all loops and code paths which can be resumed and get up to the EM 396 399 * loops. */ 397 #define VM_FF_PGM_NO_MEMORY RT_BIT_32(19) 400 #define VM_FF_PGM_NO_MEMORY RT_BIT_32(VM_FF_PGM_NO_MEMORY_BIT) 401 #define VM_FF_PGM_NO_MEMORY_BIT 19 398 402 /** PGM is about to perform a lightweight pool flush 399 403 * Guest SMP: all EMT threads should return to ring 3 400 404 */ 401 #define VM_FF_PGM_POOL_FLUSH_PENDING RT_BIT_32(20) 405 #define VM_FF_PGM_POOL_FLUSH_PENDING RT_BIT_32(VM_FF_PGM_POOL_FLUSH_PENDING_BIT) 406 #define VM_FF_PGM_POOL_FLUSH_PENDING_BIT 20 402 407 /** REM needs to be informed about handler changes. */ 403 408 #define VM_FF_REM_HANDLER_NOTIFY RT_BIT_32(VM_FF_REM_HANDLER_NOTIFY_BIT) … … 405 410 #define VM_FF_REM_HANDLER_NOTIFY_BIT 29 406 411 /** Suspend the VM - debug only. */ 407 #define VM_FF_DEBUG_SUSPEND RT_BIT_32(31) 412 #define VM_FF_DEBUG_SUSPEND RT_BIT_32(VM_FF_DEBUG_SUSPEND_BIT) 413 #define VM_FF_DEBUG_SUSPEND_BIT 31 408 414 409 415 410 416 /** This action forces the VM to check any pending interrupts on the APIC. */ 411 #define VMCPU_FF_INTERRUPT_APIC RT_BIT_32(0) 417 #define VMCPU_FF_INTERRUPT_APIC RT_BIT_32(VMCPU_FF_INTERRUPT_APIC_BIT) 418 #define VMCPU_FF_INTERRUPT_APIC_BIT 0 412 419 /** This action forces the VM to check any pending interrups on the PIC. */ 413 #define VMCPU_FF_INTERRUPT_PIC RT_BIT_32(1) 420 #define VMCPU_FF_INTERRUPT_PIC RT_BIT_32(VMCPU_FF_INTERRUPT_PIC_BIT) 421 #define VMCPU_FF_INTERRUPT_PIC_BIT 1 414 422 /** This action forces the VM to schedule and run pending timer (TM). 415 423 * @remarks Don't move - PATM compatibility. */ 416 #define VMCPU_FF_TIMER RT_BIT_32(2) 424 #define VMCPU_FF_TIMER RT_BIT_32(VMCPU_FF_TIMER_BIT) 425 #define VMCPU_FF_TIMER_BIT 2 417 426 /** This action forces the VM to check any pending NMIs. */ 427 #define VMCPU_FF_INTERRUPT_NMI RT_BIT_32(VMCPU_FF_INTERRUPT_NMI_BIT) 418 428 #define VMCPU_FF_INTERRUPT_NMI_BIT 3 419 #define VMCPU_FF_INTERRUPT_NMI RT_BIT_32(VMCPU_FF_INTERRUPT_NMI_BIT)420 429 /** This action forces the VM to check any pending SMIs. */ 430 #define VMCPU_FF_INTERRUPT_SMI RT_BIT_32(VMCPU_FF_INTERRUPT_SMI_BIT) 421 431 #define VMCPU_FF_INTERRUPT_SMI_BIT 4 422 #define VMCPU_FF_INTERRUPT_SMI RT_BIT_32(VMCPU_FF_INTERRUPT_SMI_BIT)423 432 /** PDM critical section unlocking is pending, process promptly upon return to R3. */ 424 #define VMCPU_FF_PDM_CRITSECT RT_BIT_32(5) 433 #define VMCPU_FF_PDM_CRITSECT RT_BIT_32(VMCPU_FF_PDM_CRITSECT_BIT) 434 #define VMCPU_FF_PDM_CRITSECT_BIT 5 425 435 /** Special EM internal force flag that is used by EMUnhaltAndWakeUp() to force 426 436 * the virtual CPU out of the next (/current) halted state. It is not processed 427 437 * nor cleared by emR3ForcedActions (similar to VMCPU_FF_BLOCK_NMIS), instead it 428 438 * is cleared the next time EM leaves the HALTED state. */ 429 #define VMCPU_FF_UNHALT RT_BIT_32(6) 439 #define VMCPU_FF_UNHALT RT_BIT_32(VMCPU_FF_UNHALT_BIT) 440 #define VMCPU_FF_UNHALT_BIT 6 441 /** Pending IEM action (mask). */ 442 #define VMCPU_FF_IEM RT_BIT_32(VMCPU_FF_IEM_BIT) 430 443 /** Pending IEM action (bit number). */ 431 444 #define VMCPU_FF_IEM_BIT 7 432 /** Pending IEM action (mask). */433 #define VMCPU_FF_IEM RT_BIT_32(VMCPU_FF_IEM_BIT)434 445 /** Pending APIC action (bit number). */ 435 446 #define VMCPU_FF_UPDATE_APIC_BIT 8 … … 439 450 /** This action forces the VM to service pending requests from other 440 451 * thread or requests which must be executed in another context. */ 441 #define VMCPU_FF_REQUEST RT_BIT_32(9) 452 #define VMCPU_FF_REQUEST RT_BIT_32(VMCPU_FF_REQUEST_BIT) 453 #define VMCPU_FF_REQUEST_BIT 9 442 454 /** Pending DBGF event (alternative to passing VINF_EM_DBG_EVENT around). */ 443 455 #define VMCPU_FF_DBGF RT_BIT_32(VMCPU_FF_DBGF_BIT) … … 450 462 /** This action forces the VM to service any pending updates to CR3 (used only 451 463 * by HM). */ 452 #define VMCPU_FF_HM_UPDATE_CR3 RT_BIT_32(12) 464 #define VMCPU_FF_HM_UPDATE_CR3 RT_BIT_32(VMCPU_FF_HM_UPDATE_CR3_BIT) 465 #define VMCPU_FF_HM_UPDATE_CR3_BIT 12 453 466 /** This action forces the VM to service any pending updates to PAE PDPEs (used 454 467 * only by HM). */ 455 #define VMCPU_FF_HM_UPDATE_PAE_PDPES RT_BIT_32(13) 468 #define VMCPU_FF_HM_UPDATE_PAE_PDPES RT_BIT_32(VMCPU_FF_HM_UPDATE_PAE_PDPES_BIT) 469 #define VMCPU_FF_HM_UPDATE_PAE_PDPES_BIT 13 456 470 /** This action forces the VM to resync the page tables before going 457 471 * back to execute guest code. (GLOBAL FLUSH) */ 458 #define VMCPU_FF_PGM_SYNC_CR3 RT_BIT_32(16) 472 #define VMCPU_FF_PGM_SYNC_CR3 RT_BIT_32(VMCPU_FF_PGM_SYNC_CR3_BIT) 473 #define VMCPU_FF_PGM_SYNC_CR3_BIT 16 459 474 /** Same as VM_FF_PGM_SYNC_CR3 except that global pages can be skipped. 460 475 * (NON-GLOBAL FLUSH) */ 461 #define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL RT_BIT_32(17) 476 #define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL RT_BIT_32(VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL_BIT) 477 #define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL_BIT 17 462 478 /** Check for pending TLB shootdown actions (deprecated) 463 479 * Reserved for furture HM re-use if necessary / safe. 464 480 * Consumer: HM */ 465 #define VMCPU_FF_TLB_SHOOTDOWN_UNUSED RT_BIT_32(18) 481 #define VMCPU_FF_TLB_SHOOTDOWN_UNUSED RT_BIT_32(VMCPU_FF_TLB_SHOOTDOWN_UNUSED_BIT) 482 #define VMCPU_FF_TLB_SHOOTDOWN_UNUSED_BIT 18 466 483 /** Check for pending TLB flush action. 467 484 * Consumer: HM … … 472 489 #ifdef VBOX_WITH_RAW_MODE 473 490 /** Check the interrupt and trap gates */ 474 # define VMCPU_FF_TRPM_SYNC_IDT RT_BIT_32(20) 491 # define VMCPU_FF_TRPM_SYNC_IDT RT_BIT_32(VMCPU_FF_TRPM_SYNC_IDT_BIT) 492 # define VMCPU_FF_TRPM_SYNC_IDT_BIT 20 475 493 /** Check Guest's TSS ring 0 stack */ 476 # define VMCPU_FF_SELM_SYNC_TSS RT_BIT_32(21) 494 # define VMCPU_FF_SELM_SYNC_TSS RT_BIT_32(VMCPU_FF_SELM_SYNC_TSS_BIT) 495 # define VMCPU_FF_SELM_SYNC_TSS_BIT 21 477 496 /** Check Guest's GDT table */ 478 # define VMCPU_FF_SELM_SYNC_GDT RT_BIT_32(22) 497 # define VMCPU_FF_SELM_SYNC_GDT RT_BIT_32(VMCPU_FF_SELM_SYNC_GDT_BIT) 498 # define VMCPU_FF_SELM_SYNC_GDT_BIT 22 479 499 /** Check Guest's LDT table */ 480 # define VMCPU_FF_SELM_SYNC_LDT RT_BIT_32(23) 500 # define VMCPU_FF_SELM_SYNC_LDT RT_BIT_32(VMCPU_FF_SELM_SYNC_LDT_BIT) 501 # define VMCPU_FF_SELM_SYNC_LDT_BIT 23 481 502 #endif /* VBOX_WITH_RAW_MODE */ 482 503 /** Inhibit interrupts pending. See EMGetInhibitInterruptsPC(). */ 483 #define VMCPU_FF_INHIBIT_INTERRUPTS RT_BIT_32(24) 504 #define VMCPU_FF_INHIBIT_INTERRUPTS RT_BIT_32(VMCPU_FF_INHIBIT_INTERRUPTS_BIT) 505 #define VMCPU_FF_INHIBIT_INTERRUPTS_BIT 24 484 506 /** Block injection of non-maskable interrupts to the guest. */ 485 #define VMCPU_FF_BLOCK_NMIS RT_BIT_32(25) 507 #define VMCPU_FF_BLOCK_NMIS RT_BIT_32(VMCPU_FF_BLOCK_NMIS_BIT) 508 #define VMCPU_FF_BLOCK_NMIS_BIT 25 486 509 #ifdef VBOX_WITH_RAW_MODE 487 510 /** CSAM needs to scan the page that's being executed */ 488 # define VMCPU_FF_CSAM_SCAN_PAGE RT_BIT_32(26) 511 # define VMCPU_FF_CSAM_SCAN_PAGE RT_BIT_32(VMCPU_FF_CSAM_SCAN_PAGE_BIT) 512 # define VMCPU_FF_CSAM_SCAN_PAGE_BIT 26 489 513 /** CSAM needs to do some homework. */ 490 # define VMCPU_FF_CSAM_PENDING_ACTION RT_BIT_32(27) 514 # define VMCPU_FF_CSAM_PENDING_ACTION RT_BIT_32(VMCPU_FF_CSAM_PENDING_ACTION_BIT) 515 # define VMCPU_FF_CSAM_PENDING_ACTION_BIT 27 491 516 #endif /* VBOX_WITH_RAW_MODE */ 492 517 /** Force return to Ring-3. */ 493 #define VMCPU_FF_TO_R3 RT_BIT_32(28) 518 #define VMCPU_FF_TO_R3 RT_BIT_32(VMCPU_FF_TO_R3_BIT) 519 #define VMCPU_FF_TO_R3_BIT 28 494 520 /** Force return to ring-3 to service pending I/O or MMIO write. 495 521 * This is a backup for mechanism VINF_IOM_R3_IOPORT_COMMIT_WRITE and 496 522 * VINF_IOM_R3_MMIO_COMMIT_WRITE, allowing VINF_EM_DBG_BREAKPOINT and similar 497 523 * status codes to be propagated at the same time without loss. */ 498 #define VMCPU_FF_IOM RT_BIT_32(29) 524 #define VMCPU_FF_IOM RT_BIT_32(VMCPU_FF_IOM_BIT) 525 #define VMCPU_FF_IOM_BIT 29 499 526 #ifdef VBOX_WITH_RAW_MODE 500 527 /** CPUM need to adjust CR0.TS/EM before executing raw-mode code again. */ … … 504 531 #endif /* VBOX_WITH_RAW_MODE */ 505 532 /** Hardware virtualized nested-guest interrupt pending. */ 506 #define VMCPU_FF_INTERRUPT_NESTED_GUEST RT_BIT_32(31) 533 #define VMCPU_FF_INTERRUPT_NESTED_GUEST RT_BIT_32(VMCPU_FF_INTERRUPT_NESTED_GUEST_BIT) 534 #define VMCPU_FF_INTERRUPT_NESTED_GUEST_BIT 31 535 507 536 508 537 /** Externally VM forced actions. Used to quit the idle/wait loop. */ … … 638 667 do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag)); } while (0) 639 668 640 /** @def VMCPU_FF_SET 669 /** @def VMCPU_FF_SET_MASK 641 670 * Sets a two or more force action flag for the given VCPU. 642 671 *
Note:
See TracChangeset
for help on using the changeset viewer.