Gerd Hoffmann writes ("Re: [Qemu-devel] [PATCH 1/5] Add target memory mapping
API"):
Avi Kivity wrote:
[Avi:]
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 memory
I agree that grant handles should be handled by a different API. But
I don't see why they need to be mapped into guest physical memory, or
referred to via a target_phys_addr_t at all.
The only consumers of grant references in qemu are Xen-specific
backend drivers, and they can call the Xen-specific grant reference
APIs directly. There is no need for anyone but those backend drivers
to access those pages of guest memory.
So I don't see why grant references are relevant to the
cpu_physical_memory_map API at all.