public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
Cc: u-boot@lists.denx.de, "Marc Zyngier" <maz@kernel.org>,
	"Will Deacon" <willdeacon@google.com>,
	"Pierre-Clément Tosi" <ptosi@google.com>
Subject: Re: [PATCH v2 1/2] arm: cpu: Add optional CMOs by VA
Date: Tue, 7 Mar 2023 12:52:22 -0500	[thread overview]
Message-ID: <20230307175222.GM968799@bill-the-cat> (raw)
In-Reply-To: <20230208205428.1083689-2-paul.liu@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

On Thu, Feb 09, 2023 at 04:54:27AM +0800, Ying-Chun Liu (PaulLiu) wrote:

> From: Marc Zyngier <maz@kernel.org>
> 
> Exposing set/way cache maintenance to a virtual machine is unsafe, not
> least because the instructions are not permission-checked but also
> because they are not broadcast between CPUs. Consequently, KVM traps and
> emulates such maintenance in the host kernel using by-VA operations and
> looping over the stage-2 page-tables. However, when running under
> protected KVM, these instructions are not able to be emulated and will
> instead result in an exception being delivered to the guest.
> 
> Introduce CONFIG_CMO_BY_VA_ONLY so that virtual platforms can select
> this option and perform by-VA cache maintenance instead of using the
> set/way instructions.
> 
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Will Deacon <willdeacon@google.com>
> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
> [ Paul: pick from the Android tree. Fixup Pierre's commit. And fix some
>   checkpatch warnings. Rebased to upstream. ]
> Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
> Cc: Tom Rini <trini@konsulko.com>
> Link: https://android.googlesource.com/platform/external/u-boot/+/db5507f47f4f57f766d52f753ff2cc761afc213b
> Link: https://android.googlesource.com/platform/external/u-boot/+/2baf54e743380a1e4a6bc2dbdde020a2e783ff67

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2023-03-07 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 20:54 [PATCH v2 0/2] arm: cpu: Add optional CMOs by VA Ying-Chun Liu (PaulLiu)
2023-02-08 20:54 ` [PATCH v2 1/2] " Ying-Chun Liu (PaulLiu)
2023-03-07 17:52   ` Tom Rini [this message]
2023-02-08 20:54 ` [PATCH v2 2/2] arm64: Initialize TLB memory if CMO_BY_VA_ONLY Ying-Chun Liu (PaulLiu)
2023-03-07 17:52   ` Tom Rini

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=20230307175222.GM968799@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=maz@kernel.org \
    --cc=paul.liu@linaro.org \
    --cc=ptosi@google.com \
    --cc=u-boot@lists.denx.de \
    --cc=willdeacon@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox