Re: [PATCH v4 14/19] KVM: selftests: Add kvm_sched_getaffinity() wrapper and convert users

From: Sean Christopherson

Date: Mon Jun 01 2026 - 15:28:19 EST


On Sat, May 30, 2026, Josh Hilke wrote:
> diff --git a/tools/testing/selftests/kvm/include/kvm_syscalls.h b/tools/testing/selftests/kvm/include/kvm_syscalls.h
> index 522ffff0462c..2e362fda50af 100644
> --- a/tools/testing/selftests/kvm/include/kvm_syscalls.h
> +++ b/tools/testing/selftests/kvm/include/kvm_syscalls.h
> @@ -82,5 +82,6 @@ __KVM_SYSCALL_DEFINE(munmap, 2, void *, mem, size_t, size);
> __KVM_SYSCALL_DEFINE(close, 1, int, fd);
> __KVM_SYSCALL_DEFINE(fallocate, 4, int, fd, int, mode, loff_t, offset, loff_t, len);
> __KVM_SYSCALL_DEFINE(ftruncate, 2, unsigned int, fd, off_t, length);
> +__KVM_SYSCALL_DEFINE(sched_getaffinity, 3, pid_t, pid, size_t, cpusetsize, cpu_set_t *, mask);

This doesn't compile, needs:

diff --git tools/testing/selftests/kvm/include/kvm_syscalls.h tools/testing/selftests/kvm/include/kvm_syscalls.h
index 3e4cc91d5f87..d796a7228d9d 100644
--- tools/testing/selftests/kvm/include/kvm_syscalls.h
+++ tools/testing/selftests/kvm/include/kvm_syscalls.h
@@ -2,6 +2,8 @@
#ifndef SELFTEST_KVM_SYSCALLS_H
#define SELFTEST_KVM_SYSCALLS_H

+#include <sched.h>
+
#include <sys/syscall.h>

#define MAP_ARGS0(m,...)