]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: arm64: Drop useless __GFP_HIGHMEM from kvm struct allocation
authorOliver Upton <oupton@kernel.org>
Wed, 19 Nov 2025 09:38:21 +0000 (01:38 -0800)
committerOliver Upton <oupton@kernel.org>
Wed, 19 Nov 2025 20:20:56 +0000 (12:20 -0800)
A recent change on the receiving end of vmalloc() started warning about
unsupported GFP flags passed by the caller. Nathan reports that this
warning fires in kvm_arch_alloc_vm(), owing to the fact that KVM is
passing a meaningless __GFP_HIGHMEM.

Do as the warning says and fix the code.

Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/kvmarm/20251118224448.GA998046@ax162/
Acked-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://msgid.link/20251119093822.2513142-2-oupton@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
arch/arm64/kvm/arm.c

index 870953b4a8a74f0b51ffb444920604ee29f8b6ff..e791fa52f874b6c61703c40560f6514f34af5316 100644 (file)
@@ -440,7 +440,7 @@ struct kvm *kvm_arch_alloc_vm(void)
        if (!has_vhe())
                return kzalloc(sz, GFP_KERNEL_ACCOUNT);
 
-       return __vmalloc(sz, GFP_KERNEL_ACCOUNT | __GFP_HIGHMEM | __GFP_ZERO);
+       return __vmalloc(sz, GFP_KERNEL_ACCOUNT | __GFP_ZERO);
 }
 
 int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id)