From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsqQq-0001Z8-S9 for qemu-devel@nongnu.org; Thu, 14 May 2015 06:32:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsqQn-0006qA-I9 for qemu-devel@nongnu.org; Thu, 14 May 2015 06:32:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsqQn-0006pA-9t for qemu-devel@nongnu.org; Thu, 14 May 2015 06:31:57 -0400 Date: Thu, 14 May 2015 12:31:50 +0200 From: Andrew Jones Message-ID: <20150514103150.GA12812@localhost.localdomain> References: <1431516714-25816-1-git-send-email-drjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431516714-25816-1-git-send-email-drjones@redhat.com> Subject: Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvmarm@lists.cs.columbia.edu, qemu-devel@nongnu.org, ard.biesheuvel@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org, pbonzini@redhat.com, agraf@suse.de Cc: catalin.marinas@arm.com, lersek@redhat.com On Wed, May 13, 2015 at 01:31:51PM +0200, Andrew Jones wrote: > Introduce a new memory region flag, KVM_MEM_UNCACHED, which is > needed by ARM. This flag informs KVM that the given memory region > is typically mapped by the guest as non-cacheable. KVM for ARM > then ensures that that memory is indeed mapped non-cacheable by > the guest, and also remaps that region as non-cacheable for > userspace, allowing them both to maintain a coherent view. > > Changes since v1: > 1) don't pin pages [Paolo] > 2) ensure the guest maps the memory non-cacheable [me] > 3) clean up memslot flag documentation [Christoffer] Forgot to (4): switch from setting userspace's mapping to device memory to normal, non-cacheable. Using device memory caused a problem that Alex Graf found, and Peter Maydell suggested using normal, non-cacheable instead. > changes 1 and 2 effectively redesigned/rewrote v1. Find v1 here > http://www.spinics.net/lists/kvm-arm/msg14022.html > > The QEMU series for v1 hasn't really changed. Only the linux > header hack needed to bump KVM_CAP_UNCACHED_MEM from 107 to > 116. Find the series here > http://www.spinics.net/lists/kvm-arm/msg14026.html > > Testing: > This series still needs lots of testing, but I thought I'd > kick it to the list early, as there's been recent interest > in solving this problem, and I'd like to get test results > and opinions on this approach from others sooner than later. > I've tested with AAVMF (UEFI for AArch64 mach-virt guests). > AAVMF has a kludge in it to avoid the coherency problem. > I've tested both with and without that kludge active. Both > worked for me (almost). Sometimes with the non-kludged > version I was still able to see a bit of corruption in > grub's output after edk2 loaded it - not much, and not always, > but something. Anyway, it's quite frustrating, as I'm not sure > what I'm missing... > > This series applies to Linus' 110bc76729d4, but I tested with > a version backported to the current RHELSA kernel. > > Thanks for reviews and testing! > > drew > > > Andrew Jones (3): > arm/arm64: pageattr: add set_memory_nc > KVM: promote KVM_MEMSLOT_INCOHERENT to uapi > arm/arm64: KVM: implement 'uncached' mem coherency > > Documentation/virtual/kvm/api.txt | 20 ++++++++++++------ > arch/arm/include/asm/cacheflush.h | 1 + > arch/arm/include/asm/kvm_mmu.h | 5 ++++- > arch/arm/include/asm/pgtable-3level.h | 1 + > arch/arm/include/asm/pgtable.h | 1 + > arch/arm/include/uapi/asm/kvm.h | 1 + > arch/arm/kvm/arm.c | 1 + > arch/arm/kvm/mmu.c | 39 ++++++++++++++++++++++------------- > arch/arm/mm/pageattr.c | 7 +++++++ > arch/arm64/include/asm/cacheflush.h | 1 + > arch/arm64/include/asm/kvm_mmu.h | 5 ++++- > arch/arm64/include/asm/memory.h | 1 + > arch/arm64/include/asm/pgtable.h | 1 + > arch/arm64/include/uapi/asm/kvm.h | 1 + > arch/arm64/mm/pageattr.c | 8 +++++++ > include/linux/kvm_host.h | 1 - > include/uapi/linux/kvm.h | 2 ++ > virt/kvm/kvm_main.c | 7 ++++++- > 18 files changed, 79 insertions(+), 24 deletions(-) > > -- > 2.1.0 > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm