From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 04/14] KVM: PPC: e500: MMU API Date: Tue, 01 Nov 2011 11:55:30 +0200 Message-ID: <4EAFC212.5070607@redhat.com> References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-5-git-send-email-agraf@suse.de> <4EAEA184.4050807@redhat.com> <4EAF013C.7050206@freescale.com> <4EAFB4B9.2040806@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Graf , kvm-ppc@vger.kernel.org, kvm list , Marcelo Tosatti To: Scott Wood Return-path: In-Reply-To: <4EAFB4B9.2040806@redhat.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Tue, 01 Nov 2011 09:55:30 +0000 Subject: Re: [PATCH 04/14] KVM: PPC: e500: MMU API Message-Id: <4EAFC212.5070607@redhat.com> List-Id: References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-5-git-send-email-agraf@suse.de> <4EAEA184.4050807@redhat.com> <4EAF013C.7050206@freescale.com> <4EAFB4B9.2040806@redhat.com> In-Reply-To: <4EAFB4B9.2040806@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Scott Wood Cc: Alexander Graf , kvm-ppc@vger.kernel.org, kvm list , Marcelo Tosatti 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.