VirtualBox

Changeset 74794 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 12, 2018 11:06:48 AM (6 years ago)
Author:
vboxsync
Message:

vm.h: Added _BIT macros for all FFs. bugref:9180

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/vm.h

    r74793 r74794  
    359359/** The virtual sync clock has been stopped, go to TM until it has been
    360360 *  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
    362363/** PDM Queues are pending. */
    363364#define VM_FF_PDM_QUEUES                    RT_BIT_32(VM_FF_PDM_QUEUES_BIT)
     
    376377/** This action forces the VM to service pending requests from other
    377378 * 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
    379381/** Check for VM state changes and take appropriate action. */
    380382#define VM_FF_CHECK_VM_STATE                RT_BIT_32(VM_FF_CHECK_VM_STATE_BIT)
     
    391393
    392394/** 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
    394397/** PGM is out of memory.
    395398 * Abandon all loops and code paths which can be resumed and get up to the EM
    396399 * 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
    398402 /** PGM is about to perform a lightweight pool flush
    399403  *  Guest SMP: all EMT threads should return to ring 3
    400404  */
    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
    402407/** REM needs to be informed about handler changes. */
    403408#define VM_FF_REM_HANDLER_NOTIFY            RT_BIT_32(VM_FF_REM_HANDLER_NOTIFY_BIT)
     
    405410#define VM_FF_REM_HANDLER_NOTIFY_BIT        29
    406411/** 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
    408414
    409415
    410416/** 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
    412419/** 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
    414422/** This action forces the VM to schedule and run pending timer (TM).
    415423 * @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
    417426/** This action forces the VM to check any pending NMIs. */
     427#define VMCPU_FF_INTERRUPT_NMI              RT_BIT_32(VMCPU_FF_INTERRUPT_NMI_BIT)
    418428#define VMCPU_FF_INTERRUPT_NMI_BIT          3
    419 #define VMCPU_FF_INTERRUPT_NMI              RT_BIT_32(VMCPU_FF_INTERRUPT_NMI_BIT)
    420429/** This action forces the VM to check any pending SMIs. */
     430#define VMCPU_FF_INTERRUPT_SMI              RT_BIT_32(VMCPU_FF_INTERRUPT_SMI_BIT)
    421431#define VMCPU_FF_INTERRUPT_SMI_BIT          4
    422 #define VMCPU_FF_INTERRUPT_SMI              RT_BIT_32(VMCPU_FF_INTERRUPT_SMI_BIT)
    423432/** 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
    425435/** Special EM internal force flag that is used by EMUnhaltAndWakeUp() to force
    426436 * the virtual CPU out of the next (/current) halted state.  It is not processed
    427437 * nor cleared by emR3ForcedActions (similar to VMCPU_FF_BLOCK_NMIS), instead it
    428438 * 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)
    430443/** Pending IEM action (bit number). */
    431444#define VMCPU_FF_IEM_BIT                    7
    432 /** Pending IEM action (mask). */
    433 #define VMCPU_FF_IEM                        RT_BIT_32(VMCPU_FF_IEM_BIT)
    434445/** Pending APIC action (bit number). */
    435446#define VMCPU_FF_UPDATE_APIC_BIT            8
     
    439450/** This action forces the VM to service pending requests from other
    440451 * 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
    442454/** Pending DBGF event (alternative to passing VINF_EM_DBG_EVENT around).  */
    443455#define VMCPU_FF_DBGF                       RT_BIT_32(VMCPU_FF_DBGF_BIT)
     
    450462/** This action forces the VM to service any pending updates to CR3 (used only
    451463 *  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
    453466/** This action forces the VM to service any pending updates to PAE PDPEs (used
    454467 *  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
    456470/** This action forces the VM to resync the page tables before going
    457471 * 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
    459474/** Same as VM_FF_PGM_SYNC_CR3 except that global pages can be skipped.
    460475 * (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
    462478/** Check for pending TLB shootdown actions (deprecated)
    463479 * Reserved for furture HM re-use if necessary / safe.
    464480 * 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
    466483/** Check for pending TLB flush action.
    467484 * Consumer: HM
     
    472489#ifdef VBOX_WITH_RAW_MODE
    473490/** 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
    475493/** 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
    477496/** 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
    479499/** 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
    481502#endif /* VBOX_WITH_RAW_MODE */
    482503/** 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
    484506/** 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
    486509#ifdef VBOX_WITH_RAW_MODE
    487510/** 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
    489513/** 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
    491516#endif /* VBOX_WITH_RAW_MODE */
    492517/** 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
    494520/** Force return to ring-3 to service pending I/O or MMIO write.
    495521 * This is a backup for mechanism VINF_IOM_R3_IOPORT_COMMIT_WRITE and
    496522 * VINF_IOM_R3_MMIO_COMMIT_WRITE, allowing VINF_EM_DBG_BREAKPOINT and similar
    497523 * 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
    499526#ifdef VBOX_WITH_RAW_MODE
    500527/** CPUM need to adjust CR0.TS/EM before executing raw-mode code again.  */
     
    504531#endif /* VBOX_WITH_RAW_MODE */
    505532/** 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
    507536
    508537/** Externally VM forced actions. Used to quit the idle/wait loop. */
     
    638667    do { AssertCompile(RT_IS_POWER_OF_TWO(fFlag)); ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag)); } while (0)
    639668
    640 /** @def VMCPU_FF_SET
     669/** @def VMCPU_FF_SET_MASK
    641670 * Sets a two or more force action flag for the given VCPU.
    642671 *
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette