On Thu, Mar 31, 2011 at 10:32:11PM +0100, Peter Maydell wrote: > On 31 March 2011 21:23, Anthony Liguori <anth...@codemonkey.ws> wrote: > > On 03/31/2011 03:12 PM, Peter Maydell wrote: > >> 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. > > Aha. Thanks for the explanation. > > > Maybe the right approach here is to just use a virtio specific API and > > register RAM as register_virtio_dma_area(). > > That seems like a clearer API, yes. I think it makes it much more > obvious what it's trying to achieve. > > -- PMM
Maybe register_dma_area - its' not 100% virtio specific. -- MST