Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2018 11:28:09 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330793 - head/sys/x86/x86
Message-ID:  <201803121128.w2CBS9O4023510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Mar 12 11:28:09 2018
New Revision: 330793
URL: https://svnweb.freebsd.org/changeset/base/330793

Log:
  fix r297857, do not modify CPU extension bits under virtual machines
  
  r297857 was meant for real hardware only.
  
  PR:		213155
  Submitted by:	mainland@apeiron.net
  MFC after:	1 week

Modified:
  head/sys/x86/x86/identcpu.c

Modified: head/sys/x86/x86/identcpu.c
==============================================================================
--- head/sys/x86/x86/identcpu.c	Mon Mar 12 09:40:46 2018	(r330792)
+++ head/sys/x86/x86/identcpu.c	Mon Mar 12 11:28:09 2018	(r330793)
@@ -1395,7 +1395,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803121128.w2CBS9O4023510>