From: Christoffer Dall <christoffer.dall@linaro.org>
To: Andrew Jones <drjones@redhat.com>
Cc: peter.maydell@linaro.org, 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, lersek@redhat.com,
kvmarm@lists.cs.columbia.edu, m.smarduch@samsung.com
Subject: Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED
Date: Thu, 14 May 2015 12:30:18 +0200 [thread overview]
Message-ID: <20150514103018.GM32765@cbox> (raw)
In-Reply-To: <1431516714-25816-1-git-send-email-drjones@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]
> 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?
> 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.
Remind me, this is a VGA framebuffer corruption with a PCI-plugged VGA
card?
Thanks,
-Christoffer
> 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
>
next prev parent reply other threads:[~2015-05-14 10:30 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 11:31 [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED Andrew Jones
2015-05-13 11:31 ` [Qemu-devel] [RFC/RFT PATCH v2 1/3] arm/arm64: pageattr: add set_memory_nc Andrew Jones
2015-05-14 11:05 ` Christoffer Dall
2015-05-14 13:46 ` Andrew Jones
2015-05-15 14:51 ` Christoffer Dall
2015-05-18 15:53 ` Catalin Marinas
2015-05-19 10:03 ` Andrew Jones
2015-05-19 11:18 ` Catalin Marinas
2015-05-19 11:38 ` Andrew Jones
2015-05-20 10:01 ` Christoffer Dall
2015-05-20 11:24 ` Catalin Marinas
2015-05-23 1:08 ` Mario Smarduch
2015-05-25 17:11 ` Andrew Jones
2015-05-27 1:08 ` Mario Smarduch
2015-05-13 11:31 ` [Qemu-devel] [RFC/RFT PATCH v2 2/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi Andrew Jones
2015-05-14 10:12 ` Paolo Bonzini
2015-05-14 10:34 ` Christoffer Dall
2015-05-13 11:31 ` [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency Andrew Jones
2015-05-14 10:55 ` Christoffer Dall
2015-05-14 13:32 ` Andrew Jones
2015-05-15 15:02 ` Christoffer Dall
2015-05-15 17:04 ` Andrew Jones
2015-05-15 20:16 ` Jérémy Fanguède
2015-05-21 2:29 ` Mario Smarduch
2015-05-21 16:50 ` Andrew Jones
2015-05-14 10:30 ` Christoffer Dall [this message]
2015-05-14 11:09 ` [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED Laszlo Ersek
2015-05-14 11:29 ` Christoffer Dall
2015-05-14 11:31 ` Paolo Bonzini
2015-05-14 11:36 ` Christoffer Dall
2015-05-14 11:38 ` Paolo Bonzini
2015-05-14 12:00 ` Christoffer Dall
2015-05-14 12:08 ` Paolo Bonzini
2015-05-14 12:24 ` Christoffer Dall
2015-05-14 12:28 ` Paolo Bonzini
2015-05-14 12:34 ` Christoffer Dall
2015-05-14 13:01 ` Laszlo Ersek
2015-05-14 12:38 ` Peter Maydell
2015-05-14 13:00 ` Andrew Jones
2015-05-14 13:32 ` Laszlo Ersek
2015-05-14 13:48 ` Michael S. Tsirkin
2015-05-14 14:19 ` Laszlo Ersek
2015-05-14 14:41 ` Michael S. Tsirkin
2015-05-15 9:00 ` Ard Biesheuvel
2015-05-14 10:31 ` Andrew Jones
2015-05-14 10:37 ` Peter Maydell
2015-05-14 13:03 ` Andrew Jones
2015-05-14 13:11 ` Peter Maydell
2015-05-14 13:33 ` Laszlo Ersek
2015-05-14 13:36 ` Andrew Jones
2015-05-15 15:09 ` Christoffer Dall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150514103018.GM32765@cbox \
--to=christoffer.dall@linaro.org \
--cc=agraf@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=drjones@redhat.com \
--cc=j.fanguede@virtualopensystems.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=lersek@redhat.com \
--cc=m.smarduch@samsung.com \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).