svn commit: r217408 - stable/8/sys/i386/i386
Colin Percival
cperciva at FreeBSD.org
Fri Jan 14 16:30:23 UTC 2011
Author: cperciva
Date: Fri Jan 14 16:30:22 2011
New Revision: 217408
URL: http://svn.freebsd.org/changeset/base/217408
Log:
Don't use amdc1e on XEN && !XEN_PRIVILEGED. The Xen hypervisor
gets justifiably annoyed when a guest OS tries to halt the CPU.
This fixes a panic when booting FreeBSD/XEN on recent AMD CPUs.
This is not an MFC; the problem was (accidentally?) fixed in HEAD
four months ago via SVN r212541.
Modified:
stable/8/sys/i386/i386/machdep.c
Modified: stable/8/sys/i386/i386/machdep.c
==============================================================================
--- stable/8/sys/i386/i386/machdep.c Fri Jan 14 15:15:33 2011 (r217407)
+++ stable/8/sys/i386/i386/machdep.c Fri Jan 14 16:30:22 2011 (r217408)
@@ -1228,6 +1228,7 @@ cpu_idle_acpi(int busy)
static int cpu_ident_amdc1e = 0;
+#if !defined(XEN) || defined(XEN_PRIVILEGED)
static int
cpu_probe_amdc1e(void)
{
@@ -1254,6 +1255,7 @@ cpu_probe_amdc1e(void)
#endif
return (0);
}
+#endif
/*
* C1E renders the local APIC timer dead, so we disable it by
@@ -2690,8 +2692,10 @@ init386(first)
thread0.td_pcb->pcb_fsd = PCPU_GET(fsgs_gdt)[0];
thread0.td_pcb->pcb_gsd = PCPU_GET(fsgs_gdt)[1];
+#if defined(XEN_PRIVILEGED)
if (cpu_probe_amdc1e())
cpu_idle_fn = cpu_idle_amdc1e;
+#endif
}
#else
More information about the svn-src-stable-8
mailing list