Subject: Re: [PATCH 00/17] arm64: Early CPU feature override, and an application to VHE

From: Marc Zyngier <[email-masked]>
Date: Tue, 29 Dec 2020 19:27:14 +0000

On 2020-12-28 10:49, Marc Zyngier wrote:
> It recently came to light that there is a need to be able to override
> some CPU features very early on, before the kernel is fully up and
> running. The reasons for this range from specific feature support
> (such as using Protected KVM on VHE HW, which is the main motivation
> for this work) to errata workaround (a feature is broken on a CPU and
> needs to be turned off, or rather not enabled).
> 
> This series tries to offer a limited framework for this kind of
> problems, by allowing a set of options to be passed on the
> command-line and altering the feature set that the cpufeature
> subsystem exposes to the rest of the kernel. Note that this doesn't
> change anything for code that directly uses the CPU ID registers.
> 
> The series completely changes the way a VHE-capable arm64 boots, by
> *always* booting non-VHE first, and then upgrading to VHE when deemed
> capable. Although this sounds scary, this is actually simple to
> implement (and I wish I had though of it five years ago). The "upgrade
> to VHE" path is then conditioned on the VHE feature not being disabled
> from the command-line.
> 
> Said command-line parsing borrows a lot from the kaslr code, and
> subsequently allows the "nokaslr" option to be moved to the new
> infrastructure (though it all looks a bit... odd).
> 
> This has been tested on multiple VHE and non-VHE systems.

FWIW, I've just fixed a number of issues with this series, ranging
from compilation issues when CONFIG_RANDOMIZE_BASE is not set,
SPE setup bugs, and boot hangs when kaslr kicks in.

It all should be fixed now, and I have pushed an updated series
at [1], for those of you who really can't wait to try new stuff
while you could just ignore it all.

Thanks,

         M.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=hack/arm64-early-cpufeature
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel