qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers
Date: Thu, 31 Mar 2011 15:23:03 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 03/31/2011 03:12 PM, Peter Maydell wrote:
On 31 March 2011 20:29, Anthony Liguori<address@hidden>  wrote:
On 03/31/2011 02:18 PM, Peter Maydell wrote:
So, to ask a dumb question, what does make something RAM?
It's a made up concept that we use to make device performance faster.

Basically, RAM should include all of the memory that a reasonable device
(that we control) would DMA to and has a relatively stable mapping.
This seems rather vague :-) "Suitable as a target for DMA"
seems more like a guest concept than a model one.

This is really exploited for paravirtual I/O (namely virtio) so it does cross into a guest concept.

Right, the trouble is, if you want to treat RAM like any other device, you
can't get stable mappings to it which is bad for something like vhost-net.
Well, obviously you need to be able to revoke the permission
to use the fastpath pointer to the underlying memory. But you
need to be able to do that anyhow, to cover cases where (eg) the
guest has just written to some register that remaps the bottom
part of the address space so it's ROM rather than RAM, or whatever.
It's just a feature your optimisation needs to have. Equally, you
don't remap unless you have to, but if the mapping's changed then
it's changed...

Right, the trouble now is that there's no way to distinguish between mapping where 1) we don't care about them in virtio and 2) they change frequently.

Maybe the right approach here is to just use a virtio specific API and register RAM as register_virtio_dma_area().

Regards,

Anthony Liguori

-- PMM





reply via email to

[Prev in Thread] Current Thread [Next in Thread]