From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 739A82ED153 for ; Thu, 25 Sep 2025 23:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758841426; cv=none; b=TitUnrhZ4oke87cLdIcrXLspqeh8KlWZfMojvgRJ+a4+sk0lCotmPeE7QnTgWmUEOWZaai5wRXKRWJzfe61D5UDYdNou2isS/nW1LM/WfGvzZVqCdC73s1IOPBSd+Qro5xdF0/qONO0fuJmkGlufMbsau8jQeMuPqSuIj67ynFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758841426; c=relaxed/simple; bh=Um8aeiydeRdUMdXziGIJjdPbc6WPGBVZ9bXwXt2CTto=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=u6qmiLSpoLWEOmbwRGq6yEnSZiz7gpx+kF7xtg5jfCGvghGeONgC/UyOeFfmFg03taKZgvtK/gpyulhF1UmiM42VOwsWag60PVaFr4nx2ydJahG9AjWkzKP0zB8RK4BP4aENlk7Msqt1YFbE6tysKF3drHxKkmM0vzmLI+YgBkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=N+sRq+UD; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="N+sRq+UD" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-32e09eaf85dso1940999a91.1 for ; Thu, 25 Sep 2025 16:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1758841424; x=1759446224; darn=lists.linux.dev; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=XtCsq70qhQXvjo5i7WnTkFuUeYKslZCOA6r0Ck9tpm8=; b=N+sRq+UD8aN9nQzMFL1qrJwOf+KETQQilLJk6j2QC5wP1gZ1UqYAd7kfgh4ADJT95i QKdVe1MBb8d+7KLePxBAimgl8oiSftnrHvXMYQ4YTx6Cp/y3r3dWSmFfAcROYee5cp3H EImBwLEKiaLMNzbb2rzHhKRtSeDmtbbbNIIs8CXdyWV+UcjcrJ+YbBuID2j4H1nfXcbY qFVI8IGTyRpMeeN4qcsMLBWxNt83+yKgcGMepd9K7jjyyE3kzZvK0UofGFl/83y8pa8w bq28fK/lW20qQ7HxCq8eqYZvgjtSmqTvoaZjMm051vQFWdt63GHZMj0pIAk5l3TJ3bDt 4qMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758841424; x=1759446224; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XtCsq70qhQXvjo5i7WnTkFuUeYKslZCOA6r0Ck9tpm8=; b=qWMGDEivyZhhf4f8vM++phNocLZ2c0JqaB8FD9N1ujhIDXF/7MFwbl95hjj04mR0K7 vAYAF/vOWTCptGw8DrM+h0MpLuH+QV+avTuQpezcMLVjY2Z+ItJciPEpuLDsBhiw1CtJ 7yvxRom61Eg6A8vT7DbNt5MQK7rlPQbcUT3S75a53iTAHK7MaVou6vwHPPB+rN0hzOsi 6d1a6UwJ0MFiDORC71y6Qlk/26jvEnRsTBdeNn2NnYK+ODiw8/ZWbQAiWEle7q1jfimK gGfNLiV8tJx7ykjos1DflTAfspE/vhrolscc5NT8HDQ47WRrexRv7RxKEIA20vqXBUC+ a2Iw== X-Forwarded-Encrypted: i=1; AJvYcCX4s0Mmfgfo+oTfJA6WkSMxI58lgHNwZrfL4pp8siiRBkDi46U8oZb3ySCKBgsi0HPVRRfUPKkiWvS3@lists.linux.dev X-Gm-Message-State: AOJu0YwOCUEa0R9q+HpNB2mWJpHtJD1eZYfGTgbZmFpC22HzXXrbT/ky tIbAnAs7BI1tSK+8l02m41bgMGj68cKJUbmMw1qmK0B6avNUkZsKPwp/K3wOq4ItcYimFUL2MYR BZDkEOA== X-Google-Smtp-Source: AGHT+IFCIuxfWzAAq0mG13fuYXVsG7N7KK6Fo0/VQdrpMqaeQ2l1EixZPHW4Wo1ErVxR9DWPn0iSBzBRvc0= X-Received: from pjbqo8.prod.google.com ([2002:a17:90b:3dc8:b0:330:6d2f:1b62]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3b4f:b0:330:852e:2bcc with SMTP id 98e67ed59e1d1-3342a2ca0e6mr5749959a91.21.1758841423443; Thu, 25 Sep 2025 16:03:43 -0700 (PDT) Date: Thu, 25 Sep 2025 16:03:41 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250827175247.83322-2-shivankg@amd.com> <20250827175247.83322-10-shivankg@amd.com> Message-ID: Subject: Re: [PATCH kvm-next V11 7/7] KVM: guest_memfd: selftests: Add tests for mmap and NUMA policy support From: Sean Christopherson To: Shivank Garg Cc: willy@infradead.org, akpm@linux-foundation.org, david@redhat.com, pbonzini@redhat.com, shuah@kernel.org, vbabka@suse.cz, brauner@kernel.org, viro@zeniv.linux.org.uk, dsterba@suse.com, xiang@kernel.org, chao@kernel.org, jaegeuk@kernel.org, clm@fb.com, josef@toxicpanda.com, kent.overstreet@linux.dev, zbestahu@gmail.com, jefflexu@linux.alibaba.com, dhavale@google.com, lihongbo22@huawei.com, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, rppt@kernel.org, surenb@google.com, mhocko@suse.com, ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, gourry@gourry.net, ying.huang@linux.alibaba.com, apopple@nvidia.com, tabba@google.com, ackerleytng@google.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, pvorel@suse.cz, bfoster@redhat.com, vannapurve@google.com, chao.gao@intel.com, bharata@amd.com, nikunj@amd.com, michael.day@amd.com, shdhiman@amd.com, yan.y.zhao@intel.com, Neeraj.Upadhyay@amd.com, thomas.lendacky@amd.com, michael.roth@amd.com, aik@amd.com, jgg@nvidia.com, kalyazin@amazon.com, peterx@redhat.com, jack@suse.cz, hch@infradead.org, cgzones@googlemail.com, ira.weiny@intel.com, rientjes@google.com, roypat@amazon.co.uk, chao.p.peng@intel.com, amit@infradead.org, ddutile@redhat.com, dan.j.williams@intel.com, ashish.kalra@amd.com, gshan@redhat.com, jgowans@amazon.com, pankaj.gupta@amd.com, papaluri@amd.com, yuzhao@google.com, suzuki.poulose@arm.com, quic_eberman@quicinc.com, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-coco@lists.linux.dev Content-Type: text/plain; charset="us-ascii" On Thu, Sep 25, 2025, Sean Christopherson wrote: > On Wed, Aug 27, 2025, Shivank Garg wrote: > > Add tests for NUMA memory policy binding and NUMA aware allocation in > > guest_memfd. This extends the existing selftests by adding proper > > validation for: > > - KVM GMEM set_policy and get_policy() vm_ops functionality using > > mbind() and get_mempolicy() > > - NUMA policy application before and after memory allocation > > > > These tests help ensure NUMA support for guest_memfd works correctly. > > > > Signed-off-by: Shivank Garg > > --- > > tools/testing/selftests/kvm/Makefile.kvm | 1 + > > .../testing/selftests/kvm/guest_memfd_test.c | 121 ++++++++++++++++++ > > 2 files changed, 122 insertions(+) > > > > diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm > > index 90f03f00cb04..c46cef2a7cd7 100644 > > --- a/tools/testing/selftests/kvm/Makefile.kvm > > +++ b/tools/testing/selftests/kvm/Makefile.kvm > > @@ -275,6 +275,7 @@ pgste-option = $(call try-run, echo 'int main(void) { return 0; }' | \ > > $(CC) -Werror -Wl$(comma)--s390-pgste -x c - -o "$$TMP",-Wl$(comma)--s390-pgste) > > > > LDLIBS += -ldl > > +LDLIBS += -lnuma > > Hrm, this is going to be very annoying. I don't have libnuma-dev installed on > any of my systems, and I doubt I'm alone. Installing the package is > trivial, but I'm a little wary of foisting that requirement on all KVM developers > and build bots. > > I'd be especially curious what ARM and RISC-V think, as NUMA is likely a bit less > prevelant there. Ugh, and it doesn't play nice with static linking. I haven't tried running on a NUMA system yet, so maybe it's benign? /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libnuma.a(affinity.o): in function `affinity_ip': (.text+0x629): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking