Re: [PATCH 1/1] direct mmio for passthrough - kernel part

Avi Kivity
2008-04-01T13:30:00Z

benami@il.ibm.com wrote:
> From: Ben-Ami Yassour <benami@il.ibm.com>
>
> Enable a guest to access a device's memory mapped I/O regions directly.
> Userspace sends the mmio regions that the guest can access. On the first
> page fault for an access to an mmio address the host translates the gva to hpa,
> and updates the sptes.
>
>

Can you explain why you're not using the regular memory slot mechanism?
i.e. have userspace mmap(/dev/mem) and create a memslot containing that
at the appropriate guest physical address?

There are some issues with refcounting, but Andrea has some tricks to
deal with that.

--
Any sufficiently difficult bug is indistinguishable from a feature.