Trolle Selander
2007-Dec-04 16:32 UTC
[Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
This patch adds 16550 emulation to qemu-dm. I still consider it a work in progress, but from my testing, it consistently performs better than the old code already, sometimes considerably so (on my laptop, dumping out data over serial from a HVM DomU -> pty in Dom0 was up to 5.3 times faster than with the old 16450 code). I can consistenly reach full 115200 baud speeds over physical serial lines when the virtual device is backed by a phys port, which I never could with the old code. There are still some things to be done. I want to add proper error handling, so that overflow/framing & parity errors on the physical port get detected and reported by the virtual port. Also, now that FIFOs are in place, I believe performance could be improved significantly by putting some code into the hypervisor so that reads & writes from the FIFOs don''t have to exit into qemu-dm at all. I''m also reading up on the specs for newer uarts with deeper FIFOs. However, for now, I think this patch is already quite good, and I don''t think I should sit on it any longer. I''m looking forward to hearing what results others will get with it. It applies on top of my previously posted patch for modem status/control line passthrough, so I''m re-posting that patch here as well to make things easier. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alan Cox
2007-Dec-04 16:48 UTC
Re: [Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
On Tue, 4 Dec 2007 17:32:39 +0100 "Trolle Selander" <trolle.selander@gmail.com> wrote:> This patch adds 16550 emulation to qemu-dm. I still consider it a work inI hope you mean 16550A, 16550 was a faulty part which lost bits and was withdrawn. The 16550A is subtly different. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Trolle Selander
2007-Dec-04 18:06 UTC
Re: [Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
Yes, I do mean 16550A-or-later. The code comments make this clear even if my patch name and slightly rushed patched description didn''t. The hardware document I used was actually for a 16550D, but I believe there''s no difference on the programming/behavior level. On Dec 4, 2007 5:48 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:> On Tue, 4 Dec 2007 17:32:39 +0100 > "Trolle Selander" <trolle.selander@gmail.com> wrote: > > > This patch adds 16550 emulation to qemu-dm. I still consider it a work > in > > I hope you mean 16550A, 16550 was a faulty part which lost bits and was > withdrawn. The 16550A is subtly different. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Dec-05 13:55 UTC
Re: [Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
Please email me a signed-off-by line: Signed-off-by: Trolle Selander <trolle.selander@gmail.com> You can see the DeveloperĀ¹s Certificate of Origin at: http://old.linux-foundation.org/newsroom/press_releases/2004/2004_05_24_dco. html ...which is what you are certifying by providing the signed-off-by attribution for your patches. -- Keir On 4/12/07 16:32, "Trolle Selander" <trolle.selander@gmail.com> wrote:> This patch adds 16550 emulation to qemu-dm. I still consider it a work in > progress, but from my testing, it consistently performs better than the old > code already, sometimes considerably so (on my laptop, dumping out data over > serial from a HVM DomU -> pty in Dom0 was up to 5.3 times faster than with the > old 16450 code). I can consistenly reach full 115200 baud speeds over physical > serial lines when the virtual device is backed by a phys port, which I never > could with the old code. > > There are still some things to be done. I want to add proper error handling, > so that overflow/framing & parity errors on the physical port get detected and > reported by the virtual port. Also, now that FIFOs are in place, I believe > performance could be improved significantly by putting some code into the > hypervisor so that reads & writes from the FIFOs don''t have to exit into > qemu-dm at all. I''m also reading up on the specs for newer uarts with deeper > FIFOs. > > However, for now, I think this patch is already quite good, and I don''t think > I should sit on it any longer. I''m looking forward to hearing what results > others will get with it. > > It applies on top of my previously posted patch for modem status/control line > passthrough, so I''m re-posting that patch here as well to make things easier. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2007-Dec-05 14:24 UTC
Re: [Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
On Tue, Dec 04, 2007 at 05:32:39PM +0100, Trolle Selander wrote:> This patch adds 16550 emulation to qemu-dm. I still consider it a work in > progress, but from my testing, it consistently performs better than the old > code already, sometimes considerably so (on my laptop, dumping out data over > serial from a HVM DomU -> pty in Dom0 was up to 5.3 times faster than with > the old 16450 code). I can consistenly reach full 115200 baud speeds over > physical serial lines when the virtual device is backed by a phys port, > which I never could with the old code. > > There are still some things to be done. I want to add proper error handling, > so that overflow/framing & parity errors on the physical port get detected > and reported by the virtual port. Also, now that FIFOs are in place, I > believe performance could be improved significantly by putting some code > into the hypervisor so that reads & writes from the FIFOs don''t have to exit > into qemu-dm at all. I''m also reading up on the specs for newer uarts with > deeper FIFOs. > > However, for now, I think this patch is already quite good, and I don''t > think I should sit on it any longer. I''m looking forward to hearing what > results others will get with it.>From a quick glance through the patches there doesn''t appear to be anythingthat is Xen specific in these patches. If I am correct in this understanding, could you send the patches to upstream qemu-devel mailing lists, so Xen does not have to carry this fork forever. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Trolle Selander
2007-Dec-05 14:35 UTC
Re: [Xen-devel] [PATCH] [QEMU-DM] Upgrade emulated UART to 16550A.
I don''t think they''ll apply cleanly to mainline qemu due to the serial_get_token stuff, which is xen-specific, but it should be utterly trivial to fix this. I''ll make new patches against the latest mainline qemu and submit them to qemu-devel as soon as I have time. I don''t think qemu will benefit as much from them performance-wise, but they definitely do belong upstream. On Dec 5, 2007 3:24 PM, Daniel P. Berrange <berrange@redhat.com> wrote:> On Tue, Dec 04, 2007 at 05:32:39PM +0100, Trolle Selander wrote: > > This patch adds 16550 emulation to qemu-dm. I still consider it a work > in > > progress, but from my testing, it consistently performs better than the > old > > code already, sometimes considerably so (on my laptop, dumping out data > over > > serial from a HVM DomU -> pty in Dom0 was up to 5.3 times faster than > with > > the old 16450 code). I can consistenly reach full 115200 baud speeds > over > > physical serial lines when the virtual device is backed by a phys port, > > which I never could with the old code. > > > > There are still some things to be done. I want to add proper error > handling, > > so that overflow/framing & parity errors on the physical port get > detected > > and reported by the virtual port. Also, now that FIFOs are in place, I > > believe performance could be improved significantly by putting some code > > into the hypervisor so that reads & writes from the FIFOs don''t have to > exit > > into qemu-dm at all. I''m also reading up on the specs for newer uarts > with > > deeper FIFOs. > > > > However, for now, I think this patch is already quite good, and I don''t > > think I should sit on it any longer. I''m looking forward to hearing what > > results others will get with it. > > From a quick glance through the patches there doesn''t appear to be > anything > that is Xen specific in these patches. If I am correct in this > understanding, > could you send the patches to upstream qemu-devel mailing lists, so Xen > does > not have to carry this fork forever. > > Regards, > Dan. > -- > |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 > -=| > |=- Perl modules: http://search.cpan.org/~danberr/<http://search.cpan.org/%7Edanberr/> -=| > |=- Projects: http://freshmeat.net/~danielpb/<http://freshmeat.net/%7Edanielpb/> -=| > |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 > -=| >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel