Re: [PATCH v2 2/3] KVM: arm64: Check the host stage-2 PGD allocation for NULL
From: Fuad Tabba
Date: Fri Nov 06 2026 - 06:51:10 EST
Hi Xuheng,
On Thu, 05 Nov 2026 22:59:49 +0000, Xuheng Li <xuheng@xxxxxxxxxxxxxxx> wrote:
[...]
> The pool is sized so that this allocation, the first one made from it,
> cannot fail, so nothing in mainline reaches this path once the pool
> size is computed correctly. Return NULL early anyway, so that a
> mis-sized pool makes initialisation fail cleanly.
Could you drop this patch? Once patch 1 is in nothing reaches it, and
before patch 1 pKVM init fails earlier on those machines.
The guest-side twin, guest_s2_zalloc_pages_exact(), is reachable, and
[1] fixes it by checking the PGD's alignment in __pkvm_init_vm().
Cheers,
/fuad
[1] https://lore.kernel.org/all/20261105075606.367005-2-fuad.tabba@xxxxxxxxx/