Wei Xu
2013-Mar-29 11:21 UTC
What''s the benefit and design purpose of Xen Console for HVM guest.
Hi guys, I''m investigating Xen Console recently, i take some test on Linux(Fedora) hvm guest, it works good. (Xen-4.1.3 and Linux 3.5.0) As far as i know, the performance improvement of Xen Console seems to be great, but it looks like it just provides a shell for login via Xen Console for function concern, since it''s a console, i wonder if it is designed to be a system console? or just an additional shell access to the guest like ssh(rlogin), that means is it able to replace the emulated serial by qemu-dm totally, can it be able to print the early boot message and debugging message generated by printk() like function? Any answer would be appreciated a lot, thanks. Regards, Wei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Stefano Stabellini
2013-Mar-29 11:33 UTC
Re: What''s the benefit and design purpose of Xen Console for HVM guest.
On Fri, 29 Mar 2013, Wei Xu wrote:> Hi guys, > I''m investigating Xen Console recently, i take some test on Linux(Fedora) hvm guest, it works good. (Xen-4.1.3 and Linux 3.5.0) > > As far as i know, the performance improvement of Xen Console seems to be great, but it looks like it just provides a shell for > login via Xen Console for function concern, since it''s a console, > i wonder if it is designed to be a system console? or just an additional shell access to the guest like ssh(rlogin), that means > is it able to replace the emulated serial by qemu-dm totally, can it be able to print the early boot message and debugging > message generated by printk() like function?Yes, you just need to pass console=hvc0 to the kernel command line. It''s not just useful for debugging, it''s also possible to add a large number of PV consoles to an HVM guest, and they should all work without issues: one could be only used for logging kernel messages for example, another one for logging something else, and the rest as login shells. At the moment xl doesn''t export a config option to do that, but libxl knows how to create as many PV console as you like. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Stefano Stabellini
2013-Mar-29 16:30 UTC
Re: What''s the benefit and design purpose of Xen Console for HVM guest.
CC''ing back xen-devel. On Fri, 29 Mar 2013, Wei Xu wrote:> I have test the kgdb kernel debugging via serial, it works good when i used the physical serial to connect the 2 HVM guests(host > and target), is it possible to debugging kernel via Xen Console?I know very little about kgdb but I know that other people on the list use it. I guess it should be possible.> I know xen console will related to different file in "/dev/pts" for different HVM guest, so this is impossible by now, is it > possible to fit it? that means xen console is a full replacement of the emulated serial.I don''t understand what you mean here. Xen PV consoles also correspond to some /dev/pts devices in dom0.> what i am wondering most is why did Xen Console come to mind in the early date, that''s why did it raise? Was it going to replace > the emulated serial, or just an additional way to access the guest with high performance or sth other.Two main reasons come to mind: if you need additional console for logging, PV consoles provide you with a solution. If you need to debug an PV on HVM kernel very early on at resume time, PV consoles can be re-initialized much earlier than emulated serials. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Wei Xu
2013-Mar-29 17:31 UTC
Re: What''s the benefit and design purpose of Xen Console for HVM guest.
thanks, comments inlined. On Sat, Mar 30, 2013 at 12:30 AM, Stefano Stabellini < stefano.stabellini@eu.citrix.com> wrote:> CC''ing back xen-devel. > > On Fri, 29 Mar 2013, Wei Xu wrote: > > I have test the kgdb kernel debugging via serial, it works good when i > used the physical serial to connect the 2 HVM guests(host > > and target), is it possible to debugging kernel via Xen Console? > > I know very little about kgdb but I know that other people on the list > use it. I guess it should be possible. > > > > I know xen console will related to different file in "/dev/pts" for > different HVM guest, so this is impossible by now, is it > > possible to fit it? that means xen console is a full replacement of the > emulated serial. > > I don''t understand what you mean here. Xen PV consoles also correspond to > some /dev/pts devices in dom0. > >yes, i know, kgdb need a pipe-like serial pair to pass data between the 2 guests, while xenconsoled tells the PV console was linked to different files in /dev/pts bundled with only one guest, so i don''t know if it is possible to link/pipe them together. > what i am wondering most is why did Xen Console come to mind in the> early date, that''s why did it raise? Was it going to replace > > the emulated serial, or just an additional way to access the guest with > high performance or sth other. > > Two main reasons come to mind: if you need additional console for > logging, PV consoles provide you with a solution. > If you need to debug an PV on HVM kernel very early on at resume time, > PV consoles can be re-initialized much earlier than emulated serials.Why emulated serial can''t be re-initialized during resume time? i''m a little confused. beyond the 2 reasons, why performance improvement isn''t the main concern? or some other reasones unmentioned here? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel