public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel•org>
To: Christoffer Dall <christoffer.dall@arm•com>
Cc: linux-arm-kernel@lists•infradead.org, james.morse@arm•com,
	kvmarm@lists•cs.columbia.edu, julien.thierry.kdev@gmail•com,
	suzuki.poulose@arm•com
Subject: Re: [PATCH v2] KVM: arm64: Don't set HCR_EL2.TVM when S2FWB is supported
Date: Mon, 28 Oct 2019 13:45:49 +0000	[thread overview]
Message-ID: <86tv7tx9te.wl-maz@kernel.org> (raw)
In-Reply-To: <20191028130541.30536-1-christoffer.dall@arm.com>

On Mon, 28 Oct 2019 13:05:41 +0000,
Christoffer Dall <christoffer.dall@arm•com> wrote:
> 
> On CPUs that support S2FWB (Armv8.4+), KVM configures the stage 2 page
> tables to override the memory attributes of memory accesses, regardless
> of the stage 1 page table configurations, and also when the stage 1 MMU
> is turned off.  This results in all memory accesses to RAM being
> cacheable, including during early boot of the guest.
> 
> On CPUs without this feature, memory accesses were non-cacheable during
> boot until the guest turned on the stage 1 MMU, and we had to detect
> when the guest turned on the MMU, such that we could invalidate all cache
> entries and ensure a consistent view of memory with the MMU turned on.
> When the guest turned on the caches, we would call stage2_flush_vm()
> from kvm_toggle_cache().
> 
> However, stage2_flush_vm() walks all the stage 2 tables, and calls
> __kvm_flush-dcache_pte, which on a system with S2FWD does ... absolutely

s/FWD/FWB/

> nothing.
> 
> We can avoid that whole song and dance, and simply not set TVM when
> creating a VM on a system that has S2FWB.
> 
> Signed-off-by: Christoffer Dall <christoffer.dall@arm•com>
> Reviewed-by: Mark Rutland <mark.rutland@arm•com>

Apart from the nit above, and Mark's other remark, it looks good to
me. I'll fix them up when applying the patch.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-28 13:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 13:05 [PATCH v2] KVM: arm64: Don't set HCR_EL2.TVM when S2FWB is supported Christoffer Dall
2019-10-28 13:28 ` Mark Rutland
2019-10-28 13:45 ` Marc Zyngier [this message]
2019-10-28 15:12 ` Alexandru Elisei
2019-10-28 16:19   ` Marc Zyngier
2019-10-28 17:09     ` Mark Rutland
2019-11-06 13:02 ` Alexandru Elisei
2019-11-06 15:20   ` 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=86tv7tx9te.wl-maz@kernel.org \
    --to=maz@kernel$(echo .)org \
    --cc=christoffer.dall@arm$(echo .)com \
    --cc=james.morse@arm$(echo .)com \
    --cc=julien.thierry.kdev@gmail$(echo .)com \
    --cc=kvmarm@lists$(echo .)cs.columbia.edu \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=suzuki.poulose@arm$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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