qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Paolo Bonzini <pbonzini@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, lersek@redhat.com,
	kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org,
	m.smarduch@samsung.com
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED
Date: Thu, 19 Mar 2015 18:24:53 +0100	[thread overview]
Message-ID: <20150319172452.GA7360@hawk.usersys.redhat.com> (raw)
In-Reply-To: <550AFFB4.1000504@redhat.com>

On Thu, Mar 19, 2015 at 05:56:20PM +0100, Paolo Bonzini wrote:
> 
> 
> On 18/03/2015 20:10, 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 uncached. KVM for
> > ARM then maps that region as uncached for userspace as well,
> > in order to keep coherency.
> > 
> > Andrew Jones (3):
> >   KVM: promote KVM_MEMSLOT_INCOHERENT to uapi
> >   arm/arm64: KVM: decouple READONLY and UNCACHED
> >   arm/arm64: KVM: implement KVM_MEM_UNCACHED
> > 
> >  Documentation/virtual/kvm/api.txt | 16 ++++---
> >  arch/arm/include/asm/kvm_mmu.h    |  9 ++++
> >  arch/arm/include/uapi/asm/kvm.h   |  2 +
> >  arch/arm/kvm/arm.c                |  1 +
> >  arch/arm/kvm/mmu.c                | 90 ++++++++++++++++++++++++++++++++++-----
> >  arch/arm64/include/asm/kvm_mmu.h  |  9 ++++
> >  arch/arm64/include/uapi/asm/kvm.h |  2 +
> >  include/linux/kvm_host.h          |  1 -
> >  include/uapi/linux/kvm.h          |  2 +
> >  virt/kvm/kvm_main.c               |  7 ++-
> >  10 files changed, 121 insertions(+), 18 deletions(-)
> > 

Hi Paolo,

Thanks for the comments!

> 
> I think the pinning breaks running KVM as non-root (the default ulimit
> -l is just 64 KiB).  Can you do something about it with the MMU
> notifiers instead?

I'll look into this as soon as possible. I'm headed out 25 minutes ago
for some vacation time though, so it'll be week or so before I can.

> 
> It looks very clean.
> 
> The fly in the ointment is that some kind of quirk is probably needed in
> the future for ivshmem---it's definitely not acceptable performance-wise
> to mark it uncached, neither in the guests not in the host.  On the
> other hand that quirk would be necessary only in the guest, not in the
> firmware, so we can live with a mixture of the two approaches.

Yes, quirking ivshmem makes sense. ivshmem users (guest drivers) should
ensure they map the memory as cached, as they know it's normal memory
on the host.

drew

  reply	other threads:[~2015-03-19 17:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 19:08 [Qemu-devel] the arm cache coherency cluster "v2" Andrew Jones
2015-03-18 19:10 ` [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED Andrew Jones
2015-03-18 19:10   ` [Qemu-devel] [RFC PATCH 1/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi Andrew Jones
2015-04-20 15:26     ` Christoffer Dall
2015-03-18 19:10   ` [Qemu-devel] [RFC PATCH 2/3] arm/arm64: KVM: decouple READONLY and UNCACHED Andrew Jones
2015-03-18 19:10   ` [Qemu-devel] [RFC PATCH 3/3] arm/arm64: KVM: implement KVM_MEM_UNCACHED Andrew Jones
2015-03-19 16:56   ` [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED Paolo Bonzini
2015-03-19 17:24     ` Andrew Jones [this message]
2015-04-29  9:03   ` Alexander Graf
2015-04-29  9:19     ` Peter Maydell
2015-04-29 11:19       ` Andrew Jones
2015-03-18 19:11 ` [Qemu-devel] [RFC PATCH 0/4] support KVM_MEM_UNCACHED Andrew Jones
2015-03-18 19:11   ` [Qemu-devel] [RFC PATCH 1/4] kvm-all: put kvm_mem_flags to more work Andrew Jones
2015-03-18 19:11   ` [Qemu-devel] [RFC PATCH 2/4] HACK: linux header update Andrew Jones
2015-03-18 19:11   ` [Qemu-devel] [RFC PATCH 3/4] memory: add uncached flag Andrew Jones
2015-03-18 19:11   ` [Qemu-devel] [RFC PATCH 4/4] vga: flag vram as uncached Andrew Jones
2015-03-18 19:18 ` [Qemu-devel] the arm cache coherency cluster "v2" Andrew Jones
2015-05-03 21:29   ` Alexander Graf

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=20150319172452.GA7360@hawk.usersys.redhat.com \
    --to=drjones@redhat.com \
    --cc=agraf@suse.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --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).