Thread (5 messages) 5 messages, 4 authors, 2024-08-08

Re: [PATCH] KVM: arm64: Enforce dependency on an ARMv8.4-aware toolchain

From: Arnd Bergmann <hidden>
Date: 2024-08-07 12:04:33
Also in: kvm, kvmarm

On Wed, 7 Aug 2024 at 13:51, Marc Zyngier [off-list ref] wrote:
With the NV support of TLBI-range operations, KVM makes use of
instructions that are only supported by binutils versions >= 2.30.

This breaks the build for very old toolchains.

Make KVM support conditional on having ARMv8.4 support in the
assembler, side-stepping the issue.

Fixes: 5d476ca57d7d ("KVM: arm64: nv: Add handling of range-based TLBI operations")
Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Suggested-by: Arnd Bergmann <redacted>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
 menuconfig KVM
        bool "Kernel-based Virtual Machine (KVM) support"
+       depends on AS_HAS_ARMV8_4
        select KVM_COMMON
        select KVM_GENERIC_HARDWARE_ENABLING
        select KVM_GENERIC_MMU_NOTIFIER
I think this is good enough here, only slightly more limiting than
we strictly need. A slightly more fine-grained approach would
turn off VHE mode on old binutils but keep NVHE. That is still
inaccurate of course since VHE only depends on v8.2, so
I'm in favor of keeping the version you posted.

For reference, even the gcc-5.5 toolchain I built for kernel.org
in 2019 came with recent enough binutils, and we are likely to
soon require gcc-8 or higher anyway.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help