From owner-freebsd-xen@FreeBSD.ORG Sat Jan 15 08:28:32 2011 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 EFF9E106564A for ; Sat, 15 Jan 2011 08:28:32 +0000 (UTC) (envelope-from snabb@epipe.com) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8238FC08 for ; Sat, 15 Jan 2011 08:28:32 +0000 (UTC) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by tiktik.epipe.com (8.14.4/8.14.4) with ESMTP id p0F8SVMs072754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 15 Jan 2011 08:28:31 GMT (envelope-from snabb@epipe.com) X-DKIM: Sendmail DKIM Filter v2.8.3 tiktik.epipe.com p0F8SVMs072754 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=epipe.com; s=default; t=1295080111; x=1295684911; bh=neHAMCinE8UF7+Y90INmYhHZXLht28S/Nfr5Ocg8gik=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=l+4oOmevgYIJ/QRhzjS2KdfzUd7+uWT+yloDbIVVt5N2AnjDd8RLAES4kBRLfW/7P 06cCCbYuqV7upaO9MChPkbcgxJiNClCnJjiM0MWRMndd5fiQ3cPv4gHiZQjeU4r6NQ F73N0tzoLCQyuwRJ3eNo3aaLakXg6GXFS1lRPnBQ= Date: Sat, 15 Jan 2011 08:28:31 +0000 (UTC) From: Janne Snabb To: freebsd-xen@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.6 (tiktik.epipe.com [IPv6:2001:1828:0:3::2]); Sat, 15 Jan 2011 08:28:31 +0000 (UTC) Subject: xn0: Error 2 parsing device/vif/0/mac 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: Sat, 15 Jan 2011 08:28:33 -0000 Hi, I have been trying to get Xen para-virtualized device drivers to work with RELENG_8_2 and -current. It appears that that the netfront driver fails to get the vif mac address which leads to panic shortly afterwards. The Xen networking mode is bridged (with default config, automatically allocated mac address). I have been trying this with FreeBSD-8.2RC1 (i386 and amd64) as distributed and FreeBSD-8.2RC2 (amd64) as of yesterday as well as FreeBSD-CURRENT (amd64) as of yesterday (r217387). I have tried this with Xen 4.0.1 with Gentoo (x86_64 testing) dom0 as well as with Xen 4.0.1, 3.4.3 and 3.3.2 with CentOS 5.5 (x86_64) dom0. If I enable the xenbus drivers (XENHVM kernel config on amd64 or XEN on i386) I always get the following result: [..] xenpci0: port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 28 at device 3.0 on pci0 xs_probe: Probe retuns 0 xenstore0: on xenpci0 [..] xenbusb_front0: on xenstore0 xn0: at device/vif/0 on xenbusb_front0 xn0: Error 2 parsing device/vif/0/mac xn0: Fatal error. Transitioning to Closing State xbd0: 30720MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ad0 xbd1: 332MB at device/vbd/5632 on xenbusb_front0 xbd1: attaching as ad2 panic: do something smart When using full HVM mode (emulated realtek) I have no problems with Xen 4.0.1 nor 3.4.3 (both i386 and amd64 GENERIC kernels work fine). Xen 3.3.2 causes 8.2RC2 to freeze during probing some devices and 3.0.3 crashes right at the boot loader before attempting to load the kernel. But that does not really matter, those versions are obsolete. I can also confirm that i386 XEN (PV) kernel panics if the domain is given too much memory as already discussed on this list in the previous threads. Is the xn (netfront) driver supposed to work with some Xen version? I have no fancy nor strange kernel or Xen settings. Is there something I am overlooking? Please see the bottom of this message for a couple of full boot message logs including kernel backtraces. -- Janne Snabb / EPIPE Communications snabb@epipe.com - http://epipe.com/ RELENG_8_2 kernel i386 config XEN (Xen 4.0.1 in PV mode): WARNING: loader(8) metadata is missing! GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2011 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 8.2-RC2 #0: Fri Jan 14 10:37:32 UTC 2011 snabb@xxx.epipe.com:/usr/obj/usr/src/sys/XEN i386 WARNING: WITNESS option enabled, expect reduced performance. Xen reported: 2800.078 MHz processor. Timecounter "ixen" frequency 1953125 Hz quality 0 CPU: Intel(R) Xeon(R) CPU X3460 @ 2.80GHz (2800.08-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x106e5 Family = 6 Model = 1e Stepping = 5 Features=0xbfe3fbff Features2=0x98e3fd AMD Features=0x28100000 AMD Features2=0x1 TSC: P-state invariant real memory = 536870912 (512 MB) avail memory = 515928064 (492 MB) gdtpfn=7cc41 pdptpfn=4dc63 gdtpfn=7cc40 pdptpfn=4dc5d gdtpfn=7cc3f pdptpfn=4dc57 gdtpfn=7cc3e pdptpfn=4dc81 gdtpfn=7cc3d pdptpfn=4dc7b gdtpfn=7cc3c pdptpfn=4dc75 gdtpfn=7cc3b pdptpfn=4dc6f FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 [XEN] IPI cpu=0 irq=128 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=0 irq=129 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=1 irq=130 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=1 irq=131 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=2 irq=133 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=2 irq=134 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=3 irq=135 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=3 irq=136 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=4 irq=137 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=4 irq=138 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=5 irq=139 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=5 irq=140 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=6 irq=141 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=6 irq=142 vector=CALL_FUNCTION_VECTOR (1) [XEN] IPI cpu=7 irq=143 vector=RESCHEDULE_VECTOR (0) [XEN] IPI cpu=7 irq=144 vector=CALL_FUNCTION_VECTOR (1) xs_probe: Probe retuns 0 xenstore0: on motherboard [XEN] xen_rtc_probe: probing Hypervisor RTC clock rtc0: on motherboard [XEN] xen_rtc_attach: attaching Hypervisor RTC clock xc0: on motherboard Timecounters tick every 10.000 msec [XEN] hypervisor wallclock nudged; nudging TOD. xenbusb_front0: on xenstore0 xn0: at device/vif/0 on xenbusb_front0 xbd0: 30720MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ad0 xn0: Error 2 parsing device/vif/0/mac xn0: Fatal error. Transitioning to Closing State panic: do something smart cpuid = 0 KDB: enter: panic [thread pid 0 tid 100000 ] Stopped at kdb_enter+0x3a: movl $0,kdb_why db> halt RELENG_8_2 kernel amd64 config XENHVM (Xen 4.0.1 HVM mode): KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2011 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 8.2-RC2 #2: Fri Jan 14 06:05:39 UTC 2011 snabb@xxx.epipe.com:/usr/obj/usr/src/sys/XENHVM amd64 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(R) CPU X3460 @ 2.80GHz (2800.02-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x106e5 Family = 6 Model = 1e Stepping = 5 Features=0x1781fbff Features2=0x80982201> AMD Features=0x28100800 AMD Features2=0x1 TSC: P-state invariant real memory = 1073741824 (1024 MB) avail memory = 1016918016 (969 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 8 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 2 cpu2 (AP): APIC ID: 4 cpu3 (AP): APIC ID: 6 cpu4 (AP): APIC ID: 8 cpu5 (AP): APIC ID: 10 cpu6 (AP): APIC ID: 12 cpu7 (AP): APIC ID: 14 ioapic0: Changing APIC ID to 1 MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-47 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: Sleep Button (fixed) Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x1f48-0x1f4b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc200-0xc20f at device 1.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] ata1: on atapci0 ata1: [ITHREAD] pci0: at device 1.3 (no driver attached) vgapci0: mem 0xf0000000-0xf1ffffff,0xf3000000-0xf3000fff at device 2.0 on pci0 xenpci0: port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 28 at device 3.0 on pci0 xs_probe: Probe retuns 0 xenstore0: on xenpci0 atrtc0: port 0x70-0x71 irq 8 on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model IntelliMouse Explorer, device ID 4 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: does not respond device_attach: fdc0 attach returned 6 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: [FILTER] uart0: console (9600,n,8,1) ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppc0: [ITHREAD] ppbus0: on ppc0 plip0: on ppbus0 plip0: [ITHREAD] lpt0: on ppbus0 lpt0: [ITHREAD] lpt0: Interrupt-driven port ppi0: on ppbus0 orm0: at iomem 0xc9000-0xc97ff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x100> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 10.000 msec acd0: CDROM at ata1-master WDMA2 xenbusb_front0: on xenstore0 xn0: at device/vif/0 on xenbusb_front0 xn0: Error 2 parsing device/vif/0/mac xn0: Fatal error. Transitioning to Closing State xbd0: 30720MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ad0 xbd1: 332MB at device/vbd/5632 on xenbusb_front0 xbd1: attaching as ad2 panic: do something smart cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a kdb_backtrace() at kdb_backtrace+0x37 panic() at panic+0x187 netfront_attach() at netfront_attach+0x18c device_attach() at device_attach+0x69 xenbusb_probe_children() at xenbusb_probe_children+0xdf xenbusb_attach() at xenbusb_attach+0x11c device_attach() at device_attach+0x69 bus_generic_attach() at bus_generic_attach+0x1a xs_attach_deferred() at xs_attach_deferred+0x21 run_interrupt_driven_config_hooks() at run_interrupt_driven_config_hooks+0xab boot_run_interrupt_driven_config_hooks() at boot_run_interrupt_driven_config_hooks+0x2c mi_startup() at mi_startup+0x77 btext() at btext+0x2c KDB: enter: panic [thread pid 0 tid 100000 ] Stopped at kdb_enter+0x3d: movq $0,0x6c7a90(%rip) db> halt