From owner-freebsd-xen@FreeBSD.ORG Tue Sep 22 13:31:14 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E7A01065676 for ; Tue, 22 Sep 2009 13:31:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id ABFD08FC08 for ; Tue, 22 Sep 2009 13:31:13 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n8MDAYKC057026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Sep 2009 16:10:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n8MDAYH7016244; Tue, 22 Sep 2009 16:10:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n8MDAYXw016243; Tue, 22 Sep 2009 16:10:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 22 Sep 2009 16:10:34 +0300 From: Kostik Belousov To: Larry Baird Message-ID: <20090922131034.GV47688@deviant.kiev.zoral.com.ua> References: <20090922123401.GB29391@gta.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+dV+xilh7QQozWTa" Content-Disposition: inline In-Reply-To: <20090922123401.GB29391@gta.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: freebsd-xen@freebsd.org Subject: Re: XEN 5.5.0 and clflush X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 13:31:14 -0000 --+dV+xilh7QQozWTa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 22, 2009 at 08:34:01AM -0400, Larry Baird wrote: > I originally sent this message to freebsd-current. Got no response, perh= aps > freebsd-xen is a better mailing list. (-: >=20 > Since the end of August I have been unable to boot a generic kernel from > FreeBSD current or 8 under XEN 5.5.0. Finally had a chance to briefly lo= ok > at the problem. If I apply attached patch to remove calls to clflush() I > am able to boot current. Hopefully somebody can shed some light. Is > XEN incorrecty reporting CPUID_CLFSH or is XEN not correctly virtualizing > this option. Or is the issue someplace else? I have also attached the > dmesg from a successful boot. This issue seems to be same as > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D138863 >=20 >=20 > Here is an attempt to type backtrace from non-booting kernel: >=20 > pmap_invalidate_cache_range(c3252000,c3253000,c3253000,0,fee00000,...) at > +pamp_invalidate_cache_range+0x60 > pmap_mapdev_attr(fee00000,400,0,c1420d34,c0ba7a72,...) at pmap_mapdev_att= r+0xec > pmap_mapdev() at pmap_mapdev+0x20 > lapic_init() at lapic_init+0x32 > madt_setup_local() at madt_setup_local+0x2c > apic_init() at apic_init+0x11a > mistartup() at mi_startup+0x96 > begin() at begin+0x2c I am sorry for delay in answering, you may use this temporal patch until the issue is resolved somehow. I think I will have to disable CLFLUSH support for intel CPUs when self-sno= op is not reported. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 1f37765..7de1ca5 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -997,7 +997,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_= t eva) =20 if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if (0 && cpu_feature & CPUID_CLFSH) { =20 /* * Otherwise, do per-cache line flush. Use the mfence diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 7e3bc37..56c6776 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -994,7 +994,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_= t eva) =20 if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if (0 && cpu_feature & CPUID_CLFSH) { =20 /* * Otherwise, do per-cache line flush. Use the mfence diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 1d9c9c1..7dc8029 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -994,7 +994,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_= t eva) =20 if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if (0 && cpu_feature & CPUID_CLFSH) { =20 /* * Otherwise, do per-cache line flush. Use the mfence --+dV+xilh7QQozWTa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkq4zMoACgkQC3+MBN1Mb4hwwwCgxWtzvWy3WKfT8xMYYjSsSI20 HtEAn14LQfIjMDqlDKpBQaHwwImBj306 =rcIu -----END PGP SIGNATURE----- --+dV+xilh7QQozWTa--