Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2011 16:30:23 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217408 - stable/8/sys/i386/i386
Message-ID:  <201101141630.p0EGUNjn093824@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101141630.p0EGUNjn093824>