Manuel Wolfshant
2010-Aug-05 13:31 UTC
[CentOS-virt] working config for xen which would transfer a serial interface
Hello
Can anyone share a known working config for xen which would
transfer a serial interface ( add-on card preferably, mine uses
e880-e887 : 0000:03:05.0 / ec00-ec07 : 0000:03:05.0 ) to a DomU ?
I've been trying with the stock packages from Centos 5.5 ( fully
updated) and also with gitco's 3.4.3 but after 2 days of googling and
testing we still fail to access the serial interface from DomU.
No matter what we've tried,
- in DomU there is no reference to any kind of serial ports in
/proc/{interrupts,ioports}
- the test program which accesses ttyS0 fails ( it works just fine in
dom0) even after manually loading parport_serial in DomU
/dev/ttyS{0..3} do get created by default, if that matters.
Here is the content of the config file, after the last attempt
(which uses gitco's xen, but we failed similarly with the stock packages):
name = "testr"
uuid = "57baf51a-e293-fa35-9f2e-056a1c0e322a"
maxmem = 512
memory = 512
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]
disk = [ "tap:aio:/var/lib/xen/images/testr,xvda,w" ]
vif = [ "mac=00:16:36:0c:aa:1a,bridge=xenbr0,script=vif-bridge" ]
irq = [11 ]
ioports = [ "ec00-ec07","e080-e08f" ] // we also tried to
pass all the
IO ports referenced in lspci -vvv
[root at Dom0]#lspci -vvv
03:05.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O
Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic 1P2S
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at ec00 [size=8]
Region 1: I/O ports at e880 [size=8]
Region 2: I/O ports at e800 [size=8]
Region 3: I/O ports at e480 [size=8]
Region 4: I/O ports at e400 [size=8]
Region 5: I/O ports at e080 [size=16]
[root at Dom0 ~]# dmesg | grep ttyS
[root at Dom0 ~]# cat /etc/modprobe.d/blacklist
#[...]
blacklist 8250
blacklist 8250_pnp
blacklist serial_core
blacklist parport_serial
blacklist 8250_pci
[root at Dom0 ~]# grep xen /etc/grub.conf
title CentOS (2.6.18-194.el5xen)
kernel /xen.gz-3.4.3
module /vmlinuz-2.6.18-194.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.18-194.el5xen.img
title CentOS (2.6.18-194.8.1.el5xen)
kernel /xen.gz-3.4.3
module /vmlinuz-2.6.18-194.8.1.el5xen ro
root=/dev/VolGroup00/LogVol00 xencons=off
module /initrd-2.6.18-194.8.1.el5xen.img
[root at Dom0 ~]# uname -a
Linux Dom0 3 2.6.18-194.8.1.el5xen #1 SMP Thu Jul 1 19:41:05 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux
sniff from the boot messages in tge DomU:
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
XENBUS: Device with no driver: device/ioports/0
XENBUS: Device with no driver: device/ioports/1
XENBUS: Device with no driver: device/ioports/2
XENBUS: Device with no driver: device/ioports/3
XENBUS: Device with no driver: device/ioports/4
XENBUS: Device with no driver: device/ioports/5
XENBUS: Device with no driver: device/irq/0
XENBUS: Device with no driver: device/console/0
[root at DomU ~]# cat /proc/interrupts
CPU0
256: 7433 Dynamic-irq timer0
257: 0 Dynamic-irq resched0
258: 0 Dynamic-irq callfunc0
259: 554 Dynamic-irq xenbus
260: 705 Dynamic-irq xencons
261: 802 Dynamic-irq xenfb
262: 0 Dynamic-irq xenkbd
263: 6607 Dynamic-irq blkif
264: 8959 Dynamic-irq eth0
NMI: 0
LOC: 0
ERR: 0
MIS: 0
[root at DomU ~]# cat /proc/ioports
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0064-0064 : keyboard
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
[root at DomU ~]# lsmod
Module Size Used by
8250_pnp 43969 0
parport_serial 41153 0
8250_pci 56257 1 parport_serial
8250 86057 2 8250_pnp,8250_pci
serial_core 56385 1 8250
[...]
[root at DomU ~]# uname -a
Linux DomU 2.6.18-194.8.1.el5xen #1 SMP Thu Jul 1 19:41:05 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux
TIA
manuel
Philippe Naudin
2010-Aug-05 14:51 UTC
[CentOS-virt] working config for xen which would transfer a serial interface
Le Thu, 05 Aug 2010 16:31:21 +0300, Manuel Wolfshant <wolfy at nobugconsulting.ro> a ?crit :> Hello > > Can anyone share a known working config for xen which would > transfer a serial interface ( add-on card preferably, mine uses > e880-e887 : 0000:03:05.0 / ec00-ec07 : 0000:03:05.0 ) to a DomU ?Sorry, only the on-board standard serial port here : ## dom0 : /etc/xen/omega name = "omega" kernel = "/boot/vmlinuz-2.6.18-128.1.6.el5xen" ramdisk = "/boot/initrd-2.6.18-128.1.6.el5xen.img" memory = 256 vif = [ 'mac=AA:00:AC:10:01:0f, bridge=xenbr1' ] disk = ['file:/var/lib/xen/images/omega.img,sda1,w' ] # serial port : irq = [ 4 ] ioports = [ "3f8-3ff" ] # root = "/dev/sda1 ro" extra = "fastboot" ## domU : /etc/rc.local # but should be in /etc/udev/somewhere modprobe -a serial_core 8250 chown root:ups /dev/ttyS0 ## domU : ls /lib/modules/2.6.18-128.1.6.el5xen/kernel/drivers/serial/ 8250.ko 8250_pci.ko 8250_pnp.ko jsm serial_core.ko serial_cs.ko ## domU : lsmod | egrep '(serial|8250)' 8250 35685 2 serial_core 24641 1 8250 ## domU : dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A> [root at Dom0 ~]# dmesg | grep ttySXen virtual console successfully installed as ttyS0 (from /var/log/dmesg, the output of dmesg is full of messages from iptables)> [root at Dom0 ~]# cat /etc/modprobe.d/blacklist > #[...]blacklist 8250 blacklist 8250_pnp blacklist serial_core> [root at Dom0 ~]# grep xen /etc/grub.conftitle CentOS (2.6.18-194.8.1.el5xen) kernel /boot/xen.gz-2.6.18-194.8.1.el5 dom0_mem=256M vga=mode-0x307 noreboot dom0_vcpus_pin dom0_max_vcpus=1 xencons=tty module /boot/vmlinuz-2.6.18-194.8.1.el5xen ro root=LABEL=/ module /boot/initrd-2.6.18-194.8.1.el5xen.img # (not up-to-date because I am lazy...)> sniff from the boot messages in tge DomU:XENBUS: Device with no driver: device/vbd/2049 XENBUS: Device with no driver: device/vif/0 # ( nothing more )> [root at DomU ~]# cat /proc/interrupts > CPU04: 82698953 Phys-irq serial> [root at DomU ~]# cat /proc/ioports03f8-03ff : serial> > [root at DomU ~]# lsmod > Module Size Used by > 8250_pnp 43969 0 > parport_serial 41153 0 > 8250_pci 56257 1 parport_serial > 8250 86057 2 8250_pnp,8250_pci > serial_core 56385 1 8250 > [...]Good (for a standard serial port) but useless without a port. This domU has been created from an image from http://stacklet.com/. I had no problem at all. Good luck, -- Philippe
Manuel Wolfshant
2010-Aug-06 09:52 UTC
[CentOS-virt] working config for xen which would transfer a serial interface
On 08/05/2010 04:31 PM, Manuel Wolfshant wrote:> Hello > > Can anyone share a known working config for xen which would > transfer a serial interface ( add-on card preferably, mine uses > e880-e887 : 0000:03:05.0 / ec00-ec07 : 0000:03:05.0 ) to a DomU ?[...] Replying to myself: the very same config works OK when using the onboard interface, i.e. using irq = [ 4 ] ioports = [ "3f8-3ff" ] Is it a known bug / feature that add-on ports are not transferred to DomU ?