Re: [PATCH v3 00/16] KVM: selftests: Link with VFIO selftests lib and test device interrupts
From: Sean Christopherson
Date: Tue May 26 2026 - 21:51:06 EST
On Tue, Apr 21, 2026, Josh Hilke wrote:
> v3:
> - Split monolithic test patch into smaller, logical patches (Sean).
Needs to go farther. E.g. "KVM: selftests: Verify vCPU migration during IRQ delivery"
should be ~4 patches:
1. Add gettid() wrapper (because what you proposed doesn't compile for me).
2. Add sched_getaffinity() wrapper *AND* convert existing users.
3. Add pin_task_to_random_cpu()
4. Implement IRQ bypass vCPU migration
Maybe combine #3 and #4? Adding helpers/APIs without users isn't ideal, but
pin_task_to_random_cpu() is interesting enough that I think it's worth isolating
in this case.
> David Matlack (13):
> KVM: selftests: Build and link sefltests/vfio/lib into KVM selftests
> KVM: selftests: Add /proc/interrupts parsing helpers
> KVM: selftests: Add guest read/write macros
> KVM: selftests: Add IRQ injection test
> KVM: selftests: Verify device IRQs are routed to vCPUs
> KVM: selftests: Verify IRQ affinity changes
> KVM: selftests: Verify IRQs wake up halted vCPUs
> KVM: selftests: Verify dynamic IRQ routing updates
> KVM: selftests: Configure number of IRQs
> KVM: selftests: Verify non-postable IRQ remapping
> KVM: selftests: Verify vCPU migration during IRQ delivery
> KVM: selftests: Configure number of vCPUs
> KVM: selftests: Add xAPIC support
All of these shortlogs need more context. E.g. "Add xAPIC support" suggests the
patch adds xAPIC support to _all_ of selftests. We generally discourage trying
to set the scope to a specific test, because it inevitably falls apart, but it's
easy enough to "manually" call out the relevant test.
KVM: selftests: Add xAPIC support to the IRQ bypass test
> Josh Hilke (3):
> KVM: selftests: Rename guest_rng to kvm_rng
> KVM: selftests: Add helper to generate random u64 in range [min,max]
> KVM: selftests: Print vCPU affinity on timeout
>
> tools/testing/selftests/kvm/Makefile.kvm | 7 +-
> .../selftests/kvm/dirty_log_perf_test.c | 4 +-
> tools/testing/selftests/kvm/dirty_log_test.c | 8 +-
> .../selftests/kvm/include/kvm_syscalls.h | 6 +
> .../testing/selftests/kvm/include/kvm_util.h | 13 +
> .../testing/selftests/kvm/include/proc_util.h | 28 ++
> .../testing/selftests/kvm/include/test_util.h | 26 +-
> .../selftests/kvm/include/x86/kvm_util_arch.h | 4 +-
> tools/testing/selftests/kvm/irq_test.c | 367 ++++++++++++++++++
> tools/testing/selftests/kvm/lib/kvm_util.c | 88 ++++-
> tools/testing/selftests/kvm/lib/memstress.c | 8 +-
> tools/testing/selftests/kvm/lib/proc_util.c | 62 +++
> tools/testing/selftests/kvm/lib/test_util.c | 22 +-
> tools/testing/selftests/kvm/mmu_stress_test.c | 9 +-
> tools/testing/selftests/kvm/steal_time.c | 21 +-
> 15 files changed, 615 insertions(+), 58 deletions(-)
> create mode 100644 tools/testing/selftests/kvm/include/proc_util.h
> create mode 100644 tools/testing/selftests/kvm/irq_test.c
> create mode 100644 tools/testing/selftests/kvm/lib/proc_util.c
>
> --
> 2.54.0.rc2.533.g4f5dca5207-goog
>