[PATCH v4 15/23] KVM: arm64: Add a range to pKVM ownership selftest
Vincent Donnefort
vdonnefort at google.com
Thu Nov 26 12:01:15 PST 2026
On Mon, Nov 23, 2026 at 07:56:49PM +0000, Fuad Tabba wrote:
> Hi Vincent,
>
> On Tue, 17 Nov 2026 17:43:54 +0000, Vincent Donnefort
> <vdonnefort at google.com> wrote:
> [...]
> > diff --git a/arch/arm64/kvm/pkvm.c b/arch/arm64/kvm/pkvm.c
> > index 4c80e0960154..ae53c701206a 100644
> > --- a/arch/arm64/kvm/pkvm.c
> > +++ b/arch/arm64/kvm/pkvm.c
> [...]
> > static void __init pkvm_ownership_selftest(void)
> > {
> > unsigned long pgtable_order = 5;
> > unsigned long pgtable = 0;
> > - unsigned long page = 0;
> > - long ret = -ENOMEM;
> >
> > /* Memory for the VM page-table */
> > pgtable = __get_free_pages(GFP_KERNEL, pgtable_order);
> > if (!pgtable)
> > - goto out;
> > + return;
> [...]
> > + __pkvm_ownership_selftest(0, pgtable, pgtable_order);
> > + __pkvm_ownership_selftest(PMD_ORDER, pgtable, pgtable_order);
>
> Could you skip the block case with a message when its allocation
> fails? With 64K pages it's a 512MB contiguous allocation, and the
> selftest prints a failure when it can't get one.
>
> Cheers,
> /fuad
That's a good point. I'll also GFP_NOWARN.
--
Vincent
More information about the linux-arm-kernel
mailing list