VirtualBox

Changeset 8113 in vbox


Ignore:
Timestamp:
Apr 17, 2008 4:31:58 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29815
Message:

The recompiler must refresh its cpuid cache when we change a cpuid feature.

Location:
trunk
Files:
3 edited

Legend:

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

    r8111 r8113  
    722722#define CPUM_CHANGED_SYSENTER_MSR       RT_BIT(9)
    723723#define CPUM_CHANGED_HIDDEN_SEL_REGS    RT_BIT(10)
     724#define CPUM_CHANGED_CPUID              RT_BIT(11)
    724725/** @} */
    725726
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r8112 r8113  
    10791079            break;
    10801080    }
     1081    pVM->cpum.s.fChanged |= CPUM_CHANGED_CPUID;
    10811082}
    10821083
     
    11421143            break;
    11431144    }
     1145    pVM->cpum.s.fChanged |= CPUM_CHANGED_CPUID;
    11441146}
    11451147
  • trunk/src/recompiler/VBoxRecompiler.c

    r7996 r8113  
    16571657    if (fFlags & (  CPUM_CHANGED_CR4  | CPUM_CHANGED_CR3  | CPUM_CHANGED_CR0
    16581658                  | CPUM_CHANGED_GDTR | CPUM_CHANGED_IDTR | CPUM_CHANGED_LDTR | CPUM_CHANGED_TR
    1659                   | CPUM_CHANGED_FPU_REM | CPUM_CHANGED_SYSENTER_MSR))
     1659                  | CPUM_CHANGED_FPU_REM | CPUM_CHANGED_SYSENTER_MSR | CPUM_CHANGED_CPUID))
    16601660    {
    16611661        if (fFlags & CPUM_CHANGED_FPU_REM)
     
    17401740            /** @note do_interrupt will fault if the busy flag is still set.... */
    17411741            pVM->rem.s.Env.tr.flags &= ~DESC_TSS_BUSY_MASK;
     1742        }
     1743
     1744        if (fFlags & CPUM_CHANGED_CPUID)
     1745        {
     1746            uint32_t u32Dummy;
     1747
     1748            /*
     1749            * Get the CPUID features.
     1750            */
     1751            CPUMGetGuestCpuId(pVM,          1, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext_features, &pVM->rem.s.Env.cpuid_features);
     1752            CPUMGetGuestCpuId(pVM, 0x80000001, &u32Dummy, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext2_features);
    17421753        }
    17431754    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette