VirtualBox

Changeset 42033 in vbox


Ignore:
Timestamp:
Jul 6, 2012 3:27:36 AM (13 years ago)
Author:
vboxsync
Message:

VMM: RDTSCP support bits.

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

Legend:

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

    r42024 r42033  
    18491849        }
    18501850
     1851        case CPUMCPUIDFEATURE_RDTSCP:
     1852        {
     1853            if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001)
     1854                pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_EXT_FEATURE_EDX_RDTSCP;
     1855            LogRel(("CPUMClearGuestCpuIdFeature: Disabled RDTSCP!\n"));
     1856            break;
     1857        }
     1858
    18511859        case CPUMCPUIDFEATURE_HVP:
    18521860            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
  • trunk/src/VBox/VMM/VMMR3/HWACCM.cpp

    r42024 r42033  
    11231123                pVM->hwaccm.s.vmx.fVPID = pVM->hwaccm.s.vmx.fAllowVPID;
    11241124
     1125            /*
     1126             * Disallow RDTSCP in the guest if there is no secondary process-based VM execution controls as otherwise
     1127             * RDTSCP would cause a #UD. There might be no CPUs out there where this happens, as RDTSCP was introduced
     1128             * in Nehalems and secondary VM exec. controls should be supported in all of them, but nonetheless it's Intel...
     1129             */
     1130            if (!(pVM->hwaccm.s.vmx.msr.vmx_proc_ctls.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC_USE_SECONDARY_EXEC_CTRL)
     1131                && CPUMGetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_RDTSCP))
     1132            {
     1133                CPUMClearGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_RDTSCP);
     1134            }
     1135
    11251136            /* Unrestricted guest execution relies on EPT. */
    11261137            if (    pVM->hwaccm.s.fNestedPaging
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