Author: avg
Date: Wed Mar 21 15:13:47 2018
New Revision: 331305
URL: https://svnweb.freebsd.org/changeset/base/331305

Log:
  MFC r330793: fix r297857, do not modify CPU extension bits under virtual 
machines
  
  PR:           213155

Modified:
  stable/10/sys/x86/x86/identcpu.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/x86/identcpu.c
==============================================================================
--- stable/10/sys/x86/x86/identcpu.c    Wed Mar 21 15:09:47 2018        
(r331304)
+++ stable/10/sys/x86/x86/identcpu.c    Wed Mar 21 15:13:47 2018        
(r331305)
@@ -1335,7 +1335,8 @@ fix_cpuid(void)
         * See BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 15h
         * Models 60h-6Fh Processors, Publication # 50742.
         */
-       if (cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x15) 
{
+       if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_AMD &&
+           CPUID_TO_FAMILY(cpu_id) == 0x15) {
                msr = rdmsr(MSR_EXTFEATURES);
                if ((msr & ((uint64_t)1 << 54)) == 0) {
                        msr |= (uint64_t)1 << 54;
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to