WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Buffered IO for IO?

To: Trolle Selander <trolle.selander@xxxxxxxxx>, "Zulauf, John" <john.zulauf@xxxxxxxxx>
Subject: Re: [Xen-devel] Buffered IO for IO?
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Sat, 21 Jul 2007 12:08:49 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 21 Jul 2007 04:03:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <515922b50707210359j72721fbcj19383ce7da17d516@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfLh4N3wcJXBzd6EdybwwAWy6hiGQ==
Thread-topic: [Xen-devel] Buffered IO for IO?
User-agent: Microsoft-Entourage/11.3.3.061214
Yes, it strikes me that this cannot be done safely without providing a set of ‘proxy device models’ in the hypervisor that know when it is safe to buffer and when the buffers must be flushed, according to native hardware behaviour.

 -- Keir

On 21/7/07 11:59, "Trolle Selander" <trolle.selander@xxxxxxxxx> wrote:

Safety would depend on how the emulated device works. For serial ports in particular, it's definitely not safe, since depending on the model of UART emulated, and the settings of the UART control registers, every outb may result in a serial interrupt and UART register changes that will have to be processed before any further io can be done.
It's possible that there might be some performance to be gained by "upgrading" the emulated UART to a 16550A or better, and doing buffered IO for the FIFO. Earlier this year I was experimenting with a patch that made the qemu-dm serial emulation into a 16550A with FIFO, but though the patch did fix some compatability issues with software that assumed a 16550A UART in the HVM guest I'm working with, serial performance actually got noticeably _worse_, so I never bothered submitting it. Implementing the FIFO with buffered IO would possibly make it work better, but I don't see how it could be done without moving at least part of the serial device model into the hypervisor, which just strikes me as more trouble than it's worth.

/Trolle

On 7/21/07, Keir Fraser <keir@xxxxxxxxxxxxx> wrote:



On 20/7/07 22:33, "Zulauf, John" <john.zulauf@xxxxxxxxx> wrote:

> Has anyone experimented with adding Buffered IO support for "out"
> instructions?  Currently, the buffered io pages is only used for mmio
> writes (and then only to vga space).  It seems quite straight-forward to
> add.

Is it safe to buffer, and hence arbitrarily delay, any I/O port write?

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel