Changeset 18617 in vbox for trunk/include/VBox
- Timestamp:
- Apr 1, 2009 10:11:29 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/param.h
r18263 r18617 48 48 * @{ 49 49 */ 50 51 50 /** Initial address of Hypervisor Memory Area. 52 51 * MUST BE PAGE TABLE ALIGNED! */ … … 79 78 /** The default size of the below 4GB RAM hole. */ 80 79 #define MM_RAM_HOLE_SIZE_DEFAULT (512U * _1M) 80 /** @} */ 81 81 82 83 /** @defgroup grp_vbox_param_pgm Page Manager Parameters 84 * @ingroup grp_vbox_param 85 * @{ 86 */ 87 /** The number of handy pages. 88 * This should be a power of two. */ 89 #define PGM_HANDY_PAGES 128 90 /** The threshold at which allocation of more handy pages is flagged. */ 91 #define PGM_HANDY_PAGES_SET_FF 32 92 /** The threshold at which we will allocate more when in ring-3. 93 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and 94 * PGM_HANDY_PAGES_MIN. */ 95 #define PGM_HANDY_PAGES_R3_ALLOC 8 96 /** The threshold at which we will allocate more when in ring-0 or raw mode. 97 * The idea is that we should never go below this threshold while in ring-0 or 98 * raw mode because of PGM_HANDY_PAGES_RZ_TO_R3. However, should this happen and 99 * we are actually out of memory, we will have 8 page to get out of whatever 100 * code we're executing. 101 * 102 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and 103 * PGM_HANDY_PAGES_MIN. */ 104 #define PGM_HANDY_PAGES_RZ_ALLOC 8 105 /** The threshold at which we force return to R3 ASAP. 106 * The idea is that this should be large enough to get out of any code and up to 107 * the main EM loop when we are out of memory. 108 * This must be less or equal to PGM_HANDY_PAGES_MIN. */ 109 #define PGM_HANDY_PAGES_RZ_TO_R3 24 110 /** The minimum number of handy pages (after allocation). 111 * This must be greater or equal to PGM_HANDY_PAGES_SET_FF. 112 * Another name would be PGM_HANDY_PAGES_EXTRA_RESERVATION or _PARANOIA. :-) */ 113 #define PGM_HANDY_PAGES_MIN 32 82 114 /** @} */ 83 115 … … 87 119 * @{ 88 120 */ 89 90 121 /** VMM stack size. */ 91 122 #define VMM_STACK_SIZE 8192U 92 93 123 /** @} */ 94 124 -
trunk/include/VBox/vm.h
r17546 r18617 211 211 /** PGM needs to allocate handy pages. */ 212 212 #define VM_FF_PGM_NEED_HANDY_PAGES RT_BIT_32(18) 213 /** PGM is out of memory. 214 * Abandon all loops and code paths which can be resumed and get up to the EM 215 * loops. */ 216 #define VM_FF_PGM_NO_MEMORY RT_BIT_32(19) 213 217 /** Check the interupt and trap gates */ 214 #define VM_FF_TRPM_SYNC_IDT RT_BIT_32( 19)218 #define VM_FF_TRPM_SYNC_IDT RT_BIT_32(20) 215 219 /** Check Guest's TSS ring 0 stack */ 216 #define VM_FF_SELM_SYNC_TSS RT_BIT_32(2 0)220 #define VM_FF_SELM_SYNC_TSS RT_BIT_32(21) 217 221 /** Check Guest's GDT table */ 218 #define VM_FF_SELM_SYNC_GDT RT_BIT_32(2 1)222 #define VM_FF_SELM_SYNC_GDT RT_BIT_32(22) 219 223 /** Check Guest's LDT table */ 220 #define VM_FF_SELM_SYNC_LDT RT_BIT_32(2 2)224 #define VM_FF_SELM_SYNC_LDT RT_BIT_32(23) 221 225 /** Inhibit interrupts pending. See EMGetInhibitInterruptsPC(). */ 222 #define VM_FF_INHIBIT_INTERRUPTS RT_BIT_32(2 3)226 #define VM_FF_INHIBIT_INTERRUPTS RT_BIT_32(24) 223 227 224 228 /** CSAM needs to scan the page that's being executed */ 225 #define VM_FF_CSAM_SCAN_PAGE RT_BIT_32(2 4)229 #define VM_FF_CSAM_SCAN_PAGE RT_BIT_32(26) 226 230 /** CSAM needs to do some homework. */ 227 #define VM_FF_CSAM_PENDING_ACTION RT_BIT_32(2 5)231 #define VM_FF_CSAM_PENDING_ACTION RT_BIT_32(27) 228 232 229 233 /** Force return to Ring-3. */ … … 242 246 /** High priority pre-execution actions. */ 243 247 #define VM_FF_HIGH_PRIORITY_PRE_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_INTERRUPT_APIC | VM_FF_INTERRUPT_PIC | VM_FF_TIMER | VM_FF_DEBUG_SUSPEND \ 244 | VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL | VM_FF_SELM_SYNC_TSS | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT | VM_FF_PGM_NEED_HANDY_PAGES )248 | VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL | VM_FF_SELM_SYNC_TSS | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY) 245 249 /** High priority pre raw-mode execution mask. */ 246 #define VM_FF_HIGH_PRIORITY_PRE_RAW_MASK (VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL | VM_FF_SELM_SYNC_TSS | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT | VM_FF_PGM_NEED_HANDY_PAGES\247 | VM_FF_INHIBIT_INTERRUPTS)250 #define VM_FF_HIGH_PRIORITY_PRE_RAW_MASK (VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL | VM_FF_SELM_SYNC_TSS | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT \ 251 | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_INHIBIT_INTERRUPTS | VM_FF_PGM_NO_MEMORY) 248 252 /** High priority post-execution actions. */ 249 #define VM_FF_HIGH_PRIORITY_POST_MASK (VM_FF_PDM_CRITSECT | VM_FF_CSAM_PENDING_ACTION )253 #define VM_FF_HIGH_PRIORITY_POST_MASK (VM_FF_PDM_CRITSECT | VM_FF_CSAM_PENDING_ACTION | VM_FF_PGM_NO_MEMORY) 250 254 /** Normal priority post-execution actions. */ 251 #define VM_FF_NORMAL_PRIORITY_POST_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_RESET | VM_FF_CSAM_SCAN_PAGE )255 #define VM_FF_NORMAL_PRIORITY_POST_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_RESET | VM_FF_CSAM_SCAN_PAGE | VM_FF_PGM_NO_MEMORY) 252 256 /** Normal priority actions. */ 253 257 #define VM_FF_NORMAL_PRIORITY_MASK (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY) 254 /** Flags to c heckbefore resuming guest execution. */258 /** Flags to clear before resuming guest execution. */ 255 259 #define VM_FF_RESUME_GUEST_MASK (VM_FF_TO_R3) 260 /** Flags that causes the HWACCM loops to go back to ring-3. */ 261 #define VM_FF_HWACCM_TO_R3_MASK (VM_FF_TO_R3 | VM_FF_TIMER | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY) 256 262 /** All the forced flags. */ 257 263 #define VM_FF_ALL_MASK (~0U) 258 264 /** All the forced flags. */ 259 #define VM_FF_ALL_BUT_RAW_MASK (~(VM_FF_HIGH_PRIORITY_PRE_RAW_MASK | VM_FF_CSAM_PENDING_ACTION | VM_FF_PDM_CRITSECT) )265 #define VM_FF_ALL_BUT_RAW_MASK (~(VM_FF_HIGH_PRIORITY_PRE_RAW_MASK | VM_FF_CSAM_PENDING_ACTION | VM_FF_PDM_CRITSECT) | VM_FF_PGM_NO_MEMORY) 260 266 261 267 /** @} */ … … 357 363 #else 358 364 # define VMCPU_FF_ISPENDING(pVM, idCpu, fFlags) VM_FF_ISPENDING(pVM, fFlags) 365 #endif 366 367 /** @def VM_FF_ISPENDING 368 * Checks if one or more force action in the specified set is pending while one 369 * or more other ones are not. 370 * 371 * @param pVM VM Handle. 372 * @param fFlags The flags to check for. 373 * @param fExcpt The flags that should not be set. 374 */ 375 #define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt) ( ((pVM)->fForcedActions & (fFlags)) && !((pVM)->fForcedActions & (fExcpt)) ) 376 377 /** @def VMCPU_FF_IS_PENDING_EXCEPT 378 * Checks if one or more force action in the specified set is pending for given 379 * VCPU while one or more other ones are not. 380 * 381 * @param pVM VM Handle. 382 * @param idCpu Virtual CPU ID. 383 * @param fFlags The flags to check for. 384 * @param fExcpt The flags that should not be set. 385 */ 386 #ifdef VBOX_WITH_SMP_GUESTS 387 # define VMCPU_FF_IS_PENDING_EXCEPT(pVM, idCpu, fFlags, fExcpt) ( ((pVM)->aCpu[idCpu].fForcedActions & (fFlags)) && !((pVM)->aCpu[idCpu].fForcedActions & (fExcpt)) ) 388 #else 389 # define VMCPU_FF_IS_PENDING_EXCEPT(pVM, idCpu, fFlags, fExcpt) VM_FF_ISPENDING(pVM, fFlags, fExcpt) 359 390 #endif 360 391
Note:
See TracChangeset
for help on using the changeset viewer.