[PATCH v3 3/3] arm64: Get rid of CONFIG_ARM64_VHE

Arnd Bergmann arnd at kernel.org
Thu Apr 8 22:47:38 BST 2021


On Thu, Apr 8, 2021 at 3:10 PM Marc Zyngier <maz at kernel.org> wrote:
>
> CONFIG_ARM64_VHE was introduced with ARMv8.1 (some 7 years ago),
> and has been enabled by default for almost all that time.
>
> Given that newer systems that are VHE capable are finally becoming
> available, and that some systems are even incapable of not running VHE,
> drop the configuration altogether.
>
> Anyone willing to stick to non-VHE on VHE hardware for obscure
> reasons should use the 'kvm-arm.mode=nvhe' command-line option.

Have you considered adding options to do the reverse logic for this
and other features, such as making support for the old non-VHE
optional at compile time?

I understand that so far the rule is (almost) always that an arm64 kernel
should run on any Armv8.0-A or higher system regardless of configuration,
but the now announced Armv9.0-A definition might be the chance to
introduce the concept of a minimum level the way we do on other
architectures (e.g. armv6/v6k/v7 or k8/pentium4/core2/atom/generic).

The way I can see this working would be to have a single user-visible
option that controls whether the kernel supports only Armv9.0-A/Armv8.5-A
and assumes all mandatory features of that are present, or it remains
as before and supports all implementations back to the first v8.

This would help eliminate the runtime detection for not just VHE but
also LSE, LPA, PAN, etc. Not sure how significant the cost of any of
those are in terms of runtime performance and/or code size, but it
would feel nice to be able to build a kernel that can actually rely
on sane hardware features even if it will take a few more years before
that hardware becomes common enough to actually get some distros
ship a kernel that requires v8.5/v9.0.

        Arnd



More information about the linux-arm-kernel mailing list