Changeset 19141 in vbox for trunk/include/VBox
- Timestamp:
- Apr 23, 2009 1:52:18 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/csam.h
r12989 r19141 259 259 * @returns VBox status code. 260 260 * @param pVM The VM to operate on. 261 */ 262 VMMR3DECL(int) CSAMR3DoPendingAction(PVM pVM); 261 * @param pVCpu The VMCPU to operate on. 262 */ 263 VMMR3DECL(int) CSAMR3DoPendingAction(PVM pVM, PVMCPU pVCpu); 263 264 264 265 /** -
trunk/include/VBox/em.h
r18927 r19141 117 117 #define EMIsRawRing0Enabled(pVM) ((pVM)->fRawR0Enabled) 118 118 119 VMMDECL(void) EMSetInhibitInterruptsPC(PVM pVM, PVMCPU pVCpu, RTGCUINTPTR PC);120 VMMDECL(RTGCUINTPTR) EMGetInhibitInterruptsPC(PVM pVM, PVMCPU pVCpu);119 VMMDECL(void) EMSetInhibitInterruptsPC(PVMCPU pVCpu, RTGCUINTPTR PC); 120 VMMDECL(RTGCUINTPTR) EMGetInhibitInterruptsPC(PVMCPU pVCpu); 121 121 VMMDECL(int) EMInterpretDisasOne(PVM pVM, PVMCPU pVCpu, PCCPUMCTXCORE pCtxCore, PDISCPUSTATE pCpu, unsigned *pcbInstr); 122 122 VMMDECL(int) EMInterpretDisasOneEx(PVM pVM, PVMCPU pVCpu, RTGCUINTPTR GCPtrInstr, PCCPUMCTXCORE pCtxCore, -
trunk/include/VBox/pdmapi.h
r18618 r19141 43 43 */ 44 44 45 VMMDECL(int) PDMGetInterrupt(PVM pVM, uint8_t *pu8Interrupt);45 VMMDECL(int) PDMGetInterrupt(PVMCPU pVCpu, uint8_t *pu8Interrupt); 46 46 VMMDECL(int) PDMIsaSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level); 47 47 VMMDECL(int) PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level); -
trunk/include/VBox/vm.h
r19015 r19141 82 82 /** Per CPU forced action. 83 83 * See the VMCPU_FF_* \#defines. Updated atomically. */ 84 uint32_t volatile f ForcedActions;84 uint32_t volatile fLocalForcedActions; 85 85 /** The CPU state. */ 86 86 VMCPUSTATE volatile enmState; … … 187 187 * @{ 188 188 */ 189 /** This action forces the VM to service check and pending interrups on the APIC. */190 #define VM_FF_INTERRUPT_APIC RT_BIT_32(0)191 /** This action forces the VM to service check and pending interrups on the PIC. */192 #define VM_FF_INTERRUPT_PIC RT_BIT_32(1)193 189 /** This action forces the VM to schedule and run pending timer (TM). */ 194 #define VM_FF_TIMER RT_BIT_32(2)190 #define VM_FF_TIMER RT_BIT_32(2) 195 191 /** PDM Queues are pending. */ 196 #define VM_FF_PDM_QUEUES RT_BIT_32(3)192 #define VM_FF_PDM_QUEUES RT_BIT_32(3) 197 193 /** PDM DMA transfers are pending. */ 198 #define VM_FF_PDM_DMA RT_BIT_32(4)194 #define VM_FF_PDM_DMA RT_BIT_32(4) 199 195 /** PDM critical section unlocking is pending, process promptly upon return to R3. */ 200 #define VM_FF_PDM_CRITSECT RT_BIT_32(5) 201 196 #define VM_FF_PDM_CRITSECT RT_BIT_32(5) 202 197 /** This action forces the VM to call DBGF so DBGF can service debugger 203 198 * requests in the emulation thread. 204 199 * This action flag stays asserted till DBGF clears it.*/ 205 #define VM_FF_DBGF RT_BIT_32(8)200 #define VM_FF_DBGF RT_BIT_32(8) 206 201 /** This action forces the VM to service pending requests from other 207 202 * thread or requests which must be executed in another context. */ 208 #define VM_FF_REQUEST RT_BIT_32(9)203 #define VM_FF_REQUEST RT_BIT_32(9) 209 204 /** Terminate the VM immediately. */ 210 #define VM_FF_TERMINATE RT_BIT_32(10)205 #define VM_FF_TERMINATE RT_BIT_32(10) 211 206 /** Reset the VM. (postponed) */ 212 #define VM_FF_RESET RT_BIT_32(11) 213 214 /** This action forces the VM to resync the page tables before going 215 * back to execute guest code. (GLOBAL FLUSH) */ 216 #define VM_FF_PGM_SYNC_CR3 RT_BIT_32(16) 217 /** Same as VM_FF_PGM_SYNC_CR3 except that global pages can be skipped. 218 * (NON-GLOBAL FLUSH) */ 219 #define VM_FF_PGM_SYNC_CR3_NON_GLOBAL RT_BIT_32(17) 207 #define VM_FF_RESET RT_BIT_32(11) 220 208 /** PGM needs to allocate handy pages. */ 221 #define VM_FF_PGM_NEED_HANDY_PAGES RT_BIT_32(18)209 #define VM_FF_PGM_NEED_HANDY_PAGES RT_BIT_32(18) 222 210 /** PGM is out of memory. 223 211 * Abandon all loops and code paths which can be resumed and get up to the EM 224 212 * loops. */ 225 #define VM_FF_PGM_NO_MEMORY RT_BIT_32(19) 213 #define VM_FF_PGM_NO_MEMORY RT_BIT_32(19) 214 /** REM needs to be informed about handler changes. */ 215 #define VM_FF_REM_HANDLER_NOTIFY RT_BIT_32(29) 216 /** Suspend the VM - debug only. */ 217 #define VM_FF_DEBUG_SUSPEND RT_BIT_32(31) 218 219 220 /** This action forces the VM to service check and pending interrups on the APIC. */ 221 #define VMCPU_FF_INTERRUPT_APIC RT_BIT_32(0) 222 /** This action forces the VM to service check and pending interrups on the PIC. */ 223 #define VMCPU_FF_INTERRUPT_PIC RT_BIT_32(1) 224 /** This action forces the VM to schedule and run pending timer (TM). (bogus for now; needed for PATM backwards compatibility) */ 225 #define VMCPU_FF_TIMER RT_BIT_32(2) 226 /** This action forces the VM to service pending requests from other 227 * thread or requests which must be executed in another context. */ 228 #define VMCPU_FF_REQUEST RT_BIT_32(9) 229 /** This action forces the VM to resync the page tables before going 230 * back to execute guest code. (GLOBAL FLUSH) */ 231 #define VMCPU_FF_PGM_SYNC_CR3 RT_BIT_32(16) 232 /** Same as VM_FF_PGM_SYNC_CR3 except that global pages can be skipped. 233 * (NON-GLOBAL FLUSH) */ 234 #define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL RT_BIT_32(17) 226 235 /** Check the interupt and trap gates */ 227 #define VM _FF_TRPM_SYNC_IDTRT_BIT_32(20)236 #define VMCPU_FF_TRPM_SYNC_IDT RT_BIT_32(20) 228 237 /** Check Guest's TSS ring 0 stack */ 229 #define VM _FF_SELM_SYNC_TSSRT_BIT_32(21)238 #define VMCPU_FF_SELM_SYNC_TSS RT_BIT_32(21) 230 239 /** Check Guest's GDT table */ 231 #define VM _FF_SELM_SYNC_GDTRT_BIT_32(22)240 #define VMCPU_FF_SELM_SYNC_GDT RT_BIT_32(22) 232 241 /** Check Guest's LDT table */ 233 #define VM _FF_SELM_SYNC_LDTRT_BIT_32(23)242 #define VMCPU_FF_SELM_SYNC_LDT RT_BIT_32(23) 234 243 /** Inhibit interrupts pending. See EMGetInhibitInterruptsPC(). */ 235 #define VM_FF_INHIBIT_INTERRUPTS RT_BIT_32(24) 236 244 #define VMCPU_FF_INHIBIT_INTERRUPTS RT_BIT_32(24) 237 245 /** CSAM needs to scan the page that's being executed */ 238 #define VM _FF_CSAM_SCAN_PAGERT_BIT_32(26)246 #define VMCPU_FF_CSAM_SCAN_PAGE RT_BIT_32(26) 239 247 /** CSAM needs to do some homework. */ 240 #define VM_FF_CSAM_PENDING_ACTION RT_BIT_32(27) 241 248 #define VMCPU_FF_CSAM_PENDING_ACTION RT_BIT_32(27) 242 249 /** Force return to Ring-3. */ 243 #define VM_FF_TO_R3 RT_BIT_32(28) 244 245 /** REM needs to be informed about handler changes. */ 246 #define VM_FF_REM_HANDLER_NOTIFY RT_BIT_32(29) 247 248 /** Suspend the VM - debug only. */ 249 #define VM_FF_DEBUG_SUSPEND RT_BIT_32(31) 250 251 /** Externally forced actions. Used to quit the idle/wait loop. */ 252 #define VM_FF_EXTERNAL_SUSPENDED_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_REQUEST) 253 /** Externally forced actions. Used to quit the idle/wait loop. */ 254 #define VM_FF_EXTERNAL_HALTED_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_TIMER | VM_FF_INTERRUPT_APIC | VM_FF_INTERRUPT_PIC | VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA) 255 /** High priority pre-execution actions. */ 256 #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 \ 257 | 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) 258 /** High priority pre raw-mode execution mask. */ 259 #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 \ 260 | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_INHIBIT_INTERRUPTS | VM_FF_PGM_NO_MEMORY) 250 #define VMCPU_FF_TO_R3 RT_BIT_32(28) 251 252 /** Externally VM forced actions. Used to quit the idle/wait loop. */ 253 #define VM_FF_EXTERNAL_SUSPENDED_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_REQUEST) 254 /** Externally VMCPU forced actions. Used to quit the idle/wait loop. */ 255 #define VMCPU_FF_EXTERNAL_SUSPENDED_MASK (VMCPU_FF_REQUEST) 256 257 /** Externally forced VM actions. Used to quit the idle/wait loop. */ 258 #define VM_FF_EXTERNAL_HALTED_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_TIMER | VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA) 259 /** Externally forced VMCPU actions. Used to quit the idle/wait loop. */ 260 #define VMCPU_FF_EXTERNAL_HALTED_MASK (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_REQUEST) 261 262 /** High priority VM pre-execution actions. */ 263 #define VM_FF_HIGH_PRIORITY_PRE_MASK ( VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_TIMER | VM_FF_DEBUG_SUSPEND \ 264 | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY) 265 /** High priority VMCPU pre-execution actions. */ 266 #define VMCPU_FF_HIGH_PRIORITY_PRE_MASK ( VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \ 267 | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT) 268 269 /** High priority VM pre raw-mode execution mask. */ 270 #define VM_FF_HIGH_PRIORITY_PRE_RAW_MASK (VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY) 271 /** High priority VMCPU pre raw-mode execution mask. */ 272 #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 | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT \ 273 | VMCPU_FF_INHIBIT_INTERRUPTS) 274 261 275 /** High priority post-execution actions. */ 262 #define VM_FF_HIGH_PRIORITY_POST_MASK (VM_FF_PDM_CRITSECT | VM_FF_CSAM_PENDING_ACTION | VM_FF_PGM_NO_MEMORY) 263 /** Normal priority post-execution actions. */ 264 #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) 276 #define VM_FF_HIGH_PRIORITY_POST_MASK (VM_FF_PDM_CRITSECT | VM_FF_PGM_NO_MEMORY) 277 /** High priority post-execution actions. */ 278 #define VMCPU_FF_HIGH_PRIORITY_POST_MASK (VMCPU_FF_CSAM_PENDING_ACTION) 279 280 /** Normal priority VM post-execution actions. */ 281 #define VM_FF_NORMAL_PRIORITY_POST_MASK (VM_FF_TERMINATE | VM_FF_DBGF | VM_FF_RESET | VM_FF_PGM_NO_MEMORY) 282 /** Normal priority VMCPU post-execution actions. */ 283 #define VMCPU_FF_NORMAL_PRIORITY_POST_MASK (VMCPU_FF_CSAM_SCAN_PAGE) 284 265 285 /** Normal priority actions. */ 266 #define VM_FF_NORMAL_PRIORITY_MASK (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY) 286 #define VM_FF_NORMAL_PRIORITY_MASK (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY) 287 267 288 /** Flags to clear before resuming guest execution. */ 268 #define VM_FF_RESUME_GUEST_MASK (VM_FF_TO_R3) 269 /** Flags that causes the HWACCM loops to go back to ring-3. */ 270 #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) 289 #define VMCPU_FF_RESUME_GUEST_MASK (VMCPU_FF_TO_R3) 290 291 /** VM Flags that cause the HWACCM loops to go back to ring-3. */ 292 #define VM_FF_HWACCM_TO_R3_MASK (VM_FF_TIMER | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY) 293 /** VMCPU Flags that cause the HWACCM loops to go back to ring-3. */ 294 #define VMCPU_FF_HWACCM_TO_R3_MASK (VMCPU_FF_TO_R3) 295 271 296 /** All the forced flags. */ 272 #define VM_FF_ALL_MASK (~0U) 273 /** All the forced flags. */ 274 #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) 297 #define VM_FF_ALL_MASK (~0U) 298 /** All the forced VM flags. */ 299 #define VM_FF_ALL_BUT_RAW_MASK (~(VM_FF_HIGH_PRIORITY_PRE_RAW_MASK | VM_FF_PDM_CRITSECT) | VM_FF_PGM_NO_MEMORY) 300 /** All the forced VMCPU flags. */ 301 #define VMCPU_FF_ALL_BUT_RAW_MASK (~(VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_CSAM_PENDING_ACTION)) 275 302 276 303 /** @} */ … … 283 310 */ 284 311 #if 1 285 # define VM_FF_SET(pVM, fFlag) ASMAtomicOrU32(&(pVM)->f ForcedActions, (fFlag))312 # define VM_FF_SET(pVM, fFlag) ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag)) 286 313 #else 287 314 # define VM_FF_SET(pVM, fFlag) \ 288 do { ASMAtomicOrU32(&(pVM)->f ForcedActions, (fFlag)); \289 RTLogPrintf("VM_FF_SET : %08x %s - %s(%d) %s\n", (pVM)->f ForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \315 do { ASMAtomicOrU32(&(pVM)->fGlobalForcedActions, (fFlag)); \ 316 RTLogPrintf("VM_FF_SET : %08x %s - %s(%d) %s\n", (pVM)->fGlobalForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \ 290 317 } while (0) 291 318 #endif 292 319 293 320 /** @def VMCPU_FF_SET 294 * Sets a force action flag for given VCPU. 295 * 296 * @param pVM VM Handle. 297 * @param idCpu Virtual CPU ID. 321 * Sets a force action flag for the given VCPU. 322 * 323 * @param pVCpu VMCPU Handle. 298 324 * @param fFlag The flag to set. 299 325 */ 300 #if def VBOX_WITH_SMP_GUESTS301 # define VMCPU_FF_SET(pV M, idCpu, fFlag) ASMAtomicOrU32(&(pVM)->aCpu[idCpu].fForcedActions, (fFlag))302 #else 303 # define VMCPU_FF_SET(pV M, idCpu, fFlag) VM_FF_SET(pVM, fFlag)326 #if 1 //def VBOX_WITH_SMP_GUESTS 327 # define VMCPU_FF_SET(pVCpu, fFlag) ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag)) 328 #else 329 # define VMCPU_FF_SET(pVCpu, fFlag) ASMAtomicOrU32(&(pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions, (fFlag)) 304 330 #endif 305 331 … … 311 337 */ 312 338 #if 1 313 # define VM_FF_CLEAR(pVM, fFlag) ASMAtomicAndU32(&(pVM)->f ForcedActions, ~(fFlag))339 # define VM_FF_CLEAR(pVM, fFlag) ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag)) 314 340 #else 315 341 # define VM_FF_CLEAR(pVM, fFlag) \ 316 do { ASMAtomicAndU32(&(pVM)->f ForcedActions, ~(fFlag)); \317 RTLogPrintf("VM_FF_CLEAR: %08x %s - %s(%d) %s\n", (pVM)->f ForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \342 do { ASMAtomicAndU32(&(pVM)->fGlobalForcedActions, ~(fFlag)); \ 343 RTLogPrintf("VM_FF_CLEAR: %08x %s - %s(%d) %s\n", (pVM)->fGlobalForcedActions, #fFlag, __FILE__, __LINE__, __FUNCTION__); \ 318 344 } while (0) 319 345 #endif 320 346 321 347 /** @def VMCPU_FF_CLEAR 322 * Clears a force action flag for given VCPU. 323 * 324 * @param pVM VM Handle. 325 * @param idCpu Virtual CPU ID. 348 * Clears a force action flag for the given VCPU. 349 * 350 * @param pVCpu VMCPU Handle. 326 351 * @param fFlag The flag to clear. 327 352 */ 328 #if def VBOX_WITH_SMP_GUESTS329 # define VMCPU_FF_CLEAR(pV M, idCpu, fFlag) ASMAtomicAndU32(&(pVM)->aCpu[idCpu].fForcedActions, ~(fFlag))330 #else 331 # define VMCPU_FF_CLEAR(pV M, idCpu, fFlag) VM_FF_CLEAR(pVM, fFlag)353 #if 1 //def VBOX_WITH_SMP_GUESTS 354 # define VMCPU_FF_CLEAR(pVCpu, fFlag) ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlag)) 355 #else 356 # define VMCPU_FF_CLEAR(pVCpu, fFlag) ASMAtomicAndU32(&(pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions, ~(fFlag)) 332 357 #endif 333 358 … … 338 363 * @param fFlag The flag to check. 339 364 */ 340 #define VM_FF_ISSET(pVM, fFlag) (((pVM)->f ForcedActions & (fFlag)) == (fFlag))365 #define VM_FF_ISSET(pVM, fFlag) (((pVM)->fGlobalForcedActions & (fFlag)) == (fFlag)) 341 366 342 367 /** @def VMCPU_FF_ISSET 343 * Checks if a force action flag is set for given VCPU. 344 * 345 * @param pVM VM Handle. 346 * @param idCpu Virtual CPU ID. 368 * Checks if a force action flag is set for the given VCPU. 369 * 370 * @param pVCpu VMCPU Handle. 347 371 * @param fFlag The flag to check. 348 372 */ 349 #if def VBOX_WITH_SMP_GUESTS350 # define VMCPU_FF_ISSET(pV M, idCpu, fFlag) (((pVM)->aCpu[idCpu].fForcedActions & (fFlag)) == (fFlag))351 #else 352 # define VMCPU_FF_ISSET(pV M, idCpu, fFlag) VM_FF_ISSET(pVM, fFlag)373 #if 1 //def VBOX_WITH_SMP_GUESTS 374 # define VMCPU_FF_ISSET(pVCpu, fFlag) (((pVCpu)->fLocalForcedActions & (fFlag)) == (fFlag)) 375 #else 376 # define VMCPU_FF_ISSET(pVCpu, fFlag) (((pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions & (fFlag)) == (fFlag)) 353 377 #endif 354 378 … … 359 383 * @param fFlags The flags to check for. 360 384 */ 361 #define VM_FF_ISPENDING(pVM, fFlags) ((pVM)->f ForcedActions & (fFlags))385 #define VM_FF_ISPENDING(pVM, fFlags) ((pVM)->fGlobalForcedActions & (fFlags)) 362 386 363 387 /** @def VMCPU_FF_ISPENDING 364 * Checks if one or more force action in the specified set is pending for given VCPU. 365 * 366 * @param pVM VM Handle. 367 * @param idCpu Virtual CPU ID. 388 * Checks if one or more force action in the specified set is pending for the given VCPU. 389 * 390 * @param pVCpu VMCPU Handle. 368 391 * @param fFlags The flags to check for. 369 392 */ 370 #if def VBOX_WITH_SMP_GUESTS371 # define VMCPU_FF_ISPENDING(pV M, idCpu, fFlags) ((pVM)->aCpu[idCpu].fForcedActions & (fFlags))372 #else 373 # define VMCPU_FF_ISPENDING(pV M, idCpu, fFlags) VM_FF_ISPENDING(pVM, fFlags)393 #if 1 //def VBOX_WITH_SMP_GUESTS 394 # define VMCPU_FF_ISPENDING(pVCpu, fFlags) ((pVCpu)->fLocalForcedActions & (fFlags)) 395 #else 396 # define VMCPU_FF_ISPENDING(pVCpu, fFlags) ((pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions & (fFlags)) 374 397 #endif 375 398 … … 382 405 * @param fExcpt The flags that should not be set. 383 406 */ 384 #define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt) ( ((pVM)->f ForcedActions & (fFlags)) && !((pVM)->fForcedActions & (fExcpt)) )407 #define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt) ( ((pVM)->fGlobalForcedActions & (fFlags)) && !((pVM)->fGlobalForcedActions & (fExcpt)) ) 385 408 386 409 /** @def VMCPU_FF_IS_PENDING_EXCEPT 387 * Checks if one or more force action in the specified set is pending for given410 * Checks if one or more force action in the specified set is pending for the given 388 411 * VCPU while one or more other ones are not. 389 412 * 390 * @param pVM VM Handle. 391 * @param idCpu Virtual CPU ID. 413 * @param pVCpu VMCPU Handle. 392 414 * @param fFlags The flags to check for. 393 415 * @param fExcpt The flags that should not be set. 394 416 */ 395 #if def VBOX_WITH_SMP_GUESTS396 # define VMCPU_FF_IS_PENDING_EXCEPT(pV M, idCpu, fFlags, fExcpt) ( ((pVM)->aCpu[idCpu].fForcedActions & (fFlags)) && !((pVM)->aCpu[idCpu].fForcedActions & (fExcpt)) )397 #else 398 # define VMCPU_FF_IS_PENDING_EXCEPT(pV M, idCpu, fFlags, fExcpt) VM_FF_ISPENDING(pVM, fFlags, fExcpt)417 #if 1 //def VBOX_WITH_SMP_GUESTS 418 # define VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, fFlags, fExcpt) ( ((pVCpu)->fLocalForcedActions & (fFlags)) && !((pVCpu)->fLocalForcedActions & (fExcpt)) ) 419 #else 420 # define VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, fFlags, fExcpt) ( ((pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions & (fFlags)) && !((pVCpu)->CTX_SUFF(pVM)->fGlobalForcedActions & (fExcpt)) ) 399 421 #endif 400 422 … … 487 509 * See the VM_FF_* \#defines. Updated atomically. 488 510 */ 489 volatile uint32_t f ForcedActions;511 volatile uint32_t fGlobalForcedActions; 490 512 /** Pointer to the array of page descriptors for the VM structure allocation. */ 491 513 R3PTRTYPE(PSUPPAGE) paVMPagesR3; -
trunk/include/VBox/vm.mac
r18927 r19141 35 35 36 36 ;/** This action forces the VM to service check and pending interrups on the APIC. */ 37 %define VM _FF_INTERRUPT_APIC (1 << 0)37 %define VMCPU_FF_INTERRUPT_APIC (1 << 0) 38 38 ;/** This action forces the VM to service check and pending interrups on the PIC. */ 39 %define VM _FF_INTERRUPT_PIC (1 << 1)39 %define VMCPU_FF_INTERRUPT_PIC (1 << 1) 40 40 ;/** This action forces the VM to schedule and run pending timer (TM). */ 41 %define VM _FF_TIMER (1 << 2)41 %define VMCPU_FF_TIMER (1 << 2) 42 42 ;/** This action forces the VM to service pending requests from other 43 43 ; * thread or requests which must be executed in another context. */ 44 %define VM _FF_REQUEST (1 << 9)44 %define VMCPU_FF_REQUEST (1 << 9) 45 45 46 46 ;; … … 48 48 struc VM 49 49 .enmVMState resd 1 50 .f ForcedActionsresd 150 .fGlobalForcedActions resd 1 51 51 .paVMPagesR3 RTR3PTR_RES 1 52 52 .pSession RTR0PTR_RES 1 … … 105 105 ; This is part of the VMCPU structure. 106 106 struc VMCPU 107 .f ForcedActionsresd 1108 .enmState resd 1109 .pVMR3 RTR3PTR_RES 1110 .pVMR0 RTR0PTR_RES 1111 .pVMRC RTRCPTR_RES 1112 .idCpu resd 1107 .fLocalForcedActions resd 1 108 .enmState resd 1 109 .pVMR3 RTR3PTR_RES 1 110 .pVMR0 RTR0PTR_RES 1 111 .pVMRC RTRCPTR_RES 1 112 .idCpu resd 1 113 113 114 .hNativeThread RTR0PTR_RES 1114 .hNativeThread RTR0PTR_RES 1 115 115 116 116 alignb 64 117 117 118 .cpum resb 2048118 .cpum resb 4096 119 119 endstruc 120 120 -
trunk/include/VBox/vmapi.h
r18649 r19141 432 432 VMMR3DECL(void) VMR3NotifyFF(PVM pVM, bool fNotifiedREM); 433 433 VMMR3DECL(void) VMR3NotifyFFU(PUVM pUVM, bool fNotifiedREM); 434 VMMR3DECL(int) VMR3WaitHalted(PVM pVM, bool fIgnoreInterrupts);434 VMMR3DECL(int) VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts); 435 435 VMMR3DECL(int) VMR3WaitU(PUVM pUVM); 436 436 VMMR3DECL(RTCPUID) VMR3GetVMCPUId(PVM pVM);
Note:
See TracChangeset
for help on using the changeset viewer.