VirtualBox

Changeset 19217 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 27, 2009 3:00:59 PM (16 years ago)
Author:
vboxsync
Message:

UVM splitup for SMP guests. Global and local request packets supported.

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/types.h

    r18101 r19217  
    9090/** Pointer to a ring-3 (user mode) VM structure. */
    9191typedef R3PTRTYPE(struct UVM *)     PUVM;
     92
     93/** Pointer to a ring-3 (user mode) VMCPU structure. */
     94typedef R3PTRTYPE(struct UVMCPU *)  PUVMCPU;
    9295
    9396/** Virtual CPU ID. */
  • trunk/include/VBox/uvm.h

    r19101 r19217  
    4343    /** Pointer to the UVM structure.  */
    4444    PUVM                            pUVM;
     45    /** Pointer to the VM structure.  */
     46    PVM                             pVM;
     47    /** Pointer to the VMCPU structure.  */
     48    PVMCPU                          pVCpu;
    4549    /** The virtual CPU ID.  */
    4650    RTCPUID                         idCpu;
  • trunk/include/VBox/vm.h

    r19178 r19217  
    8686    VMCPUSTATE volatile     enmState;
    8787
     88    /** Pointer to the ring-3 UVMCPU structure. */
     89    PUVMCPU                 pUVCpu;
    8890    /** Ring-3 Host Context VM Pointer. */
    8991    PVMR3                   pVMR3;
     
    105107     *          following it (to grow into and align the struct size).
    106108     *   */
    107     uint32_t                au32Alignment[HC_ARCH_BITS == 32 ? 9 : 6];
     109    uint32_t                au32Alignment[HC_ARCH_BITS == 32 ? 8 : 4];
    108110
    109111    /** CPUM part. */
     
    283285#define VMCPU_FF_NORMAL_PRIORITY_POST_MASK      (VMCPU_FF_CSAM_SCAN_PAGE)
    284286
    285 /** Normal priority actions. */
     287/** Normal priority VM actions. */
    286288#define VM_FF_NORMAL_PRIORITY_MASK              (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY)
     289/** Normal priority VMCPU actions. */
     290#define VMCPU_FF_NORMAL_PRIORITY_MASK           (VMCPU_FF_REQUEST)
    287291
    288292/** Flags to clear before resuming guest execution. */
     
    324328 * @param   fFlag   The flag to set.
    325329 */
    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))
    330 #endif
     330#define VMCPU_FF_SET(pVCpu, fFlag)    ASMAtomicOrU32(&(pVCpu)->fLocalForcedActions, (fFlag))
    331331
    332332/** @def VM_FF_CLEAR
     
    351351 * @param   fFlag   The flag to clear.
    352352 */
    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))
    357 #endif
     353#define VMCPU_FF_CLEAR(pVCpu, fFlag)  ASMAtomicAndU32(&(pVCpu)->fLocalForcedActions, ~(fFlag))
    358354
    359355/** @def VM_FF_ISSET
     
    371367 * @param   fFlag   The flag to check.
    372368 */
    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))
    377 #endif
     369#define VMCPU_FF_ISSET(pVCpu, fFlag)  (((pVCpu)->fLocalForcedActions & (fFlag)) == (fFlag))
    378370
    379371/** @def VM_FF_ISPENDING
     
    391383 * @param   fFlags  The flags to check for.
    392384 */
    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))
    397 #endif
     385#define VMCPU_FF_ISPENDING(pVCpu, fFlags) ((pVCpu)->fLocalForcedActions & (fFlags))
    398386
    399387/** @def VM_FF_ISPENDING
     
    415403 * @param   fExcpt  The flags that should not be set.
    416404 */
    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)) )
    421 #endif
     405#define VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, fFlags, fExcpt) ( ((pVCpu)->fLocalForcedActions & (fFlags)) && !((pVCpu)->fLocalForcedActions & (fExcpt)) )
    422406
    423407/** @def VM_IS_EMT
  • trunk/include/VBox/vm.mac

    r19141 r19217  
    107107    .fLocalForcedActions resd 1
    108108    .enmState            resd 1
     109    .pUVCpu              RTR3PTR_RES 1
    109110    .pVMR3               RTR3PTR_RES 1
    110111    .pVMR0               RTR0PTR_RES 1
  • trunk/include/VBox/vmapi.h

    r19173 r19217  
    434434VMMR3DECL(int)  VMR3ReqWait(PVMREQ pReq, unsigned cMillies);
    435435VMMR3DECL(int)  VMR3ReqProcessU(PUVM pUVM, VMREQDEST enmDest);
    436 VMMR3DECL(void) VMR3NotifyFF(PVM pVM, bool fNotifiedREM);
    437 VMMR3DECL(void) VMR3NotifyFFU(PUVM pUVM, bool fNotifiedREM);
     436VMMR3DECL(void) VMR3NotifyGlobalFF(PVM pVM, bool fNotifiedREM);
     437VMMR3DECL(void) VMR3NotifyGlobalFFU(PUVM pUVM, bool fNotifiedREM);
     438VMMR3DECL(void) VMR3NotifyCpuFF(PVMCPU pVCpu, bool fNotifiedREM);
     439VMMR3DECL(void) VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, bool fNotifiedREM);
    438440VMMR3DECL(int)  VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts);
    439 VMMR3DECL(int)  VMR3WaitU(PUVM pUVM);
     441VMMR3DECL(int)  VMR3WaitU(PUVMCPU pUVMCpu);
    440442VMMR3DECL(RTCPUID)          VMR3GetVMCPUId(PVM pVM);
    441443VMMR3DECL(RTTHREAD)         VMR3GetVMCPUThread(PVM pVM);
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