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: <Xen Platform Device> port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 
28 at device 3.0 on pci0
xs_probe: Probe retuns 0
xenstore0: <XenStore> on xenpci0
[..]
xenbusb_front0: <Xen Frontend Devices> on xenstore0
xn0: <Virtual Network Interface> at device/vif/0 on xenbusb_front0
xn0: Error 2 parsing device/vif/0/mac
xn0: Fatal error. Transitioning to Closing State
xbd0: 30720MB <Virtual Block Device> at device/vbd/768 on xenbusb_front0
xbd0: attaching as ad0
xbd1: 332MB <Virtual Block Device> 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
sn...@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
    sn...@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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  
Features2=0x98e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT>
  AMD Features=0x28100000<NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  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: <XenStore> on motherboard
[XEN] xen_rtc_probe: probing Hypervisor RTC clock
rtc0: <Xen Hypervisor Clock> on motherboard
[XEN] xen_rtc_attach: attaching Hypervisor RTC clock
xc0: <Xen Console> on motherboard
Timecounters tick every 10.000 msec
[XEN] hypervisor wallclock nudged; nudging TOD.
xenbusb_front0: <Xen Frontend Devices> on xenstore0
xn0: <Virtual Network Interface> at device/vif/0 on xenbusb_front0
xbd0: 30720MB <Virtual Block Device> 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
    sn...@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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x80982201<SSE3,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,<b31>>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
real memory  = 1073741824 (1024 MB)
avail memory = 1016918016 (969 MB)
ACPI APIC Table: <Xen HVM>
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 <Version 1.1> irqs 0-47 on motherboard
kbd1 at kbdmux0
acpi0: <Xen> 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: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
cpu4: <ACPI CPU> on acpi0
cpu5: <ACPI CPU> on acpi0
cpu6: <ACPI CPU> on acpi0
cpu7: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX3 WDMA2 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc200-0xc20f 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,0xf3000000-0xf3000fff at device 2.0 on pci0
xenpci0: <Xen Platform Device> port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 
28 at device 3.0 on pci0
xs_probe: Probe retuns 0
xenstore0: <XenStore> on xenpci0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
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
fdc0: <floppy drive controller> 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: <Parallel port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppc0: [ITHREAD]
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
plip0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: [ITHREAD]
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
orm0: <ISA Option ROM> at iomem 0xc9000-0xc97ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x100>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
acd0: CDROM <QEMU DVD-ROM/0.10.2> at ata1-master WDMA2 
xenbusb_front0: <Xen Frontend Devices> on xenstore0
xn0: <Virtual Network Interface> at device/vif/0 on xenbusb_front0
xn0: Error 2 parsing device/vif/0/mac
xn0: Fatal error. Transitioning to Closing State
xbd0: 30720MB <Virtual Block Device> at device/vbd/768 on xenbusb_front0
xbd0: attaching as ad0
xbd1: 332MB <Virtual Block Device> 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

_______________________________________________
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"

Reply via email to