summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_param.c
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/kern/subr_param.c
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/kern/subr_param.c')
-rw-r--r--sys/kern/subr_param.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 1504a78..a4d4ff8 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -74,10 +74,6 @@ __FBSDID("$FreeBSD$");
#define MAXFILES (maxproc * 2)
#endif
-/* Values of enum VM_GUEST members are used as indices in
- * vm_guest_sysctl_names */
-enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
-
static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS);
int hz;
@@ -137,6 +133,10 @@ SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING,
*/
struct buf *swbuf;
+/*
+ * The elements of this array are ordered based upon the values of the
+ * corresponding enum VM_GUEST members.
+ */
static const char *const vm_guest_sysctl_names[] = {
"none",
"generic",
OpenPOWER on IntegriCloud