VirtualBox

Changeset 75646 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Nov 21, 2018 3:38:10 PM (6 years ago)
Author:
vboxsync
Message:

VMM: HLT/MWAIT optimizations for busy guests: don't go back to ring-3 just to call GVMMR0SchedHalt(), do the first call in ring-0. This saves a reduces interrupt latency for some workloads. bugref:9172

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

Legend:

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

    r75611 r75646  
    21292129VMMDECL(bool)           CPUMIsPatMsrValid(uint64_t uValue);
    21302130
     2131/** Guest CPU interruptibility level, see CPUMGetGuestInterruptibility(). */
     2132typedef enum CPUMINTERRUPTIBILITY
     2133{
     2134    CPUMINTERRUPTIBILITY_INVALID = 0,
     2135    CPUMINTERRUPTIBILITY_UNRESTRAINED,
     2136    CPUMINTERRUPTIBILITY_INT_INHIBITED,
     2137    CPUMINTERRUPTIBILITY_INT_DISABLED,
     2138    CPUMINTERRUPTIBILITY_NMI_INHIBIT,
     2139    CPUMINTERRUPTIBILITY_GLOBAL_INHIBIT,
     2140    CPUMINTERRUPTIBILITY_END,
     2141    CPUMINTERRUPTIBILITY_32BIT_HACK = 0x7fffffff
     2142} CPUMINTERRUPTIBILITY;
     2143
     2144/**
     2145 * Calculates the interruptiblity of the guest.
     2146 *
     2147 * @returns Interruptibility level.
     2148 * @param   pVCpu               The cross context virtual CPU structure.
     2149 */
     2150VMM_INT_DECL(CPUMINTERRUPTIBILITY) CPUMGetGuestInterruptibility(PVMCPU pVCpu);
     2151
     2152
    21312153/** @name Typical scalable bus frequency values.
    21322154 * @{ */
  • trunk/include/VBox/vmm/em.h

    r74204 r75646  
    178178VMMDECL(void)                   EMSetInhibitInterruptsPC(PVMCPU pVCpu, RTGCUINTPTR PC);
    179179VMMDECL(RTGCUINTPTR)            EMGetInhibitInterruptsPC(PVMCPU pVCpu);
     180VMMDECL(bool)                   EMIsInhibitInterruptsActive(PVMCPU pVCpu);
    180181VMMDECL(void)                   EMSetHypercallInstructionsEnabled(PVMCPU pVCpu, bool fEnabled);
    181182VMMDECL(bool)                   EMAreHypercallInstructionsEnabled(PVMCPU pVCpu);
     
    185186VMM_INT_DECL(void)              EMMonitorWaitClear(PVMCPU pVCpu);
    186187VMM_INT_DECL(bool)              EMMonitorIsArmed(PVMCPU pVCpu);
     188VMM_INT_DECL(unsigned)          EMMonitorWaitIsActive(PVMCPU pVCpu);
    187189VMM_INT_DECL(int)               EMMonitorWaitPerform(PVMCPU pVCpu, uint64_t rax, uint64_t rcx);
    188190VMM_INT_DECL(int)               EMUnhaltAndWakeUp(PVM pVM, PVMCPU pVCpuDst);
  • trunk/include/VBox/vmm/gvmm.h

    r72778 r75646  
    172172GVMMR0DECL(PVM)     GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT);
    173173GVMMR0DECL(PGVMCPU) GVMMR0GetGVCpuByEMT(RTNATIVETHREAD hEMT);
    174 GVMMR0DECL(int)     GVMMR0SchedHalt(PGVM pGVM, PVM pVM, VMCPUID idCpu, uint64_t u64ExpireGipTime);
     174GVMMR0DECL(int)     GVMMR0SchedHalt(PGVM pGVM, PVM pVM, PGVMCPU pCurGVCpu, uint64_t u64ExpireGipTime);
     175GVMMR0DECL(int)     GVMMR0SchedHaltReq(PGVM pGVM, PVM pVM, VMCPUID idCpu, uint64_t u64ExpireGipTime);
    175176GVMMR0DECL(int)     GVMMR0SchedWakeUp(PGVM pGVM, PVM pVM, VMCPUID idCpu);
    176177GVMMR0DECL(int)     GVMMR0SchedWakeUpEx(PGVM pGVM, PVM pVM, VMCPUID idCpu, bool fTakeUsedLock);
  • trunk/include/VBox/vmm/vm.h

    r75631 r75646  
    211211        struct VMMCPU       s;
    212212#endif
    213         uint8_t             padding[768];       /* multiple of 64 */
     213        uint8_t             padding[896];       /* multiple of 64 */
    214214    } vmm;
    215215
     
    273273
    274274    /** Align the following members on page boundary. */
    275     uint8_t                 abAlignment2[2808];
     275    uint8_t                 abAlignment2[2680];
    276276
    277277    /** PGM part. */
  • trunk/include/VBox/vmm/vm.mac

    r74797 r75646  
    6565    .trpm                   resb 128
    6666    .tm                     resb 384
    67     .vmm                    resb 768
     67    .vmm                    resb 896
    6868    .pdm                    resb 256
    6969    .iom                    resb 512
  • trunk/include/VBox/vmm/vmm.h

    r73474 r75646  
    578578/** @} */
    579579VMMR3_INT_DECL(int)     VMMR3EmtRendezvousFF(PVM pVM, PVMCPU pVCpu);
     580VMMR3_INT_DECL(void)    VMMR3SetMayHaltInRing0(PVMCPU pVCpu, bool fMayHaltInRing0, uint32_t cNsSpinBlockThreshold);
    580581VMMR3_INT_DECL(int)     VMMR3ReadR0Stack(PVM pVM, VMCPUID idCpu, RTHCUINTPTR R0Addr, void *pvBuf, size_t cbRead);
    581582VMMR3_INT_DECL(void)    VMMR3InitR0StackUnwindState(PUVM pUVM, VMCPUID idCpu, PRTDBGUNWINDSTATE pState);
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