VirtualBox

Changeset 36315 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Mar 18, 2011 3:49:23 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70637
Message:

VMM: more correct MSR_IA32_MISC_ENABLE emulation

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r35346 r36315  
    866866            *puValue = pVCpu->cpum.s.GuestMsr.msr.miscEnable;
    867867#else
    868             *puValue = 0;
     868            /* Currenty we don't allow guests to modify enable MSRs. */
     869            *puValue = MSR_IA32_MISC_ENABLE_FAST_STRINGS  /* by default */;
     870
     871            if ((pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_MONITOR) != 0)
     872               
     873                *puValue |= MSR_IA32_MISC_ENABLE_MONITOR /* if mwait/monitor available */;
     874            /** @todo: add more cpuid-controlled features this way. */
    869875#endif
    870876            break;
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r36291 r36315  
    26662666        return "MSR_IA32_TSC";
    26672667    case MSR_IA32_MISC_ENABLE:
    2668         return "Unsupported MSR_IA32_MISC_ENABLE";
     2668        return "MSR_IA32_MISC_ENABLE";
    26692669    case MSR_IA32_MTRR_CAP:
    26702670        return "Unsupported MSR_IA32_MTRR_CAP";
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