Re: [PATCH v2 3/4] KVM: selftests: add get_numa_mem_nodes()
From: Garg, Shivank
Date: Sat Sep 05 2026 - 14:52:39 EST
On Tue, 2026-09-01 at 08:06 -0700, Sean Christopherson wrote:
> On Tue, Sep 01, 2026, Shivank Garg wrote:
> > The xAPIC IPI test uses MPOL_F_MEMS_ALLOWED to get the memory nodes
> > available to the current process. Move the query to numaif.h as
> > get_numa_mem_nodes() so other KVM selftests can use it.
> >
> > Call get_mempolicy() directly instead of using the assert-on-failure
> > kvm_get_mempolicy() wrapper. The xAPIC test already asserts its two
> > node requirement.
>
> NAK. This is not an improvement. get_mempolicy() straight up should not fail
> for this usage.
Agreed. I will drop this patch.
Your kvm_get_numa_memory_nodes() / kvm_get_next_numa_node() helpers are
more useful here.
Thanks,
Shivank