]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Remove extra ISBs when using msr_hcr_el2
authorMarc Zyngier <maz@kernel.org>
Sat, 21 Mar 2026 21:24:19 +0000 (21:24 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 23 Mar 2026 11:03:53 +0000 (11:03 +0000)
commit54a3cc145456272b10c1452fe89e1dcf933d5c39
treebe1cb96983cb0eb05df95d445f16c3bbeab8ca63
parent59c6e12d40a5b05038b68bcdb4690456fee68e8a
KVM: arm64: Remove extra ISBs when using msr_hcr_el2

The msr_hcr_el2 macro is slightly awkward, as it provides an ISB
when CONFIG_AMPERE_ERRATUM_AC04_CPU_23 is present, and none
otherwise. Note that this this option is 'default y', meaning that
it is likely to be selected.

Most instances of msr_hcr_el2 are also immediately followed by an ISB,
meaning that in most cases, you end-up with two back-to-back ISBs.
This isn't a big deal, but once you have seen that, you can't unsee it.

Rework the msr_hcr_el2 macro to always provide the ISB, and drop
the superfluous ISBs everywhere else.

Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260321212419.2803972-6-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/el2_setup.h
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/hyp-stub.S
arch/arm64/kvm/hyp/nvhe/host.S