svn commit: r209371 - in head/sys: amd64/amd64 amd64/include conf dev/acpica i386/i386 i386/include isa kern pc98/cbus sys x86/isa x86/x86

Kostik Belousov kostikbel at gmail.com
Mon Jun 21 21:06:34 UTC 2010


On Mon, Jun 21, 2010 at 11:46:11PM +0300, Alexander Motin wrote:
> Kostik Belousov wrote:
> > On Mon, Jun 21, 2010 at 11:09:05PM +0300, Alexander Motin wrote:
> >> Alexander Motin wrote:
> >>> Kostik Belousov wrote:
> >>>> On Sun, Jun 20, 2010 at 09:33:29PM +0000, Alexander Motin wrote:
> >>>>> Author: mav
> >>>>> Date: Sun Jun 20 21:33:29 2010
> >>>>> New Revision: 209371
> >>>>> URL: http://svn.freebsd.org/changeset/base/209371
> >>>>>
> >>>>> Log:
> >>>>>   Implement new event timers infrastructure. It provides unified APIs for
> >>>>>   writing event timer drivers, for choosing best possible drivers by machine
> >>>>>   independent code and for operating them to supply kernel with hardclock(),
> >>>>>   statclock() and profclock() events in unified fashion on various hardware.
> >>>> This broke QEMU for me. I cannot boot FreeBSD guest under QEMU anymore.
> >>>> QEMU (not FreeBSD kernel) panics with
> >>>> qemu: level-triggered hpet not supported
> >>>> message.
> >>> According to specification, it is not optional. No more cookies!
> > Is there a way to disable hpet at all ? It would be fine with me.
> > Does hint below supposed to do this ?
> 
> Yes. Hint below disables HPET event timers, leaving only time counter
> part, almost same as it was before.
> 
> >>>> Setting kern.eventtimer.timer1 to LAPIC or i8254, and timer2 to NONE
> >>>> does not help.
> >>> Try `hint.apic.0.clock=0` and send me verbose dmesg, I'll try to make
> >>> workaround if possible.
> >> Sorry, 'hint.hpet.0.clock=0'.
> >>
> > Setting the hint results in
> > panic: lock (time lock) sleep mutex does not match earlier (spin mutex) lock,
> > with the backtrace
> > enroll()
> > witness_init()
> > lock_init()
> > mtx_init()
> > initclocks()
> > mi_startup()
> > (transribed by hand).
> 
> I am surprised that none of my systems fired it. Try this:
> 
> --- subr_witness.c.prev 2010-06-17 14:07:36.000000000 +0300
> +++ subr_witness.c      2010-06-21 23:43:14.000000000 +0300
> @@ -495,6 +495,7 @@ static struct witness_order_list_entry o
>  #ifdef HWPMC_HOOKS
>         { "pmc-sleep", &lock_class_mtx_sleep },
>  #endif
> +       { "time lock", &lock_class_mtx_sleep },
>         { NULL, NULL },
>         /*
>          * Sockets
> @@ -654,7 +655,6 @@ static struct witness_order_list_entry o
>         { "callout", &lock_class_mtx_spin },
>         { "entropy harvest mutex", &lock_class_mtx_spin },
>         { "syscons video lock", &lock_class_mtx_spin },
> -       { "time lock", &lock_class_mtx_spin },
>  #ifdef SMP
>         { "smp rendezvous", &lock_class_mtx_spin },
>  #endif

Witness patch worked for me, and I can boot multiuser in the qemu-hosted
system with hint.hpet.0.clock=0. Does the same hint should work for
amd64 ?

The issue is no longer critical for me due to hint, below is the dmesg
you asked for. Thanks.

Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #200: Mon Jun 21 23:56:04 EEST 2010
    root at pooma.home:/usr/home/kostik/work/build/bsd/DEV/obj-i386/i386/usr/home/kostik/work/build/bsd/DEV/src/sys/QEMU i386
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
CPU: Pentium II/Pentium II Xeon/Celeron (2786.35-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x633  Family = 6  Model = 3  Stepping = 3
  Features=0x781abfd<FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,PGE,CMOV,PAT,MMX,FXSR,SSE,SSE2>
  Features2=0x80000001<SSE3,<b31>>
real memory  = 67108864 (64 MB)
avail memory = 55808000 (53 MB)
Event timer "LAPIC" frequency 0 Hz quality 500
ACPI APIC Table: <QEMU   QEMUAPIC>
ioapic0: Changing APIC ID to 1
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 1.1> irqs 0-23 on motherboard
acpi0: <QEMU QEMURSDT> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xb008-0xb00b on acpi0
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 100000000 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci_link0: BIOS IRQ 9 does not match initial IRQ 11
pci0: <ACPI PCI bus> on pcib0
Correcting Natoma config for non-SMP
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ATA controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc000-0xc00f at device 1.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <bridge> at device 1.3 (no driver attached)
vgapci0: <VGA-compatible display> mem 0xf0000000-0xf1ffffff,0xf2000000-0xf2000fff at device 2.0 on pci0
ed0: <RealTek 8029> port 0xc100-0xc1ff irq 11 at device 3.0 on pci0
ed0: ed_stop_hw RST never set
ed0: Ethernet address: 52:54:00:12:34:56
ed0: [ITHREAD]
pci0: <memory, RAM> at device 4.0 (no driver attached)
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0
atrtc0: [FILTER]
Event timer "RTC" frequency 32768 Hz quality 0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse Explorer, device ID 4
pmtimer0 on isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 2786349400 Hz quality 800
Starting kernel event timers: LAPIC @ 100Hz, RTC @ 128Hz
Timecounters tick every 10.000 msec
ad0: 512MB <QEMU HARDDISK 0.11.1> at ata0-master UDMA33 
GEOM: ad0s1: geometry does not match label (255h,63s != 16h,63s).
ad1: 512MB <QEMU HARDDISK 0.11.1> at ata0-slave UDMA33 
GEOM: ad1s1: geometry does not match label (255h,63s != 16h,63s).
ad2: 512MB <QEMU HARDDISK 0.11.1> at ata1-master UDMA33 
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ad0s1a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20100621/e5ff7b70/attachment.pgp


More information about the svn-src-all mailing list