Re: [PATCH 3/8] arm64: cpufeature: Add CPU capability for AArch32 EL1 support

From: Suzuki K Poulose
Date: Fri Apr 17 2020 - 05:39:32 EST


On 04/15/2020 02:22 PM, Marc Zyngier wrote:
On Wed, 15 Apr 2020 14:15:51 +0100
Suzuki K Poulose <suzuki.poulose@xxxxxxx> wrote:

On 04/15/2020 11:14 AM, Will Deacon wrote:
On Wed, Apr 15, 2020 at 11:13:54AM +0100, Suzuki K Poulose wrote:
On 04/14/2020 10:31 PM, Will Deacon wrote:
Although we emit a "SANITY CHECK" warning and taint the kernel if we
detect a CPU mismatch for AArch32 support at EL1, we still online the
CPU with disastrous consequences for any running 32-bit VMs.

Introduce a capability for AArch32 support at EL1 so that late onlining
of incompatible CPUs is forbidden.

Signed-off-by: Will Deacon <will@xxxxxxxxxx>

One of the other important missing sanity check for KVM is the VMID width
check. I will code something up.

Cheers! Do we handle things like the IPA size already?

Good point. No, we don't. I will include this too.

There is also the question of the ARMv8.5-GTG extension. I have a patch
that treats it as non-strict, but that approach would fail with KVM if
we online a late CPU without support for the right page size at S2.

Good point. Again this can be added to the list of checks performed on
the hot-plugged CPUs along with IPA, VMID width.

Cheers
Suzuki