Re: [PATCH 04/14] KVM: PPC: e500: MMU API

Avi Kivity
2011-11-01T09:55:30Z

On 11/01/2011 10:58 AM, Avi Kivity wrote:
> > > We already have another mechanism for such shared memory,
> > > mmap(vcpu_fd). x86 uses it for the coalesced mmio region as well as the
> > > traditional kvm_run area. Please consider using it.
> >
> > What does it buy us, other than needing a separate codepath in QEMU to
> > allocate the memory differently based on whether KVM (and this feature)
>
> The ability to use get_free_pages() and ordinary kernel memory directly,
> instead of indirection through a struct page ** array.

Ugh, you use vmap(), so this doesn't hold.

get_free_pages() is faster than vmap(), but not by much.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.