|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [PATCH 1/5] Add target memory mapping API |
Date: | Mon, 19 Jan 2009 18:25:20 +0200 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
Gerd Hoffmann wrote:
Avi Kivity wrote:Grant handles should be handled by a different API.That was terse... here's how I think it should be done: - step 1: map the grant handle into guest physical memoryHaha.
Right :)
Guess I should explain a bit more what grant handles are ... A xen domain can give other domains permission to map specific pages. This is called a grant. This is used by xen paravirtual drivers. The domU frontend driver hands out grants to the backend driver (usually dom0), so the backend driver can fill the guest buffers with the data. I want qemu be able to handle the backend side, so it must be able to map and unmap grants. I think fitting this into the memory mapping API can be useful, especially if the mapping API starts to get used by generic code. Maybe the block layer some day accepts iovecs with guest physical addresses and does map/unmap transparently? Then I'd like to be able to pass in a iovec with grants instead.
Well, I still think it should be done by a separate API. Multiplexing target addresses and grant handles on the same API is messy.
The block driver should keep its host virtual address interface; maybe we'll add a layer that accepts sglists on top of it; in that case we can add another API that accepts sglists that contain grant handles instead of addresses.
-- error compiling committee.c: too many arguments to function
[Prev in Thread] | Current Thread | [Next in Thread] |