From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v5 00/13] KVM/X86: Introduce a new guest mapping interface Date: Wed, 23 Jan 2019 13:16:39 -0500 Message-ID: <20190123181636.GR19289@Konrads-MacBook-Pro.local> References: <1547026933-31226-1-git-send-email-karahmed@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com To: KarimAllah Ahmed Return-path: Content-Disposition: inline In-Reply-To: <1547026933-31226-1-git-send-email-karahmed@amazon.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, Jan 09, 2019 at 10:42:00AM +0100, KarimAllah Ahmed wrote: > Guest memory can either be directly managed by the kernel (i.e. have a "struct > page") or they can simply live outside kernel control (i.e. do not have a > "struct page"). KVM mostly support these two modes, except in a few places > where the code seems to assume that guest memory must have a "struct page". > > This patchset introduces a new mapping interface to map guest memory into host > kernel memory which also supports PFN-based memory (i.e. memory without 'struct > page'). It also converts all offending code to this interface or simply > read/write directly from guest memory. Patch 2 is additionally fixing an > incorrect page release and marking the page as dirty (i.e. as a side-effect of > using the helper function to write). > > As far as I can see all offending code is now fixed except the APIC-access page > which I will handle in a seperate series along with dropping > kvm_vcpu_gfn_to_page and kvm_vcpu_gpa_to_page from the internal KVM API. > > The current implementation of the new API uses memremap to map memory that does > not have a "struct page". This proves to be very slow for high frequency > mappings. Since this does not affect the normal use-case where a "struct page" > is available, the performance of this API will be handled by a seperate patch > series. Where could one find this patchset? Also is there an simple test-case (or a writeup) you have for testing this code? Specifically I am thinking about the use-case of "memory without the 'struct page'" And thank you for posting this patchset. It was a pleasure reviewing the code!