VirtualBox

Ignore:
Timestamp:
Aug 18, 2015 5:33:53 PM (9 years ago)
Author:
vboxsync
Message:

VMM: Removing VBOX_WITH_HYBRID_32BIT_KERNEL and other 32-bit darwin fun.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp

    r57358 r57446  
    256256            {
    257257#ifdef RT_ARCH_X86
    258 # ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    259                 if (fExtFeaturesEDX & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE)
    260 # else
    261258                if (!ASMIsIntelCpu())
    262 # endif
    263259#endif
    264260                {
     
    400396{
    401397    Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    402 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     398#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    403399    if (CPUMIsGuestInLongModeEx(pCtx))
    404400    {
     
    464460    NOREF(pVM); NOREF(pCtx);
    465461
    466 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     462#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    467463    if (CPUMIsGuestInLongModeEx(pCtx))
    468464    {
     
    531527     * Save the host state.
    532528     */
    533 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    534     AssertCompile((uintptr_t)&pVCpu->cpum.s.Host.dr3 - (uintptr_t)&pVCpu->cpum.s.Host.dr0 == sizeof(uint64_t) * 3);
    535     cpumR0SaveDRx(&pVCpu->cpum.s.Host.dr0);
    536 #else
    537529    pVCpu->cpum.s.Host.dr0 = ASMGetDR0();
    538530    pVCpu->cpum.s.Host.dr1 = ASMGetDR1();
    539531    pVCpu->cpum.s.Host.dr2 = ASMGetDR2();
    540532    pVCpu->cpum.s.Host.dr3 = ASMGetDR3();
    541 #endif
    542533    pVCpu->cpum.s.Host.dr6 = ASMGetDR6();
    543534    /** @todo dr7 might already have been changed to 0x400; don't care right now as it's harmless. */
     
    583574    if (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_GUEST)
    584575    {
    585 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     576#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    586577        if (CPUMIsGuestInLongModeEx(&pVCpu->cpum.s.Guest))
    587578        {
     
    594585#endif
    595586        {
    596 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    597             cpumR0SaveDRx(&pVCpu->cpum.s.Guest.dr[0]);
    598 #else
    599587            pVCpu->cpum.s.Guest.dr[0] = ASMGetDR0();
    600588            pVCpu->cpum.s.Guest.dr[1] = ASMGetDR1();
    601589            pVCpu->cpum.s.Guest.dr[2] = ASMGetDR2();
    602590            pVCpu->cpum.s.Guest.dr[3] = ASMGetDR3();
    603 #endif
    604591            if (fDr6)
    605592                pVCpu->cpum.s.Guest.dr[6] = ASMGetDR6();
     
    619606            ASMSetDR7(X86_DR7_INIT_VAL);
    620607
    621 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    622         AssertCompile((uintptr_t)&pVCpu->cpum.s.Host.dr3 - (uintptr_t)&pVCpu->cpum.s.Host.dr0 == sizeof(uint64_t) * 3);
    623         cpumR0LoadDRx(&pVCpu->cpum.s.Host.dr0);
    624 #else
    625608        ASMSetDR0(pVCpu->cpum.s.Host.dr0);
    626609        ASMSetDR1(pVCpu->cpum.s.Host.dr1);
    627610        ASMSetDR2(pVCpu->cpum.s.Host.dr2);
    628611        ASMSetDR3(pVCpu->cpum.s.Host.dr3);
    629 #endif
    630612        /** @todo consider only updating if they differ, esp. DR6. Need to figure how
    631613         *        expensive DRx reads are over DRx writes.  */
     
    660642    if (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_GUEST)
    661643    {
    662 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     644#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    663645        if (CPUMIsGuestInLongModeEx(&pVCpu->cpum.s.Guest))
    664646        {
     
    671653#endif
    672654        {
    673 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    674             cpumR0SaveDRx(&pVCpu->cpum.s.Guest.dr[0]);
    675 #else
    676655            pVCpu->cpum.s.Guest.dr[0] = ASMGetDR0();
    677656            pVCpu->cpum.s.Guest.dr[1] = ASMGetDR1();
    678657            pVCpu->cpum.s.Guest.dr[2] = ASMGetDR2();
    679658            pVCpu->cpum.s.Guest.dr[3] = ASMGetDR3();
    680 #endif
    681659            if (fDr6)
    682660                pVCpu->cpum.s.Guest.dr[6] = ASMGetDR6();
     
    707685     * DR7 and DR6 (if fDr6 is true) are left to the caller.
    708686     */
    709 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     687#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    710688    if (CPUMIsGuestInLongModeEx(&pVCpu->cpum.s.Guest))
    711689        ASMAtomicOrU32(&pVCpu->cpum.s.fUseFlags, CPUM_SYNC_DEBUG_REGS_GUEST); /* Postpone it to the world switch. */
     
    713691#endif
    714692    {
    715 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    716         cpumR0LoadDRx(&pVCpu->cpum.s.Guest.dr[0]);
    717 #else
    718693        ASMSetDR0(pVCpu->cpum.s.Guest.dr[0]);
    719694        ASMSetDR1(pVCpu->cpum.s.Guest.dr[1]);
    720695        ASMSetDR2(pVCpu->cpum.s.Guest.dr[2]);
    721696        ASMSetDR3(pVCpu->cpum.s.Guest.dr[3]);
    722 #endif
    723697        if (fDr6)
    724698            ASMSetDR6(pVCpu->cpum.s.Guest.dr[6]);
     
    754728     * DR7 and DR6 (if fDr6 is true) are left to the caller.
    755729     */
    756 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     730#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
    757731    if (CPUMIsGuestInLongModeEx(&pVCpu->cpum.s.Guest))
    758732        ASMAtomicOrU32(&pVCpu->cpum.s.fUseFlags, CPUM_SYNC_DEBUG_REGS_HYPER); /* Postpone it. */
     
    760734#endif
    761735    {
    762 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    763         cpumR0LoadDRx(&pVCpu->cpum.s.Hyper.dr[0]);
    764 #else
    765736        ASMSetDR0(pVCpu->cpum.s.Hyper.dr[0]);
    766737        ASMSetDR1(pVCpu->cpum.s.Hyper.dr[1]);
    767738        ASMSetDR2(pVCpu->cpum.s.Hyper.dr[2]);
    768739        ASMSetDR3(pVCpu->cpum.s.Hyper.dr[3]);
    769 #endif
    770740        if (fDr6)
    771741            ASMSetDR6(X86_DR6_INIT_VAL);
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