summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-02-27 18:00:57 +0000
committeralc <alc@FreeBSD.org>2010-02-27 18:00:57 +0000
commit83149d5d10417a7749818290fc67c6b1c178ce0a (patch)
treeeb53149f310d543b56a8e0ae7af18109232c21e4 /sys/amd64
parentd828528c4c0fe2bb6a99b6f2d8f4014e2592350b (diff)
downloadFreeBSD-src-83149d5d10417a7749818290fc67c6b1c178ce0a.zip
FreeBSD-src-83149d5d10417a7749818290fc67c6b1c178ce0a.tar.gz
When running as a guest operating system, the FreeBSD kernel must assume
that the virtual machine monitor has enabled machine check exceptions. Unfortunately, on AMD Family 10h processors the machine check hardware has a bug (Erratum 383) that can result in a false machine check exception when a superpage promotion occurs. Thus, I am disabling superpage promotion when the FreeBSD kernel is running as a guest operating system on an AMD Family 10h processor. Reviewed by: jhb, kib MFC after: 3 days
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 9bfb2ab..07db5d1 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -686,6 +686,15 @@ pmap_init(void)
pv_entry_high_water = 9 * (pv_entry_max / 10);
/*
+ * Disable large page mappings by default if the kernel is running in
+ * a virtual machine on an AMD Family 10h processor. This is a work-
+ * around for Erratum 383.
+ */
+ if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD &&
+ CPUID_TO_FAMILY(cpu_id) == 0x10)
+ pg_ps_enabled = 0;
+
+ /*
* Are large page mappings enabled?
*/
TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled);
OpenPOWER on IntegriCloud