amd64/186061: FreeBSD 10 crashes as KVM guest on GNU/Linux on AMD family 10h CPUs

Simon Matter simon.matter at invoca.ch
Wed Feb 12 07:40:01 UTC 2014


The following reply was made to PR amd64/186061; it has been noted by GNATS.

From: "Simon Matter" <simon.matter at invoca.ch>
To: bug-followup at FreeBSD.org
Cc: simon.matter at invoca.ch
Subject: Re: amd64/186061: FreeBSD 10 crashes as KVM guest on GNU/Linux on
 AMD family 10h CPUs
Date: Wed, 12 Feb 2014 08:30:51 +0100

 ------=_20140212083051_97180
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit
 
 As noted by John Baldwin the change to mca.c is not needed. Attached patch
 is what I'm using now with success.
 
 BTW: setting vm.pmap.pg_ps_enabled="0" in loader.conf does also mitigate
 the issue but I guess it's not the optimal solution.
 
 Regards,
 Simon
 ------=_20140212083051_97180
 Content-Type: text/x-diff; name="vm-erratum383.patch"
 Content-Transfer-Encoding: 8bit
 Content-Disposition: attachment; filename="vm-erratum383.patch"
 
 --- /usr/src/sys/i386/i386/pmap.c.orig	2014-01-16 21:33:36.000000000 +0100
 +++ /usr/src/sys/i386/i386/pmap.c	2014-02-05 22:25:28.395821316 +0100
 @@ -752,12 +752,12 @@
  	pv_entry_high_water = 9 * (pv_entry_max / 10);
  
  	/*
 -	 * If the kernel is running in a virtual machine on an AMD Family 10h
 -	 * processor, then it must assume that MCA is enabled by the virtual
 -	 * machine monitor.
 +	 * If the kernel is running in a virtual machine on any processor
 +	 * family, then it must assume that MCA is enabled by the virtual
 +	 * machine monitor and the vm may migrate to an AMD Family 10h
 +	 * processor.
  	 */
 -	if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD &&
 -	    CPUID_TO_FAMILY(cpu_id) == 0x10)
 +	if (vm_guest != VM_GUEST_NO)
  		workaround_erratum383 = 1;
  
  	/*
 --- /usr/src/sys/amd64/amd64/pmap.c.orig	2014-01-16 21:33:04.000000000 +0100
 +++ /usr/src/sys/amd64/amd64/pmap.c	2014-02-05 22:28:25.814349113 +0100
 @@ -1005,12 +1005,12 @@
  	}
  
  	/*
 -	 * If the kernel is running in a virtual machine on an AMD Family 10h
 -	 * processor, then it must assume that MCA is enabled by the virtual
 -	 * machine monitor.
 +	 * If the kernel is running in a virtual machine on any processor
 +	 * family, then it must assume that MCA is enabled by the virtual
 +	 * machine monitor and the vm may migrate to an AMD Family 10h
 +	 * processor.
  	 */
 -	if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD &&
 -	    CPUID_TO_FAMILY(cpu_id) == 0x10)
 +	if (vm_guest != VM_GUEST_NO)
  		workaround_erratum383 = 1;
  
  	/*
 ------=_20140212083051_97180--
 
 


More information about the freebsd-amd64 mailing list