KVM: arm64: VHE: Centralize ISBs when returning to host
authorMark Rutland <mark.rutland@arm.com>
Tue, 17 Jun 2025 13:37:18 +0000 (14:37 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Jun 2025 12:34:59 +0000 (13:34 +0100)
commit04c5355b2a94ff3191ce63ab035fb7f04d036869
treebce7087e72d0293db7418e6e8bd0706d199a352b
parent3a300a33e4063fb44c7887bec3aecd2fd6966df8
KVM: arm64: VHE: Centralize ISBs when returning to host

The VHE hyp code has recently gained a few ISBs. Simplify this to one
unconditional ISB in __kvm_vcpu_run_vhe(), and remove the unnecessary
ISB from the kvm_call_hyp_ret() macro.

While kvm_call_hyp_ret() is also used to invoke
__vgic_v3_get_gic_config(), but no ISB is necessary in that case either.

For the moment, an ISB is left in kvm_call_hyp(), as there are many more
users, and removing the ISB would require a more thorough audit.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250617133718.4014181-8-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/include/hyp/debug-sr.h
arch/arm64/kvm/hyp/vhe/switch.c