[PATCH] KVM: arm64: Add an ISB after mapping a hyp fixmap slot

Fuad Tabba fuad.tabba at linux.dev
Thu Oct 29 01:54:14 PDT 2026


Hi Xuheng,

On Wed, 28 Oct 2026 23:02:10 +0000, Xuheng Li <xuheng at 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.

	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 at 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 at linux.dev>

Cheers,
/fuad



More information about the linux-arm-kernel mailing list