Re: [PATCH v3 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags

From: Christoph Hellwig

Date: Wed Nov 19 2025 - 00:44:32 EST


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?

Yes. vmalloc uses highmem internally where useful (on arm64 it won't be
useful of course).