From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrK5-0000C8-J2 for qemu-devel@nongnu.org; Thu, 14 May 2015 07:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsrK0-0008Tr-6W for qemu-devel@nongnu.org; Thu, 14 May 2015 07:29:05 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:34193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrJz-0008TA-Um for qemu-devel@nongnu.org; Thu, 14 May 2015 07:29:00 -0400 Received: by laat2 with SMTP id t2so62926078laa.1 for ; Thu, 14 May 2015 04:28:59 -0700 (PDT) Date: Thu, 14 May 2015 13:29:10 +0200 From: Christoffer Dall Message-ID: <20150514112910.GR32765@cbox> References: <1431516714-25816-1-git-send-email-drjones@redhat.com> <20150514103018.GM32765@cbox> <5554826E.1040706@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5554826E.1040706@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: Laszlo Ersek Cc: peter.maydell@linaro.org, Andrew Jones , ard.biesheuvel@linaro.org, marc.zyngier@arm.com, catalin.marinas@arm.com, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, j.fanguede@virtualopensystems.com, kvmarm@lists.cs.columbia.edu, m.smarduch@samsung.com On Thu, May 14, 2015 at 01:09:34PM +0200, Laszlo Ersek wrote: > On 05/14/15 12:30, Christoffer Dall wrote: > > 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] > >> 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. > > > > How does the 'kludge' work? > > https://github.com/tianocore/edk2/commit/f9a8be42 > > (It's probably worth looking at the documentation in the first hunk too, > under the commit message.) > Why is this a hack/unintuitive? Is the semantics of the QEMU PCI bus not simply that MMIO regions are coherent? -Christoffer