From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: FreeBSD image hangs during boot Date: Fri, 05 Oct 2007 15:25:05 +0200 Message-ID: <47063B31.6000001@bull.net> References: <47022E7E.3030509@aurel32.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0980764730==" Cc: kvm-devel To: Aurelien Jarno Return-path: In-Reply-To: <47022E7E.3030509-rXXEIb44qovR7s880joybQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0980764730== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7AE971429B6A281E2E7F9590" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7AE971429B6A281E2E7F9590 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Aurelien Jarno wrote: > Hi all, >=20 > That's not something new, but I never seen the problem mentioned here. > FreeBSD does not work on KVM, approximately since the lapic merge. >=20 > However, that does not seem related to lapic, as using -no-kvm-irqchip > does not help. With -no-kvm I get a page fault in kernel mode, while th= e > normal QEMU (0.9.0 or CVS) does not have this problem. >=20 > This can be easily reproduced with the latest installation CD: > ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/6.2/6.2-RELEASE-i386-= bootonly.iso >=20 > Cheers, > Aurelien >=20 Digging in the FreeBSD sources I found the origin of the problem: I added some ACPI traces: rsirq-0234 [13] RsIrqResource : Invalid interrupt polarity/tri= gger in resource list, 10 Which is in /sys/contrib/dev/acpica/rsirq.c : /* * Check for HE, LL interrupts */ switch (Temp8 & 0x09) { case 0x01: /* HE */ OutputStruct->Data.Irq.EdgeLevel =3D ACPI_EDGE_SENSITIVE; OutputStruct->Data.Irq.ActiveHighLow =3D ACPI_ACTIVE_HIGH; break; case 0x08: /* LL */ OutputStruct->Data.Irq.EdgeLevel =3D ACPI_LEVEL_SENSITIVE; OutputStruct->Data.Irq.ActiveHighLow =3D ACPI_ACTIVE_LOW; break; default: /* * Only _LL and _HE polarity/trigger interrupts * are allowed (ACPI spec, section "IRQ Format") * so 0x00 and 0x09 are illegal. */ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid interrupt polarity/trigger in resource list, %X\= n", Tem p8)); return_ACPI_STATUS (AE_BAD_DATA); } Conclusion, in kvm-userspace/bios/acpi-dsdt.dsl, if you have "ActiveHigh"= , you must have "Edge" instead of "Level": - IRQ (Level, ActiveHigh, Shared) + IRQ (Edge, ActiveHigh, Shared) But I found nothing in ACPI specification explaining the freeBSD behavior= =2E Avi, if you think this anlysis is correct I can provide the patch changin= g "Level" to "Edge"... Laurent --=20 ---------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org ----------------- "Given enough eyeballs, all bugs are shallow" E. S. Raymond --------------enig7AE971429B6A281E2E7F9590 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFHBjs09Kffa9pFVzwRAmzzAJ9TAmBi456zM8mHPQNrEzkeOX9Y9ACfdh15 XEZFFD4Cb/F5Tkdl+NpdFyE= =nC2z -----END PGP SIGNATURE----- --------------enig7AE971429B6A281E2E7F9590-- --===============0980764730== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============0980764730== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0980764730==--