FreeBSD Bugzilla – Attachment 139753 Details for
Bug 186061
[kvm] FreeBSD 10 crashes as KVM guest on GNU/Linux on AMD family 10h CPUs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
PR186061v2.patch
PR186061v2.patch (text/plain; charset=ISO-8859-15), 2.44 KB, created by
alc
on 2014-02-15 18:09:58 UTC
(
hide
)
Description:
PR186061v2.patch
Filename:
MIME Type:
Creator:
alc
Created:
2014-02-15 18:09:58 UTC
Size:
2.44 KB
patch
obsolete
>Index: amd64/amd64/pmap.c >=================================================================== >--- amd64/amd64/pmap.c (revision 261162) >+++ amd64/amd64/pmap.c (working copy) >@@ -1008,12 +1008,18 @@ pmap_init(void) > } > > /* >- * 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 on a virtual machine, then it must assume >+ * that MCA is enabled by the hypervisor. Moreover, the kernel must >+ * be prepared for the hypervisor changing the vendor and family that >+ * are reported by CPUID. Consequently, the workaround for AMD Family >+ * 10h Erratum 383 is enabled if the processor's feature set does not >+ * include at least one feature that is only supported by older Intel >+ * or newer AMD processors. > */ >- if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && >- CPUID_TO_FAMILY(cpu_id) == 0x10) >+ if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && >+ (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | >+ CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | >+ AMDID2_FMA4)) == 0) > workaround_erratum383 = 1; > > /* >Index: i386/i386/pmap.c >=================================================================== >--- i386/i386/pmap.c (revision 261162) >+++ i386/i386/pmap.c (working copy) >@@ -752,12 +752,18 @@ pmap_init(void) > 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 on a virtual machine, then it must assume >+ * that MCA is enabled by the hypervisor. Moreover, the kernel must >+ * be prepared for the hypervisor changing the vendor and family that >+ * are reported by CPUID. Consequently, the workaround for AMD Family >+ * 10h Erratum 383 is enabled if the processor's feature set does not >+ * include at least one feature that is only supported by older Intel >+ * or newer AMD processors. > */ >- if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && >- CPUID_TO_FAMILY(cpu_id) == 0x10) >+ if (vm_guest == VM_GUEST_VM && (cpu_feature & CPUID_SS) == 0 && >+ (cpu_feature2 & (CPUID2_SSSE3 | CPUID2_SSE41 | CPUID2_AESNI | >+ CPUID2_AVX | CPUID2_XSAVE)) == 0 && (amd_feature2 & (AMDID2_XOP | >+ AMDID2_FMA4)) == 0) > workaround_erratum383 = 1; > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 186061
:
139751
|
139752
| 139753