From: Laurent V. <Lau...@bu...> - 2007-10-05 13:26:07
|
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 ---------------- Lau...@bu... ----------------- "Given enough eyeballs, all bugs are shallow" E. S. Raymond |