From: Oliver Upton <oupton@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: xuheng@cs.columbia.edu, maz@kernel.org, qperret@google.com,
will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com,
joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, kvmarm@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, tabba@google.com
Subject: Re: [PATCH] KVM: arm64: Add an ISB after mapping a hyp fixmap slot
Date: Thu, 29 Oct 2026 02:23:17 -0700 [thread overview]
Message-ID: <auMQhSmxIm5JMftF@kernel.org> (raw)
In-Reply-To: <20261029085414.2279900-1-fuad.tabba@linux.dev>
On Thu, Oct 29, 2026 at 08:54:14AM +0000, Fuad Tabba wrote:
> Hi Xuheng,
>
> On Wed, 28 Oct 2026 23:02:10 +0000, Xuheng Li <xuheng@cs.columbia.edu> wrote:
> [...]
> > A litmus test of the same shape (map the slot, DSB ISHST, load through
> > it) faulted on a Cortex-A72 in 2 out of 100M runs. Arm's herd7 model
> > with -variant vmsa also allows the fault, and forbids it once the ISB
> > is added.
>
> nit: it would help to have the litmus test itself in the commit message,
> or as a commit note, so the herd7 claim can be checked. Here's the one I
> ran (herd7 7.58, -variant vmsa): "Sometimes" as below, "Never" with an
> ISB after the DSB, and "Never" without the ISB under -variant vmsa,ETS2.
Maybe I've been conditioned at this point but doing DSB; ISB to consume a
translation after setting it up seems pretty straightforward. Especially
since we don't care about ETS in the kernel at this point.
IOW, I'm not sure what additional detail the litmus test buys us.
Anyway:
Reviewed-by: Oliver Upton <oupton@kernel.org>
Thanks,
Oliver
> AArch64 fixmap-noisb
> {
> [PTE(x)]=(oa:PA(x), valid:0);
> 0:X1=PTE(x); 0:X2=(oa:PA(x)); 0:X3=x;
> }
> P0 ;
> STR X2,[X1] ;
> DSB ISHST ;
> LDR W4,[X3] ;
> exists (fault(P0,x))
>
> FWIW, the result matches the ARM ARM (B2.3: without FEAT_ETS2, a DSB ST
> doesn't order an earlier store before a later translation table walk),
> and emit_pte_barriers() in arch/arm64/include/asm/pgtable.h has the same
> dsb(ishst) plus isb() after making a kernel pte valid, for the same
> reason.
>
> [...]
>
> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
>
> Tested in protected mode on QEMU, booting a protected and a
> non-protected guest, and on an Apple M4 (nested virtualization),
> booting a protected guest. No regressions.
>
> Tested-by: Fuad Tabba <fuad.tabba@linux.dev>
>
> Cheers,
> /fuad
prev parent reply other threads:[~2026-10-29 9:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 23:02 [PATCH] KVM: arm64: Add an ISB after mapping a hyp fixmap slot Xuheng Li via B4 Relay
2026-10-29 8:54 ` Fuad Tabba
2026-10-29 9:23 ` Oliver Upton [this message]
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=auMQhSmxIm5JMftF@kernel.org \
--to=oupton@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=qperret@google.com \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@kernel.org \
--cc=xuheng@cs.columbia.edu \
--cc=yuzenghui@huawei.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