All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: kevin zhao <xiaoqiang.zhao@cloudminds.com>
Cc: kvmarm@lists.cs.columbia.edu
Subject: Re: ARM64 kvm cache coherency problem
Date: Mon, 20 May 2019 08:14:07 +0100	[thread overview]
Message-ID: <86v9y57g3k.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <7c31d3ab-ac30-626e-05be-b2547b558f4a@cloudminds.com>

Hi Kevin,

On Mon, 20 May 2019 04:19:50 +0100,
kevin zhao <xiaoqiang.zhao@cloudminds.com> wrote:
> 
> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; UTF-8 (8bit)>]
>  Hi, there:
> 
>     I have seen some RFC about solving ARM64 kvm cache incoherency
> issue ([1], [2]) in May 2015. I followed a few threads and did not
> know how this arguments ends.

First, let me put things straight: there is no KVM/arm64 cache
coherency problem. The issue is that people expect behaviours that are
specific to x86 (such as coherency between cacheable and non-cacheable
aliases) to work on non-x86 architectures. This isn't a reasonable
expectation, unfortunately.

The patches you refer to try to workaround the issue by changing
either QEMU's or the kernel's behaviour. I contend that none of these
need to be changed, but instead the guest has to be fixed to properly
behave on the arm64 architecture, which includes things such as not
lying about what is a real device and what is an emulated one.

I've ranted publicly on this very subject a long while ago[1], with
all the gory details of what fails, why, and what the solutions
are. In the end, KVM/arm64 works remarkably well for what actually
matters, such as PV devices (virtio) and directly assigned devices,
without any cache coherency issue.

>    Does anybody know how this problem  is solved finally ?

The architecture has gained the ARMv8.4 FWB extension, which solves
some of these problems by allowing Stage-2 to override the guest's
attributes (and a couple of other things that make I$/D$ coherency
much easier). Yes, it would have been nice to have this since day one
(circa 2008), but it involves getting hold of a crystal ball and a
time machine, both of which are out of stock at my local dealer.

I don't know of any publicly available CPU implementing FWB at this
stage, so this is a moot point...

Thanks,

	M.

[1] https://events.static.linuxfound.org/sites/events/files/slides/slides_10.pdf

-- 
Jazz is not dead, it just smell funny.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

       reply	other threads:[~2019-05-20  7:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7c31d3ab-ac30-626e-05be-b2547b558f4a@cloudminds.com>
2019-05-20  7:14 ` Marc Zyngier [this message]
2019-05-20  7:31   ` ARM64 kvm cache coherency problem kevin zhao

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=86v9y57g3k.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=xiaoqiang.zhao@cloudminds.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.