svn commit: r330793 - head/sys/x86/x86
Andriy Gapon
avg at FreeBSD.org
Mon Mar 12 11:28:10 UTC 2018
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 at 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;
More information about the svn-src-head
mailing list