Re: [PATCH v3 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags
From: Oliver Upton
Date: Tue Nov 18 2025 - 19:54:04 EST
Hi Nathan,
Thanks for reporting this.
On Tue, Nov 18, 2025 at 03:44:48PM -0700, Nathan Chancellor wrote:
> where kvm_arch_alloc_vm() from arch/arm64/kvm/arm.c is
>
> struct kvm *kvm_arch_alloc_vm(void)
> {
> size_t sz = sizeof(struct kvm);
>
> if (!has_vhe())
> return kzalloc(sz, GFP_KERNEL_ACCOUNT);
>
> return __vmalloc(sz, GFP_KERNEL_ACCOUNT | __GFP_HIGHMEM | __GFP_ZERO);
> }
>
> Should __GFP_HIGHMEM be dropped from the call to __vmalloc? It looks
> like it was added by commit 115bae923ac8 ("KVM: arm64: Add memcg
> accounting to KVM allocations") back in 5.16.
Yep. May as well switch to kvzalloc() while we're at it.
Thanks,
Oliver