From nobody Sun Feb 8 16:32:05 2026 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 C5D98270540 for ; Tue, 7 Oct 2025 22:14:53 +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=1759875295; cv=none; b=WLfeth7Z6aHihli74HqfVo3/REpXQtJt3gM2Cg7yu1VpCtptkZ87J/jvSpHYUqLT2P8Fo9RmtWIKZ9wOi5wbsQDpffVV+TyFxBkMwOR/1+yaFwp+kI7E/YlLNsyt0kPaZKjbOBruOBTHfKx5WFSwaLBpaYJhDW3MJDw9+wTxJgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759875295; c=relaxed/simple; bh=iKrUI9LQBOh4k9pZFLc/fEW3XuLEnIsg8figDKSsXGA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RULYVdSnwY7iMMQc1hT7fEKu9LKXBT5JIiIu3pWZWsMWl910ylP5et4O+6sp2WFkKaaTuZPozZPLAtChJ8wfNQ9zhH6xydqsMGKRWsj6KBQsEgvW13P9p1kCQl1nj40cUhb3q64qkAJBKTQ13VFS+HwYzXAezwVANqmzdydAGFs= 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=vcMV4QfK; 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="vcMV4QfK" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-32ee62ed6beso11279047a91.2 for ; Tue, 07 Oct 2025 15:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1759875293; x=1760480093; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=efPtgGQoMr4oubNxAv1qKprX0Kma5wbATW1PH+6tg30=; b=vcMV4QfKo2kxGdvra5XBptOVM9oPG/9lY8hsuCunTcIXK4MUZAu5JEFSZs9gszv2lQ Eo/x0Z9n6CLvh2ncOutm63mC7BK3QndH2EpEPGpQTuzMFoNn9/WhYG4K/0DV9H/7Vrku bvtwUzG13cKkiF5Tvcm+qg6fJu3w3tSfxFirnb1l+GRjRWlzfb5EAkul2nZWXoRs9F8Q SCgOKu1nZEc3Qc9FN13xyeeV+6l5bvrjOzaBuz/swpRfUTYWaipxBpd9E2AxgQJ6uxe7 FaQOyYq3Ip0PFVChFzHtr1YnE28covXBwzWiAE83v4f/G313dZ3KF/IxfpPjyCtisPQX CI6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759875293; x=1760480093; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=efPtgGQoMr4oubNxAv1qKprX0Kma5wbATW1PH+6tg30=; b=Xw9CTBRvp76VIrH2i8X6aX7YcvgC90GYETUpElHXXJHlWqUO50gpsnzXO2yT1nU9E2 NZX/iAzikqqrBsmaH/9U9pE6vCSaderZS059OTGpc8jhg3cGYzDMtVWaKniBnftmi7Ob yl8jOuoMHkGROR0BoAxpiCzHmFvAZQ6t+6cH3P4zsQbBSly262aXqoPdsVreAidfYNgj x7Q/eLBQZOXUmtF0mTZ4ivsKZU8UCznNRoeUan3rRWFK3akhMckidIioNQibyElkMIyQ eg+VOQqTgwW+hhyt6RwwErLpd1ZDRPp/SHbnnYhrj9hxQGvRtUK1VRHv5YzJZOGhPl8T CRjA== X-Forwarded-Encrypted: i=1; AJvYcCUnDQgKCduEU2+hGNMvfUo3L7cc07Zi8B8WyWsI0QMMfl1s/PEW0/JI2CGUgIW9UNA8d2KJoWBws0CMt3M=@vger.kernel.org X-Gm-Message-State: AOJu0YyUlfXgt5vinlXKo6Q83oNvYX4On7KMve+r2oOQyYfgM+07o6OS 6ps0pLTyBW7u5BEw0mcSC8kGByWY4ljJvVNgJHGKxVP+TSIrqCKTKvp16EYZx1FEQuZGjR4vDuX OHzYBPg== X-Google-Smtp-Source: AGHT+IFTaBPktlqVR37VqVA9cZzZZ/8OTio3uAd9mQ94N7kdyxx902DDy6/7iqhCbZbcOwfgNKOb2jtvL6Q= X-Received: from pjbsn6.prod.google.com ([2002:a17:90b:2e86:b0:32b:61c4:e48b]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:1806:b0:32d:db5b:7636 with SMTP id 98e67ed59e1d1-33b513cdaf5mr1179313a91.27.1759875293062; Tue, 07 Oct 2025 15:14:53 -0700 (PDT) Reply-To: Sean Christopherson Date: Tue, 7 Oct 2025 15:14:17 -0700 In-Reply-To: <20251007221420.344669-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251007221420.344669-1-seanjc@google.com> X-Mailer: git-send-email 2.51.0.710.ga91ca5db03-goog Message-ID: <20251007221420.344669-10-seanjc@google.com> Subject: [PATCH v12 09/12] KVM: selftests: Use proper uAPI headers to pick up mempolicy.h definitions From: Sean Christopherson To: Marc Zyngier , Oliver Upton , Paolo Bonzini , Sean Christopherson Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Hildenbrand , Fuad Tabba , Ackerley Tng , Shivank Garg , Ashish Kalra , Vlastimil Babka Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Include mempolicy.h in KVM's numaif.h to pick up the kernel-provided NUMA definitions, and drop selftests' definitions, which are _mostly_ equivalent. The syscall numbers in particular are subtly x86_64-specific, i.e. will cause problems if/when numaif.h is used outsize of x86. Opportunistically clean up the file comment and make the syscall wrappers static inline so that including the header multiple times won't lead to weirdness (currently numaif.h is included by exactly one header). Fixes: 346b59f220a2 ("KVM: selftests: Add missing header file needed by xAP= IC IPI tests") Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/include/numaif.h | 32 +------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/tools/testing/selftests/kvm/include/numaif.h b/tools/testing/s= elftests/kvm/include/numaif.h index aaa4ac174890..1554003c40a1 100644 --- a/tools/testing/selftests/kvm/include/numaif.h +++ b/tools/testing/selftests/kvm/include/numaif.h @@ -1,14 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/* - * tools/testing/selftests/kvm/include/numaif.h - * - * Copyright (C) 2020, Google LLC. - * - * This work is licensed under the terms of the GNU GPL, version 2. - * - * Header file that provides access to NUMA API functions not explicitly - * exported to user space. - */ +/* Copyright (C) 2020, Google LLC. */ =20 #ifndef SELFTEST_KVM_NUMAIF_H #define SELFTEST_KVM_NUMAIF_H @@ -37,25 +28,4 @@ KVM_SYSCALL_DEFINE(mbind, 6, void *, addr, unsigned long= , size, int, mode, const unsigned long *, nodemask, unsigned long, maxnode, unsigned int, flags); =20 -/* Policies */ -#define MPOL_DEFAULT 0 -#define MPOL_PREFERRED 1 -#define MPOL_BIND 2 -#define MPOL_INTERLEAVE 3 - -#define MPOL_MAX MPOL_INTERLEAVE - -/* Flags for get_mem_policy */ -#define MPOL_F_NODE (1<<0) /* return next il node or node of address = */ - /* Warning: MPOL_F_NODE is unsupported and - * subject to change. Don't use. - */ -#define MPOL_F_ADDR (1<<1) /* look up vma using address */ -#define MPOL_F_MEMS_ALLOWED (1<<2) /* query nodes allowed in cpuset */ - -/* Flags for mbind */ -#define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping= */ -#define MPOL_MF_MOVE (1<<1) /* Move pages owned by this process to co= nform to mapping */ -#define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mappi= ng */ - #endif /* SELFTEST_KVM_NUMAIF_H */ --=20 2.51.0.710.ga91ca5db03-goog