KVM: arm64: nv: Work around lack of pauth support in old toolchains
authorMarc Zyngier <maz@kernel.org>
Mon, 22 Apr 2024 14:13:03 +0000 (15:13 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 23 Apr 2024 18:27:11 +0000 (19:27 +0100)
commit5513394de681a456ad728ae775c58c41aff14011
tree9285c2c86582c5dbba50410df3263b563f5f3123
parent814ad8f96e929fa9c60bd360d2f7bccfc1df0111
KVM: arm64: nv: Work around lack of pauth support in old toolchains

We still support GCC 8.x, and it appears that this toolchain
usually comes with an assembler that does not understand "pauth"
as a valid architectural extension.

This results in the NV ERETAx code breaking the build, as it relies
on this extention to make use of the PACGA instruction (required
by assemblers such as LLVM's).

Work around it by hand-assembling the instruction, which removes the
requirement for any assembler directive.

Fixes: 6ccc971ee2c6 ("KVM: arm64: nv: Add emulation for ERETAx instructions")
Reported-by: Linaro Kernel Functional Testing <lkft@linaro.org>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/pauth.c