Hans Rakers
2007-Dec-04 10:59 UTC
[Xen-users] Serial port access in HVM (fully virtualized) DomU
Hello xen-users, Last days i''ve been pulling my hair on getting ttyS0 (COM1) to work in a HVM DomU. I want to use it for an external faxmodem for use with Hylafax. I''ve Googled myself crazy and have seen just about every page on this subject :) My system is CentOS 5.1 with xen-3.0.3-41.el5. I''ve added xencons=off to grub.conf of DomU and i''ve added the following to /etc/modprobe.d/blacklist: blacklist 8250 blacklist 8250_pnp blacklist serial_core I can confirm that Dom0 does not claim the serial ports (no mention of it during boot, no modules loaded, xencons off) My DomU also runs CentOS 5.1. I''ve added the following to its vm config: irq = [3, 4] ioports = ["3f8-3ff", "2f8-2ff"] Syslog of the DomU mentions the loading of the 8250 module, but no resulting ports: Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled /proc/ioports of the DomU also doesn''t mention the mapped ioports: [...snip snip...] 01f0-01f7 : ide0 03c0-03df : vga+ 03f2-03f5 : floppy 03f6-03f6 : ide0 03f7-03f7 : floppy DIR 0cf8-0cff : PCI conf1 [...snip snip...] Is this at all possible, or am i overlooking something stupid? Do ''ioports'' and ''irq'' work with fully virtualized VM''s? I''ve read something earlier on this list at http://lists.xensource.com/archives/html/xen-users/2007-08/msg00838.html which states that it is impossible for HVMs to have direct access to hardware, which is why i ask, before spending another day on this :) Thanks in advance, Hans Rakers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sadique Puthen
2007-Dec-04 11:07 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
What is the output of "dmesg | grep ttyS" in dom0? --Sadique Hans Rakers wrote:> > Hello xen-users, > > Last days i''ve been pulling my hair on getting ttyS0 (COM1) to work in > a HVM DomU. I want to use it for an external faxmodem for use with > Hylafax. I''ve Googled myself crazy and have seen just about every page > on this subject :) > > My system is CentOS 5.1 with xen-3.0.3-41.el5. I''ve added xencons=off > to grub.conf of DomU and i''ve added the following to > /etc/modprobe.d/blacklist: > > blacklist 8250 > blacklist 8250_pnp > blacklist serial_core > > I can confirm that Dom0 does not claim the serial ports (no mention of > it during boot, no modules loaded, xencons off) > > My DomU also runs CentOS 5.1. I''ve added the following to its vm config: > > irq = [3, 4] > ioports = ["3f8-3ff", "2f8-2ff"] > > Syslog of the DomU mentions the loading of the 8250 module, but no > resulting ports: > > Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled > > /proc/ioports of the DomU also doesn''t mention the mapped ioports: > > [...snip snip...] > 01f0-01f7 : ide0 > 03c0-03df : vga+ > 03f2-03f5 : floppy > 03f6-03f6 : ide0 > 03f7-03f7 : floppy DIR > 0cf8-0cff : PCI conf1 > [...snip snip...] > > Is this at all possible, or am i overlooking something stupid? Do > ''ioports'' and ''irq'' work with fully virtualized VM''s? I''ve read > something earlier on this list at > http://lists.xensource.com/archives/html/xen-users/2007-08/msg00838.html > which states that it is impossible for HVMs to have direct access to > hardware, which is why i ask, before spending another day on this :) > > Thanks in advance, > > Hans Rakers > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans Rakers
2007-Dec-04 11:24 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
Nothing, as i already stated. I''m pretty sure Dom0 doesn''t load anything serial-ish, and i''ve blacklisted the 8250/8250_pnp/serial_core modules on Dom0. Grub.conf entry of Dom0 looks like this: title CentOS (2.6.18-53.1.4.el5xen) root (hd0,0) kernel /xen.gz-2.6.18-53.1.4.el5 console=vga module /vmlinuz-2.6.18-53.1.4.el5xen root=/dev/VolGroup00/LogVol01 ro xencons=off module /initrd-2.6.18-53.1.4.el5xen.img Kind regards, Hans Sadique Puthen wrote:> > What is the output of "dmesg | grep ttyS" in dom0? > > --Sadique > > > Hans Rakers wrote: >> >> Hello xen-users, >> >> Last days i''ve been pulling my hair on getting ttyS0 (COM1) to work in >> a HVM DomU. I want to use it for an external faxmodem for use with >> Hylafax. I''ve Googled myself crazy and have seen just about every page >> on this subject :) >> >> My system is CentOS 5.1 with xen-3.0.3-41.el5. I''ve added xencons=off >> to grub.conf of DomU and i''ve added the following to >> /etc/modprobe.d/blacklist: >> >> blacklist 8250 >> blacklist 8250_pnp >> blacklist serial_core >> >> I can confirm that Dom0 does not claim the serial ports (no mention of >> it during boot, no modules loaded, xencons off) >> >> My DomU also runs CentOS 5.1. I''ve added the following to its vm config: >> >> irq = [3, 4] >> ioports = ["3f8-3ff", "2f8-2ff"] >> >> Syslog of the DomU mentions the loading of the 8250 module, but no >> resulting ports: >> >> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled >> >> /proc/ioports of the DomU also doesn''t mention the mapped ioports: >> >> [...snip snip...] >> 01f0-01f7 : ide0 >> 03c0-03df : vga+ >> 03f2-03f5 : floppy >> 03f6-03f6 : ide0 >> 03f7-03f7 : floppy DIR >> 0cf8-0cff : PCI conf1 >> [...snip snip...] >> >> Is this at all possible, or am i overlooking something stupid? Do >> ''ioports'' and ''irq'' work with fully virtualized VM''s? I''ve read >> something earlier on this list at >> http://lists.xensource.com/archives/html/xen-users/2007-08/msg00838.html >> which states that it is impossible for HVMs to have direct access to >> hardware, which is why i ask, before spending another day on this :) >> >> Thanks in advance, >> >> Hans Rakers >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Trolle Selander
2007-Dec-04 11:41 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
This is a HVM DomU, so you need to use an emulated serial port backed by the physical port. There is no support for assigning physical serial port resources to "give" the serial port directly to the HVM DomU. Theoretically, this should be fairly easily doable even on IOMMU-less systems, but as far as I know. there''s no code to do this yet for HVMs. Serial ports on a separate PCI card should be possible to using the PCI passthrough feature in recent versions of xen. However, the emulated device may work fine for you, with much less hassle. Just make sure that your serial ports _are_ available to Dom0 (that is, remove the blacklist entries), and then add serial=/dev/ttyS0 to your HVM domain config. There are some caveats with serial emulation currently - I''m working on improving this particular code right now, so if you run into any strangeness, I''ll probably know what''s going on and be able to help. :) On Dec 4, 2007 12:24 PM, Hans Rakers <hans@react.nl> wrote:> > Nothing, as i already stated. I''m pretty sure Dom0 doesn''t load anything > serial-ish, and i''ve blacklisted the 8250/8250_pnp/serial_core modules > on Dom0. > > Grub.conf entry of Dom0 looks like this: > > title CentOS (2.6.18-53.1.4.el5xen) > root (hd0,0) > kernel /xen.gz-2.6.18-53.1.4.el5 console=vga > module /vmlinuz-2.6.18-53.1.4.el5xen > root=/dev/VolGroup00/LogVol01 ro xencons=off > module /initrd-2.6.18-53.1.4.el5xen.img > > > Kind regards, > > Hans > > > Sadique Puthen wrote: > > > > What is the output of "dmesg | grep ttyS" in dom0? > > > > --Sadique > > > > > > Hans Rakers wrote: > >> > >> Hello xen-users, > >> > >> Last days i''ve been pulling my hair on getting ttyS0 (COM1) to work in > >> a HVM DomU. I want to use it for an external faxmodem for use with > >> Hylafax. I''ve Googled myself crazy and have seen just about every page > >> on this subject :) > >> > >> My system is CentOS 5.1 with xen-3.0.3-41.el5. I''ve added xencons=off > >> to grub.conf of DomU and i''ve added the following to > >> /etc/modprobe.d/blacklist: > >> > >> blacklist 8250 > >> blacklist 8250_pnp > >> blacklist serial_core > >> > >> I can confirm that Dom0 does not claim the serial ports (no mention of > >> it during boot, no modules loaded, xencons off) > >> > >> My DomU also runs CentOS 5.1. I''ve added the following to its vm > config: > >> > >> irq = [3, 4] > >> ioports = ["3f8-3ff", "2f8-2ff"] > >> > >> Syslog of the DomU mentions the loading of the 8250 module, but no > >> resulting ports: > >> > >> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing > enabled > >> > >> /proc/ioports of the DomU also doesn''t mention the mapped ioports: > >> > >> [...snip snip...] > >> 01f0-01f7 : ide0 > >> 03c0-03df : vga+ > >> 03f2-03f5 : floppy > >> 03f6-03f6 : ide0 > >> 03f7-03f7 : floppy DIR > >> 0cf8-0cff : PCI conf1 > >> [...snip snip...] > >> > >> Is this at all possible, or am i overlooking something stupid? Do > >> ''ioports'' and ''irq'' work with fully virtualized VM''s? I''ve read > >> something earlier on this list at > >> > http://lists.xensource.com/archives/html/xen-users/2007-08/msg00838.html > >> which states that it is impossible for HVMs to have direct access to > >> hardware, which is why i ask, before spending another day on this :) > >> > >> Thanks in advance, > >> > >> Hans Rakers > >> > >> _______________________________________________ > >> Xen-users mailing list > >> Xen-users@lists.xensource.com > >> http://lists.xensource.com/xen-users > >> > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans Rakers
2007-Dec-04 12:29 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
Wow OK, where can i send a bottle of beer to? :) Your solution works like a charm! Removed the mods from the blacklist, loaded them in Dom0, added ''serial = "/dev/ttyS0"'' to DomU config and Hylafax''s faxaddmodem configured the modem without any problems so far. Big thanks to you! Kind regards, Hans Rakers Trolle Selander wrote:> This is a HVM DomU, so you need to use an emulated serial port backed by > the physical port. There is no support for assigning physical serial > port resources to "give" the serial port directly to the HVM DomU. > Theoretically, this should be fairly easily doable even on IOMMU-less > systems, but as far as I know. there''s no code to do this yet for HVMs. > Serial ports on a separate PCI card should be possible to using the PCI > passthrough feature in recent versions of xen. > > However, the emulated device may work fine for you, with much less > hassle. Just make sure that your serial ports _are_ available to Dom0 > (that is, remove the blacklist entries), and then add serial=/dev/ttyS0 > to your HVM domain config. There are some caveats with serial emulation > currently - I''m working on improving this particular code right now, so > if you run into any strangeness, I''ll probably know what''s going on and > be able to help. :) > > On Dec 4, 2007 12:24 PM, Hans Rakers <hans@react.nl > <mailto:hans@react.nl>> wrote: > > > Nothing, as i already stated. I''m pretty sure Dom0 doesn''t load anything > serial-ish, and i''ve blacklisted the 8250/8250_pnp/serial_core modules > on Dom0. > > Grub.conf entry of Dom0 looks like this: > > title CentOS (2.6.18-53.1.4.el5xen) > root (hd0,0) > kernel /xen.gz-2.6.18-53.1.4.el5 console=vga > module /vmlinuz-2.6.18-53.1.4.el5xen > root=/dev/VolGroup00/LogVol01 ro xencons=off > module /initrd-2.6.18-53.1.4.el5xen.img > > > Kind regards, > > Hans > > > Sadique Puthen wrote: > > > > What is the output of "dmesg | grep ttyS" in dom0? > > > > --Sadique > > > > > > Hans Rakers wrote: > >> > >> Hello xen-users, > >> > >> Last days i''ve been pulling my hair on getting ttyS0 (COM1) to > work in > >> a HVM DomU. I want to use it for an external faxmodem for use with > >> Hylafax. I''ve Googled myself crazy and have seen just about > every page > >> on this subject :) > >> > >> My system is CentOS 5.1 with xen-3.0.3-41.el5. I''ve added > xencons=off > >> to grub.conf of DomU and i''ve added the following to > >> /etc/modprobe.d/blacklist: > >> > >> blacklist 8250 > >> blacklist 8250_pnp > >> blacklist serial_core > >> > >> I can confirm that Dom0 does not claim the serial ports (no > mention of > >> it during boot, no modules loaded, xencons off) > >> > >> My DomU also runs CentOS 5.1. I''ve added the following to its vm > config: > >> > >> irq = [3, 4] > >> ioports = ["3f8-3ff", "2f8-2ff"] > >> > >> Syslog of the DomU mentions the loading of the 8250 module, but no > >> resulting ports: > >> > >> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing > enabled > >> > >> /proc/ioports of the DomU also doesn''t mention the mapped ioports: > >> > >> [...snip snip...] > >> 01f0-01f7 : ide0 > >> 03c0-03df : vga+ > >> 03f2-03f5 : floppy > >> 03f6-03f6 : ide0 > >> 03f7-03f7 : floppy DIR > >> 0cf8-0cff : PCI conf1 > >> [...snip snip...] > >> > >> Is this at all possible, or am i overlooking something stupid? Do > >> ''ioports'' and ''irq'' work with fully virtualized VM''s? I''ve read > >> something earlier on this list at > >> > http://lists.xensource.com/archives/html/xen-users/2007-08/msg00838.html > >> which states that it is impossible for HVMs to have direct access to > >> hardware, which is why i ask, before spending another day on > this :) > >> > >> Thanks in advance, > >> > >> Hans Rakers > >> > >> _______________________________________________ > >> Xen-users mailing list > >> Xen-users@lists.xensource.com <mailto:Xen-users@lists.xensource.com> > >> http://lists.xensource.com/xen-users > >> > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com <mailto:Xen-users@lists.xensource.com> > > http://lists.xensource.com/xen-users > <http://lists.xensource.com/xen-users> > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com <mailto:Xen-users@lists.xensource.com> > http://lists.xensource.com/xen-users > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
dbrunell
2007-Dec-08 02:08 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
I''m having a similar problem with opensuse 10.2 and Xen 3.0.3. I cannot get Xen to release ttyS0 to Dom0, even with xencons=off or xencons=tty. There is no ttyS0 in dmesg and I get an invalid port message if I try to run minicom on it. However, if I reboot without the Xen kernel the port works fine (shows up in dmesg and works in minicom). Any ideas on how to troubleshoot this? Regards, David Trolle Selander wrote:> > This is a HVM DomU, so you need to use an emulated serial port backed by > the > physical port. There is no support for assigning physical serial port > resources to "give" the serial port directly to the HVM DomU. > Theoretically, > this should be fairly easily doable even on IOMMU-less systems, but as far > as I know. there''s no code to do this yet for HVMs. Serial ports on a > separate PCI card should be possible to using the PCI passthrough feature > in > recent versions of xen. > > However, the emulated device may work fine for you, with much less hassle. > Just make sure that your serial ports _are_ available to Dom0 (that is, > remove the blacklist entries), and then add serial=/dev/ttyS0 to your HVM > domain config. There are some caveats with serial emulation currently - > I''m > working on improving this particular code right now, so if you run into > any > strangeness, I''ll probably know what''s going on and be able to help. :) > > >-- View this message in context: http://www.nabble.com/Serial-port-access-in-HVM-%28fully-virtualized%29-DomU-tf4942467.html#a14224524 Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sadique Puthen
2007-Dec-12 10:18 UTC
Re: [Xen-users] Serial port access in HVM (fully virtualized) DomU
dbrunell wrote:> I''m having a similar problem with opensuse 10.2 and Xen 3.0.3. I cannot get > Xen to release ttyS0 to Dom0, even with xencons=off or xencons=tty. There > is no ttyS0 in dmesg and I get an invalid port message if I try to run > minicom on it. However, if I reboot without the Xen kernel the port works > fine (shows up in dmesg and works in minicom). > > Any ideas on how to troubleshoot this? >Pass "console=xvc console=tty0 xencons=xvc" in the kernel line of the grub.conf in dom0. I have the below line title Red Hat Enterprise Linux Server (2.6.18-53.1.4.el5xen) root (hd0,0) kernel /xen.gz-2.6.18-53.1.4.el5 module /vmlinuz-2.6.18-53.1.4.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet console=xvc console=tty0 xencons=xvc module /initrd-2.6.18-53.1.4.el5xen.img Then check dmesg after this. --Sadique> Regards, > > David > > > > Trolle Selander wrote: > >> This is a HVM DomU, so you need to use an emulated serial port backed by >> the >> physical port. There is no support for assigning physical serial port >> resources to "give" the serial port directly to the HVM DomU. >> Theoretically, >> this should be fairly easily doable even on IOMMU-less systems, but as far >> as I know. there''s no code to do this yet for HVMs. Serial ports on a >> separate PCI card should be possible to using the PCI passthrough feature >> in >> recent versions of xen. >> >> However, the emulated device may work fine for you, with much less hassle. >> Just make sure that your serial ports _are_ available to Dom0 (that is, >> remove the blacklist entries), and then add serial=/dev/ttyS0 to your HVM >> domain config. There are some caveats with serial emulation currently - >> I''m >> working on improving this particular code right now, so if you run into >> any >> strangeness, I''ll probably know what''s going on and be able to help. :) >> >> >> >> > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users