VirtualBox

Changeset 45533 in vbox for trunk/include


Ignore:
Timestamp:
Apr 13, 2013 4:13:22 PM (12 years ago)
Author:
vboxsync
Message:

#ifdef the raw-mode force flags to find more code to #ifdef out.

Location:
trunk/include/VBox/vmm
Files:
3 edited

Legend:

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

    r45276 r45533  
    9595VMMR3DECL(int)          SELMR3Term(PVM pVM);
    9696VMMR3DECL(void)         SELMR3Reset(PVM pVM);
     97# ifdef VBOX_WITH_RAW_MODE
     98VMMR3DECL(void)         SELMR3DisableMonitoring(PVM pVM);
    9799VMMR3DECL(VBOXSTRICTRC) SELMR3UpdateFromCPUM(PVM pVM, PVMCPU pVCpu);
    98100VMMR3DECL(int)          SELMR3SyncTSS(PVM pVM, PVMCPU pVCpu);
     101# endif
    99102VMMR3DECL(int)          SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo);
    100103VMMR3DECL(int)          SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PDBGFSELINFO pSelInfo);
    101 VMMR3DECL(void)         SELMR3DisableMonitoring(PVM pVM);
    102104VMMR3DECL(void)         SELMR3DumpDescriptor(X86DESC  Desc, RTSEL Sel, const char *pszMsg);
    103105VMMR3DECL(void)         SELMR3DumpHyperGDT(PVM pVM);
     
    107109VMMR3DECL(bool)         SELMR3CheckTSS(PVM pVM);
    108110VMMR3DECL(int)          SELMR3DebugCheck(PVM pVM);
    109 #ifdef VBOX_WITH_SAFE_STR
     111# ifdef VBOX_WITH_SAFE_STR
    110112VMMR3DECL(bool)         SELMR3CheckShadowTR(PVM pVM);
    111 #endif
     113# endif
    112114
    113115/** @def SELMR3_DEBUG_CHECK
  • trunk/include/VBox/vmm/trpm.h

    r45531 r45533  
    101101VMMR3DECL(void)     TRPMR3Reset(PVM pVM);
    102102VMMR3DECL(int)      TRPMR3Term(PVM pVM);
    103 VMMR3DECL(void)     TRPMR3DisableMonitoring(PVM pVM);
    104 VMMR3DECL(int)      TRPMR3SyncIDT(PVM pVM, PVMCPU pVCpu);
    105103VMMR3DECL(int)      TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent);
    106104# ifdef VBOX_WITH_RAW_MODE
     105VMMR3DECL(void)     TRPMR3DisableMonitoring(PVM pVM);
    107106VMMR3_INT_DECL(int) TRPMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue);
     107VMMR3DECL(int)      TRPMR3SyncIDT(PVM pVM, PVMCPU pVCpu);
    108108VMMR3DECL(bool)     TRPMR3IsGateHandler(PVM pVM, RTRCPTR GCPtr);
    109109VMMR3DECL(uint32_t) TRPMR3QueryGateByHandler(PVM pVM, RTRCPTR GCPtr);
  • trunk/include/VBox/vmm/vm.h

    r45301 r45533  
    271271/** The name of the Ring 0 Context VMM Core module. */
    272272#define VMMR0_MAIN_MODULE_NAME          "VMMR0.r0"
     273
     274/**
     275 * Wrapper macro for avoiding too much \#ifdef VBOX_WITH_RAW_MODE.
     276 */
     277#ifdef VBOX_WITH_RAW_MODE
     278# define VM_WHEN_RAW_MODE(a_WithExpr, a_WithoutExpr)    a_WithExpr
     279#else
     280# define VM_WHEN_RAW_MODE(a_WithExpr, a_WithoutExpr)    a_WithoutExpr
     281#endif
     282
    273283
    274284/** VM Forced Action Flags.
     
    370380/** The bit number for VMCPU_FF_TLB_FLUSH. */
    371381#define VMCPU_FF_TLB_FLUSH_BIT              19
     382#ifdef VBOX_WITH_RAW_MODE
    372383/** Check the interrupt and trap gates */
    373 #define VMCPU_FF_TRPM_SYNC_IDT              RT_BIT_32(20)
     384# define VMCPU_FF_TRPM_SYNC_IDT             RT_BIT_32(20)
    374385/** Check Guest's TSS ring 0 stack */
    375 #define VMCPU_FF_SELM_SYNC_TSS              RT_BIT_32(21)
     386# define VMCPU_FF_SELM_SYNC_TSS             RT_BIT_32(21)
    376387/** Check Guest's GDT table */
    377 #define VMCPU_FF_SELM_SYNC_GDT              RT_BIT_32(22)
     388# define VMCPU_FF_SELM_SYNC_GDT             RT_BIT_32(22)
    378389/** Check Guest's LDT table */
    379 #define VMCPU_FF_SELM_SYNC_LDT              RT_BIT_32(23)
     390# define VMCPU_FF_SELM_SYNC_LDT             RT_BIT_32(23)
     391#endif /* VBOX_WITH_RAW_MODE */
    380392/** Inhibit interrupts pending. See EMGetInhibitInterruptsPC(). */
    381393#define VMCPU_FF_INHIBIT_INTERRUPTS         RT_BIT_32(24)
     394#ifdef VBOX_WITH_RAW_MODE
    382395/** CSAM needs to scan the page that's being executed */
    383 #define VMCPU_FF_CSAM_SCAN_PAGE             RT_BIT_32(26)
     396# define VMCPU_FF_CSAM_SCAN_PAGE            RT_BIT_32(26)
    384397/** CSAM needs to do some homework. */
    385 #define VMCPU_FF_CSAM_PENDING_ACTION        RT_BIT_32(27)
     398# define VMCPU_FF_CSAM_PENDING_ACTION       RT_BIT_32(27)
     399#endif /* VBOX_WITH_RAW_MODE */
    386400/** Force return to Ring-3. */
    387401#define VMCPU_FF_TO_R3                      RT_BIT_32(28)
     
    396410                                                 | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_EMT_RENDEZVOUS)
    397411/** Externally forced VMCPU actions. Used to quit the idle/wait loop. */
    398 #define VMCPU_FF_EXTERNAL_HALTED_MASK           (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_REQUEST | VMCPU_FF_TIMER)
     412#define VMCPU_FF_EXTERNAL_HALTED_MASK           (  VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_REQUEST \
     413                                                 | VMCPU_FF_TIMER)
    399414
    400415/** High priority VM pre-execution actions. */
    401416#define VM_FF_HIGH_PRIORITY_PRE_MASK            (  VM_FF_CHECK_VM_STATE | VM_FF_DBGF | VM_FF_TM_VIRTUAL_SYNC \
    402                                                  | VM_FF_DEBUG_SUSPEND | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)
     417                                                 | VM_FF_DEBUG_SUSPEND | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY \
     418                                                 | VM_FF_EMT_RENDEZVOUS)
    403419/** High priority VMCPU pre-execution actions. */
    404 #define VMCPU_FF_HIGH_PRIORITY_PRE_MASK         (  VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_PGM_SYNC_CR3 \
    405                                                  | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \
    406                                                  | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT | VMCPU_FF_INHIBIT_INTERRUPTS)
     420#define VMCPU_FF_HIGH_PRIORITY_PRE_MASK         (  VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \
     421                                                 | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL \
     422                                                 | VMCPU_FF_INHIBIT_INTERRUPTS \
     423                                                 | VM_WHEN_RAW_MODE(  VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \
     424                                                                    | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0 ) )
    407425
    408426/** High priority VM pre raw-mode execution mask. */
    409427#define VM_FF_HIGH_PRIORITY_PRE_RAW_MASK        (VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY)
    410428/** High priority VMCPU pre raw-mode execution mask. */
    411 #define VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK     (  VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \
    412                                                  | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT | VMCPU_FF_INHIBIT_INTERRUPTS)
     429#define VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK     (  VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL \
     430                                                 | VMCPU_FF_INHIBIT_INTERRUPTS \
     431                                                 | VM_WHEN_RAW_MODE( VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \
     432                                                                    | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0) )
    413433
    414434/** High priority post-execution actions. */
    415435#define VM_FF_HIGH_PRIORITY_POST_MASK           (VM_FF_PGM_NO_MEMORY)
    416436/** High priority post-execution actions. */
    417 #define VMCPU_FF_HIGH_PRIORITY_POST_MASK        (  VMCPU_FF_PDM_CRITSECT | VMCPU_FF_CSAM_PENDING_ACTION \
     437#define VMCPU_FF_HIGH_PRIORITY_POST_MASK        (  VMCPU_FF_PDM_CRITSECT | VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_PENDING_ACTION, 0) \
    418438                                                 | VMCPU_FF_HM_UPDATE_CR3 | VMCPU_FF_HM_UPDATE_PAE_PDPES)
    419439
     
    422442                                                 | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)
    423443/** Normal priority VMCPU post-execution actions. */
    424 #define VMCPU_FF_NORMAL_PRIORITY_POST_MASK      (VMCPU_FF_CSAM_SCAN_PAGE)
     444#define VMCPU_FF_NORMAL_PRIORITY_POST_MASK      VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_SCAN_PAGE, 0)
    425445
    426446/** Normal priority VM actions. */
    427 #define VM_FF_NORMAL_PRIORITY_MASK              (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY | VM_FF_EMT_RENDEZVOUS)
     447#define VM_FF_NORMAL_PRIORITY_MASK              (  VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY \
     448                                                 | VM_FF_EMT_RENDEZVOUS)
    428449/** Normal priority VMCPU actions. */
    429450#define VMCPU_FF_NORMAL_PRIORITY_MASK           (VMCPU_FF_REQUEST)
     
    433454
    434455/** VM Flags that cause the HM loops to go back to ring-3. */
    435 #define VM_FF_HM_TO_R3_MASK                 (VM_FF_TM_VIRTUAL_SYNC | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_PDM_QUEUES | VM_FF_EMT_RENDEZVOUS)
     456#define VM_FF_HM_TO_R3_MASK                     (  VM_FF_TM_VIRTUAL_SYNC | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY \
     457                                                 | VM_FF_PDM_QUEUES | VM_FF_EMT_RENDEZVOUS)
    436458/** VMCPU Flags that cause the HM loops to go back to ring-3. */
    437 #define VMCPU_FF_HM_TO_R3_MASK              (VMCPU_FF_TO_R3 | VMCPU_FF_TIMER | VMCPU_FF_PDM_CRITSECT)
     459#define VMCPU_FF_HM_TO_R3_MASK                  (VMCPU_FF_TO_R3 | VMCPU_FF_TIMER | VMCPU_FF_PDM_CRITSECT)
    438460
    439461/** All the forced VM flags. */
     
    447469/** All the forced VMCPU flags except those related to raw-mode and hardware
    448470 * assisted execution. */
    449 #define VMCPU_FF_ALL_REM_MASK                   (~(VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_CSAM_PENDING_ACTION | VMCPU_FF_PDM_CRITSECT | VMCPU_FF_TLB_FLUSH | VMCPU_FF_TLB_SHOOTDOWN))
    450 
     471#define VMCPU_FF_ALL_REM_MASK                   (~(  VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_PDM_CRITSECT \
     472                                                   | VMCPU_FF_TLB_FLUSH | VMCPU_FF_TLB_SHOOTDOWN \
     473                                                   | VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_PENDING_ACTION, 0) ))
    451474/** @} */
    452475
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