Bug#708344: [Xen-users] Serial Passthrough broken in Debian Wheezy?
Hey, Am 2013-06-03 18:17, schrieb Ian Campbell: On Mon, 2013-06-03 at 17:25 +0200, Jonas Meurer wrote: Hello, did anybody else discover issue with serial passthrough on Linux 3.2.0 from Debbian Wheezy? I haven't, but Squeeze was based on the out of tree xen.git kernel while Wheezy uses the mainline pvops support, so this is probably an issue with the mainline kernel. I can't quite imagine what it would be though. Are you able to try an newer upstream kernel in your domU? Either a newer version from Debian Sid or wheezy-backports or a self compiled one. Just gave Linux 3.9-1-amd64 from Debian/sid a try. The issue is reproducible with this DomU kernel. Kind regards, jonas Am 2013-05-14 14:56, schrieb Jonas Meurer: > Hey again, > > Am 13.05.2013 17:58, schrieb Jonas Meurer: >> I just discovered a strange bug with serial passthrough in xen 4.1 on >> Debian Wheezy. The Dom0 has a GSM modem connected to serial port. The >> serial port is passed through to a DomU with options 'irq = [ 4 ]' and >> 'ioports = [ '3f8-3ff ]'. > > While searching the list archives I found out, that latest Xen 4.1 has > several issues with passthrough. But so far it seems to me like nobody > else described my exact issue before. Apparently, the other passthrough > issues have been introduced by a hypervisor update. My problem appeared > after a kernel upgrade. And for me, DomU creation still works. As > described, the passed through serial even exists in DomU. Only it > doesn't behave as expected. > > Just wanted to share those additional observations. > > Kind regards, > jonas > >> >> This worked as expected on Debian Squeeze with Xen 4.0 and Linux >> kernel >> 2.6.32 (both for Dom0 and DomU). On Debian Wheezy with Xen 4.1 and >> Linux kernel 3.2.0 the passthrough seems to work as well (/dev/ttyS0 >> appears in dmesg of DomU), but something is wrong. The GSM modem >> doesn't behave as expected. The smstools daemon errors out with >> 'Cannot >> open serial port /dev/ttyS0, error: Function not implemented'. >> >> It took me hours to find the difference, but it seems like the guest >> (domU) kernel is the problem. The setup keeps working when Dom0 is >> upgraded to Debian Wheezy with Xen 4.1 and linux kernel 3.2.0. It even >> keeps working if the DomU userland is upgraded to Debian Wheezy. Only >> if I upgrade the DomU linux kernel to 3.2.0 from Wheezy as well, >> smstools stops working. >> >> I don't expect this to be a smstools bug. More likely, something >> regarding serial pass through functions of xen is broken in 3.2.0 >> kernel from Debian Wheezy. >> >> Did anybody else discover similar issues yet? >> >> Kind regards, >> jonas >> >> PS: I'm not subscribed to pkg-xen-de...@lists.alioth.debian.org, >> please >> cc me on that list. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#708344: [Xen-users] Serial Passthrough broken in Debian Wheezy?
On Tue, 2013-06-04 at 17:32 +0200, Jonas Meurer wrote: > Just gave Linux 3.9-1-amd64 from Debian/sid a try. The issue is > reproducible with this DomU kernel. Could you post dmesg, /proc/ioports and /proc/interrupts from this kernel please? Ian. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#708344: [Xen-users] Serial Passthrough broken in Debian Wheezy?
Am 2013-06-04 19:45, schrieb Ian Campbell: On Tue, 2013-06-04 at 17:32 +0200, Jonas Meurer wrote: Just gave Linux 3.9-1-amd64 from Debian/sid a try. The issue is reproducible with this DomU kernel. Could you post dmesg, /proc/ioports and /proc/interrupts from this kernel please? Sure, here we go. All attached as textfiles. Additionally, I attached the (adjusted) domU config. Kind regards, jonas nitializing cgroup subsys cpuset [0.00] Initializing cgroup subsys cpu [0.00] Linux version 3.9-1-amd64 (debian-ker...@lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Debian 3.9.4-1 [0.00] Command line: root=/dev/xvda2 ro root=/dev/xvda2 ro [0.00] ACPI in unprivileged domain disabled [0.00] e820: BIOS-provided physical RAM map: [0.00] Xen: [mem 0x-0x0009] usable [0.00] Xen: [mem 0x000a-0x000f] reserved [0.00] Xen: [mem 0x0010-0x0003007f] usable [0.00] NX (Execute Disable) protection: active [0.00] DMI not present or invalid. [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved [0.00] e820: remove [mem 0x000a-0x000f] usable [0.00] No AGP bridge found [0.00] e820: last_pfn = 0x300800 max_arch_pfn = 0x4 [0.00] e820: last_pfn = 0x10 max_arch_pfn = 0x4 [0.00] Base memory trampoline at [8809a000] 9a000 size 24576 [0.00] init_memory_mapping: [mem 0x-0x000f] [0.00] [mem 0x-0x000f] page 4k [0.00] init_memory_mapping: [mem 0x2ffe0-0x2] [0.00] [mem 0x2ffe0-0x2] page 4k [0.00] BRK [0x0187c000, 0x0187cfff] PGTABLE [0.00] BRK [0x0187d000, 0x0187dfff] PGTABLE [0.00] init_memory_mapping: [mem 0x2fc00-0x2ffdf] [0.00] [mem 0x2fc00-0x2ffdf] page 4k [0.00] BRK [0x0187e000, 0x0187efff] PGTABLE [0.00] BRK [0x0187f000, 0x0187] PGTABLE [0.00] BRK [0x0188, 0x01880fff] PGTABLE [0.00] init_memory_mapping: [mem 0x28000-0x2fbff] [0.00] [mem 0x28000-0x2fbff] page 4k [0.00] init_memory_mapping: [mem 0x0010-0x27fff] [0.00] [mem 0x0010-0x27fff] page 4k [0.00] init_memory_mapping: [mem 0x3-0x3007f] [0.00] [mem 0x3-0x3007f] page 4k [0.00] RAMDISK: [mem 0x01c7b000-0x03c13fff] [0.00] NUMA turned off [0.00] Faking a node at [mem 0x-0x0003007f] [0.00] Initmem setup node 0 [mem 0x-0x3007f] [0.00] NODE_DATA [mem 0x2fe81d000-0x2fe820fff] [0.00] Zone ranges: [0.00] DMA [mem 0x1000-0x00ff] [0.00] DMA32[mem 0x0100-0x] [0.00] Normal [mem 0x1-0x3007f] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x1000-0x0009] [0.00] node 0: [mem 0x0010-0x3007f] [0.00] On node 0 totalpages: 3147679 [0.00] DMA zone: 56 pages used for memmap [0.00] DMA zone: 21 pages reserved [0.00] DMA zone: 3999 pages, LIFO batch:0 [0.00] DMA32 zone: 14280 pages used for memmap [0.00] DMA32 zone: 1044480 pages, LIFO batch:31 [0.00] Normal zone: 28700 pages used for memmap [0.00] Normal zone: 2099200 pages, LIFO batch:31 [0.00] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org [0.00] smpboot: Allowing 8 CPUs, 0 hotplug CPUs [0.00] No local APIC present [0.00] APIC: disable apic facility [0.00] APIC: switched to apic NOOP [0.00] nr_irqs_gsi: 16 [0.00] PM: Registered nosave memory: 000a - 0010 [0.00] e820: cannot find a gap in the 32bit address range [0.00] e820: PCI devices with unassigned 32bit BARs may break! [0.00] e820: [mem 0x30090-0x300cf] available for PCI devices [0.00] Booting paravirtualized kernel on Xen [0.00] Xen version: 4.1.4 (preserve-AD) [0.00] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:8 nr_node_ids:1 [0.00] PERCPU: Embedded 28 pages/cpu @8802fe20 s84800 r8192 d21696 u262144 [0.00] pcpu-alloc: s84800 r8192 d21696 u262144 alloc=1*2097152 [0.00] pcpu-alloc: [0] 0 1 2 3 4 5 6 7 [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 3104622 [0.00] Policy zone: Normal [0.00] Kernel command line: root=/dev/xvda2 ro root=/dev/xvda2 ro [0.00] PID hash table entries: 4096 (order: 3, 32768 bytes) [0.00] __ex_table already sorted, skipping sort [0.00] Checking aperture... [0.00] No AGP bridge found [0.00] Memory: 12316732k/12591104k availa
Bug#708344: [Xen-users] Serial Passthrough broken in Debian Wheezy?
On Wed, 2013-06-05 at 11:47 +0200, Jonas Meurer wrote: > Am 2013-06-04 19:45, schrieb Ian Campbell: > > On Tue, 2013-06-04 at 17:32 +0200, Jonas Meurer wrote: > >> Just gave Linux 3.9-1-amd64 from Debian/sid a try. The issue is > >> reproducible with this DomU kernel. > > > > Could you post dmesg, /proc/ioports and /proc/interrupts from this > > kernel please? > > Sure, here we go. All attached as textfiles. Additionally, I attached > the (adjusted) domU config. Thanks. I'm taking this to xen-devel and moving the other two lists to bcc. For xen-devel the background can be found at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708344 The gist is that with: irq = [ 4 ] ioports = [ '3f8-3ff' ] in the guest config the serial port used to work with Jeremy's xen.git (used in Squeeze) but doesn't work with Wheezy (3.2 based) or a 3.9 kernel. The smstools daemon fails with: Cannot open serial port /dev/ttyS0, error: Function not implemented Jonas' dmesg shows: [0.196892] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [0.217565] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A and /proc/ioports shows the region but /proc/interrupts does not AFAICT. I can't see any interrupt related errors. Jonas can you confirm that the dmesg includes the logs resulting from an attempt to open the device? Jonas, could you try a few more experiments, if you don't mind: Can you use something simpler (like picocom) rather than smsdaemon and see if that works. Assuming not could you strace it so we can see what is actually failing. If those attempts result in anything extra in the dmesg please can you post it. It ought to be possible to set the port to polled mode, I think by setting the IRQ to -1 with setserial or I think it should be possible on the command line but I can't seem to figure out how... Anyway, if you can get that to work it might be interesting... Ian. nitializing cgroup subsys cpuset [0.00] Initializing cgroup subsys cpu [0.00] Linux version 3.9-1-amd64 (debian-ker...@lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Debian 3.9.4-1 [0.00] Command line: root=/dev/xvda2 ro root=/dev/xvda2 ro [0.00] ACPI in unprivileged domain disabled [0.00] e820: BIOS-provided physical RAM map: [0.00] Xen: [mem 0x-0x0009] usable [0.00] Xen: [mem 0x000a-0x000f] reserved [0.00] Xen: [mem 0x0010-0x0003007f] usable [0.00] NX (Execute Disable) protection: active [0.00] DMI not present or invalid. [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved [0.00] e820: remove [mem 0x000a-0x000f] usable [0.00] No AGP bridge found [0.00] e820: last_pfn = 0x300800 max_arch_pfn = 0x4 [0.00] e820: last_pfn = 0x10 max_arch_pfn = 0x4 [0.00] Base memory trampoline at [8809a000] 9a000 size 24576 [0.00] init_memory_mapping: [mem 0x-0x000f] [0.00] [mem 0x-0x000f] page 4k [0.00] init_memory_mapping: [mem 0x2ffe0-0x2] [0.00] [mem 0x2ffe0-0x2] page 4k [0.00] BRK [0x0187c000, 0x0187cfff] PGTABLE [0.00] BRK [0x0187d000, 0x0187dfff] PGTABLE [0.00] init_memory_mapping: [mem 0x2fc00-0x2ffdf] [0.00] [mem 0x2fc00-0x2ffdf] page 4k [0.00] BRK [0x0187e000, 0x0187efff] PGTABLE [0.00] BRK [0x0187f000, 0x0187] PGTABLE [0.00] BRK [0x0188, 0x01880fff] PGTABLE [0.00] init_memory_mapping: [mem 0x28000-0x2fbff] [0.00] [mem 0x28000-0x2fbff] page 4k [0.00] init_memory_mapping: [mem 0x0010-0x27fff] [0.00] [mem 0x0010-0x27fff] page 4k [0.00] init_memory_mapping: [mem 0x3-0x3007f] [0.00] [mem 0x3-0x3007f] page 4k [0.00] RAMDISK: [mem 0x01c7b000-0x03c13fff] [0.00] NUMA turned off [0.00] Faking a node at [mem 0x-0x0003007f] [0.00] Initmem setup node 0 [mem 0x-0x3007f] [0.00] NODE_DATA [mem 0x2fe81d000-0x2fe820fff] [0.00] Zone ranges: [0.00] DMA [mem 0x1000-0x00ff] [0.00] DMA32[mem 0x0100-0x] [0.00] Normal [mem 0x1-0x3007f] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x1000-0x0009] [0.00] node 0: [mem 0x0010-0x3007f] [0.00] On node 0 totalpages: 3147679 [0.00] DMA zone: 56 pages used for memmap [0.00] DMA zone: 21 pages reserved [0.00] DMA zone: 3999 pages, LIFO batch:0 [0.00] DMA32 zone: 14280 pages used for memmap [0.00] DMA32 zone: 1044480 pages, LIFO batch:31 [0