linux/tools/testing/selftests
Linus Torvalds 11e8c7e947 ARM:
- Correctly handle deeactivation of interrupts that were activated from
   LRs.  Since EOIcount only denotes deactivation of interrupts that
   are not present in an LR, start EOIcount deactivation walk *after*
   the last irq that made it into an LR.
 
 - Avoid calling into the stubs to probe for ICH_VTR_EL2.TDS when
   pKVM is already enabled -- not only thhis isn't possible (pKVM
   will reject the call), but it is also useless: this can only
   happen for a CPU that has already booted once, and the capability
   will not change.
 
 - Fix a couple of low-severity bugs in our S2 fault handling path,
   affecting the recently introduced LS64 handling and the even more
   esoteric handling of hwpoison in a nested context
 
 - Address yet another syzkaller finding in the vgic initialisation,
   where we would end-up destroying an uninitialised vgic with nasty
   consequences
 
 - Address an annoying case of pKVM failing to boot when some of the
   memblock regions that the host is faulting in are not page-aligned
 
 - Inject some sanity in the NV stage-2 walker by checking the limits
   against the advertised PA size, and correctly report the resulting
   faults
 
 PPC:
 
 - Fix a PPC e500 build error due to a long-standing wart that was exposed by
   the recent conversion to kmalloc_obj(); rip out all the ugliness that
   led to the wart.
 
 RISC-V:
 
 - Prevent speculative out-of-bounds access using array_index_nospec()
   in APLIC interrupt handling, ONE_REG regiser access, AIA CSR access,
   float register access, and PMU counter access
 
 - Fix potential use-after-free issues in kvm_riscv_gstage_get_leaf(),
   kvm_riscv_aia_aplic_has_attr(), and kvm_riscv_aia_imsic_has_attr()
 
 - Fix potential null pointer dereference in kvm_riscv_vcpu_aia_rmw_topei()
 
 - Fix off-by-one array access in SBI PMU
 
 - Skip THP support check during dirty logging
 
 - Fix error code returned for Smstateen and Ssaia ONE_REG interface
 
 - Check host Ssaia extension when creating AIA irqchip
 
 x86:
 
 - Fix cases where CPUID mitigation features were incorrectly marked as
   available whenever the kernel used scattered feature words for them.
 
 - Validate _all_ GVAs, rather than just the first GVA, when processing
   a range of GVAs for Hyper-V's TLB flush hypercalls.
 
 - Fix a brown paper bug in add_atomic_switch_msr().
 
 - Use hlist_for_each_entry_srcu() when traversing mask_notifier_list,
   to fix a lockdep warning; KVM doesn't hold RCU, just irq_srcu.
 
 - Ensure AVIC VMCB fields are initialized if the VM has an in-kernel local
   APIC (and AVIC is enabled at the module level).
 
 - Update CR8 write interception when AVIC is (de)activated, to fix a bug
   where the guest can run in perpetuity with the CR8 intercept enabled.
 
 - Add a quirk to skip the consistency check on FREEZE_IN_SMM, i.e. to allow
   L1 hypervisors to set FREEZE_IN_SMM.  This reverts (by default) an
   unintentional tightening of userspace ABI in 6.17, and provides some
   amount of backwards compatibility with hypervisors who want to freeze
   PMCs on VM-Entry.
 
 - Validate the VMCS/VMCB on return to a nested guest from SMM, because
   either userspace or the guest could stash invalid values in memory
   and trigger the processor's consistency checks.
 
 Generic:
 
 - Remove a subtle pseudo-overlay of kvm_stats_desc, which, aside from being
   unnecessary and confusing, triggered compiler warnings due to
   -Wflex-array-member-not-at-end.
 
 - Document that vcpu->mutex is take outside of kvm->slots_lock and
   kvm->slots_arch_lock, which is intentional and desirable despite being
   rather unintuitive.
 
 Selftests:
 
 - Increase the maximum number of NUMA nodes in the guest_memfd selftest to
   64 (from 8).
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmmy6n8UHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNX7ggAhWoCG+AE6P3yrp6Mi+nRYpeRGC3q
 q2IiZCn0UoCg6q3c2kgn7b/N2zLJs0Q8FZRCEp2Je+2uvptpmdp/BMEfiIU3n2/a
 61z+Dydbpyc+kUmhJzUJ+aotq5FnMNmAAmqSKoc19GhAx2OQhQmBP/JOZ0P/eqLE
 Is0qNBgr/Zms2ib3GFf/JT+urysL2mX47qe92HTzq1T9EEG0KleID0Jz8vYQI8Fr
 I5N9+lTxagQDi8ytwOM85Cn8K7wh+CQIgzmciHcVErpAvAWkrEjrPlQltpEz2C5B
 aWEcRgw46utEaAiwPQGJRW6TeoKUG0pUR3v6T90nBkjjJ1npm6gPVE6TBA==
 =7nQ9
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "Quite a large pull request, partly due to skipping last week and
  therefore having material from ~all submaintainers in this one. About
  a fourth of it is a new selftest, and a couple more changes are large
  in number of files touched (fixing a -Wflex-array-member-not-at-end
  compiler warning) or lines changed (reformatting of a table in the API
  documentation, thanks rST).

  But who am I kidding---it's a lot of commits and there are a lot of
  bugs being fixed here, some of them on the nastier side like the
  RISC-V ones.

  ARM:

   - Correctly handle deactivation of interrupts that were activated
     from LRs. Since EOIcount only denotes deactivation of interrupts
     that are not present in an LR, start EOIcount deactivation walk
     *after* the last irq that made it into an LR

   - Avoid calling into the stubs to probe for ICH_VTR_EL2.TDS when pKVM
     is already enabled -- not only thhis isn't possible (pKVM will
     reject the call), but it is also useless: this can only happen for
     a CPU that has already booted once, and the capability will not
     change

   - Fix a couple of low-severity bugs in our S2 fault handling path,
     affecting the recently introduced LS64 handling and the even more
     esoteric handling of hwpoison in a nested context

   - Address yet another syzkaller finding in the vgic initialisation,
     where we would end-up destroying an uninitialised vgic with nasty
     consequences

   - Address an annoying case of pKVM failing to boot when some of the
     memblock regions that the host is faulting in are not page-aligned

   - Inject some sanity in the NV stage-2 walker by checking the limits
     against the advertised PA size, and correctly report the resulting
     faults

  PPC:

   - Fix a PPC e500 build error due to a long-standing wart that was
     exposed by the recent conversion to kmalloc_obj(); rip out all the
     ugliness that led to the wart

  RISC-V:

   - Prevent speculative out-of-bounds access using array_index_nospec()
     in APLIC interrupt handling, ONE_REG regiser access, AIA CSR
     access, float register access, and PMU counter access

   - Fix potential use-after-free issues in kvm_riscv_gstage_get_leaf(),
     kvm_riscv_aia_aplic_has_attr(), and kvm_riscv_aia_imsic_has_attr()

   - Fix potential null pointer dereference in
     kvm_riscv_vcpu_aia_rmw_topei()

   - Fix off-by-one array access in SBI PMU

   - Skip THP support check during dirty logging

   - Fix error code returned for Smstateen and Ssaia ONE_REG interface

   - Check host Ssaia extension when creating AIA irqchip

  x86:

   - Fix cases where CPUID mitigation features were incorrectly marked
     as available whenever the kernel used scattered feature words for
     them

   - Validate _all_ GVAs, rather than just the first GVA, when
     processing a range of GVAs for Hyper-V's TLB flush hypercalls

   - Fix a brown paper bug in add_atomic_switch_msr()

   - Use hlist_for_each_entry_srcu() when traversing mask_notifier_list,
     to fix a lockdep warning; KVM doesn't hold RCU, just irq_srcu

   - Ensure AVIC VMCB fields are initialized if the VM has an in-kernel
     local APIC (and AVIC is enabled at the module level)

   - Update CR8 write interception when AVIC is (de)activated, to fix a
     bug where the guest can run in perpetuity with the CR8 intercept
     enabled

   - Add a quirk to skip the consistency check on FREEZE_IN_SMM, i.e. to
     allow L1 hypervisors to set FREEZE_IN_SMM. This reverts (by
     default) an unintentional tightening of userspace ABI in 6.17, and
     provides some amount of backwards compatibility with hypervisors
     who want to freeze PMCs on VM-Entry

   - Validate the VMCS/VMCB on return to a nested guest from SMM,
     because either userspace or the guest could stash invalid values in
     memory and trigger the processor's consistency checks

  Generic:

   - Remove a subtle pseudo-overlay of kvm_stats_desc, which, aside from
     being unnecessary and confusing, triggered compiler warnings due to
     -Wflex-array-member-not-at-end

   - Document that vcpu->mutex is take outside of kvm->slots_lock and
     kvm->slots_arch_lock, which is intentional and desirable despite
     being rather unintuitive

  Selftests:

   - Increase the maximum number of NUMA nodes in the guest_memfd
     selftest to 64 (from 8)"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (43 commits)
  KVM: selftests: Verify SEV+ guests can read and write EFER, CR0, CR4, and CR8
  Documentation: kvm: fix formatting of the quirks table
  KVM: x86: clarify leave_smm() return value
  selftests: kvm: add a test that VMX validates controls on RSM
  selftests: kvm: extract common functionality out of smm_test.c
  KVM: SVM: check validity of VMCB controls when returning from SMM
  KVM: VMX: check validity of VMCS controls when returning from SMM
  KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated
  KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with in-kernel APIC
  KVM: x86: Introduce KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM
  KVM: x86: Fix SRCU list traversal in kvm_fire_mask_notifiers()
  KVM: VMX: Fix a wrong MSR update in add_atomic_switch_msr()
  KVM: x86: hyper-v: Validate all GVAs during PV TLB flush
  KVM: x86: synthesize CPUID bits only if CPU capability is set
  KVM: PPC: e500: Rip out "struct tlbe_ref"
  KVM: PPC: e500: Fix build error due to using kmalloc_obj() with wrong type
  KVM: selftests: Increase 'maxnode' for guest_memfd tests
  KVM: arm64: pkvm: Don't reprobe for ICH_VTR_EL2.TDS on CPU hotplug
  KVM: arm64: vgic: Pick EOIcount deactivations from AP-list tail
  KVM: arm64: Remove the redundant ISB in __kvm_at_s1e2()
  ...
2026-03-15 12:22:10 -07:00
..
acct selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
alsa selftests: ALSA: Remove unused variable in utimer-test 2026-01-19 09:12:59 +01:00
amd-pstate
arm64 selftest/arm64: Fix sve2p1_sigill() to hwcap test 2026-03-06 11:54:26 +00:00
bpf bpf-fixes 2026-03-07 12:20:37 -08:00
breakpoints selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cachestat selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
capabilities selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cgroup cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug to workqueue 2026-02-23 10:42:11 -10:00
clone3 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
connector selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
core selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
coredump kselftest/coredump: use __builtin_trap() instead of null pointer 2025-12-31 10:49:57 -07:00
cpu-hotplug
cpufreq
damon selftests/damon/wss_estimation: deduplicate failed samples output 2026-01-31 14:22:45 -08:00
devices
dm-verity selftests: add dm-verity keyring selftests 2026-01-19 15:21:26 +01:00
dmabuf-heaps selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
drivers selftests: team: Add a reference count leak test 2026-02-25 19:17:05 -08:00
dt
efivarfs
exec selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
fchmodat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filelock selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filesystems selftests: fix mntns iteration selftests 2026-02-27 22:00:11 +01:00
firmware
fpu
ftrace selftests/tracing: Fix test_multiple_writes stall 2026-01-09 15:49:32 -07:00
futex Futex changes for v6.19: 2025-12-10 17:21:30 +09:00
gpio
hid selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices 2026-02-24 09:41:21 +01:00
ia64
intel_pstate selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
iommu iommufd/selftest: Make it clearer to gcc that the access is not out of bounds 2025-12-15 20:34:41 -04:00
ipc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
ir selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kcmp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kexec
kho kho: make debugfs interface optional 2025-11-27 14:24:31 -08:00
kmod
kselftest selftests/run_kselftest.sh: exit with error if tests fail 2025-11-19 15:00:22 -07:00
kselftest_harness selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kvm KVM: selftests: Verify SEV+ guests can read and write EFER, CR0, CR4, and CR8 2026-03-12 17:31:53 +01:00
landlock selftests/landlock: Add filesystem access benchmark 2026-02-10 16:46:42 +01:00
lib
livepatch
liveupdate selftests/liveupdate: add kexec test for multiple and empty sessions 2025-11-27 14:24:42 -08:00
lkdtm lkdtm/bugs: Add __counted_by_ptr() test PTR_BOUNDS 2026-01-17 11:00:37 -08:00
locking
lsm selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
media_tests selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
membarrier selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
memfd selftests/memfd: use IPC semaphore instead of SIGSTOP/SIGCONT 2026-02-12 15:45:57 -08:00
memory-hotplug
mincore selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mm mm.git review status for linus..mm-stable 2026-02-18 20:50:32 -08:00
module
mount
mount_setattr selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
move_mount_set_group selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mqueue selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mseal_system_mappings selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
namespaces Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
nci selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
net selftests: rtnetlink: add neighbour update test 2026-03-11 19:04:55 -07:00
nolibc tools/nolibc: Add a simple test for writing to a FILE and reading it back 2026-01-11 12:47:47 +01:00
ntb
openat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pci_endpoint selftests: pci_endpoint: Add BAR subrange mapping test case 2026-01-29 17:42:37 -06:00
pcie_bwctrl
perf_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pid_namespace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pidfd selftests/pidfd: fix typo in comment 2026-01-21 10:56:25 -07:00
power_supply
powerpc powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx 2026-03-12 11:03:48 +05:30
prctl selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
proc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pstore
ptp selftests: ptp: treat unsupported PHC operations as skip 2026-01-27 17:57:28 -08:00
ptrace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rcutorture scftorture: Update due to x86 not supporting none/voluntary preemption 2026-03-05 13:11:10 -08:00
resctrl selftests/resctrl: Fix non-contiguous CBM check for Hygon 2026-01-09 16:49:01 -07:00
ring-buffer selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
riscv selftests: riscv: vstate_exec_nolibc: Use the regular prctl() function 2026-02-09 15:27:33 -07:00
rlimits
rseq selftests/rseq: Add rseq slice histogram script 2026-01-22 11:11:20 +01:00
rtc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rust
safesetid
sched
sched_ext sched_ext/selftests: Fix format specifier and buffer length in file_write_long() 2026-03-04 12:07:43 -10:00
seccomp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sgx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
signal selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
size
sparc64 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
splice
static_keys
sync selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
syscall_user_dispatch selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sysctl
tc-testing selftests/tc-testing: Add tests exercising act_ife metalist replace behaviour 2026-03-05 07:54:09 -08:00
tdx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
thermal/intel thermal: intel: selftests: workload_hint: Support slow workload hints 2026-01-07 21:42:10 +01:00
timens selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
timers Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
tmpfs selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
tpm2 selftests: tpm2: Fix ill defined assertions 2025-12-03 22:55:27 +02:00
tty TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
turbostat
ublk for-7.0/block-20260206 2026-02-09 17:57:21 -08:00
uevent selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
user_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
vDSO * VDSO rework and cleanups 2026-02-10 19:34:26 -08:00
verification selftests/verification: Add initial RV tests 2025-11-11 13:18:55 +01:00
vfio vfio: selftests: only build tests on arm64 and x86_64 2026-02-06 15:08:05 -07:00
vsock selftests/vsock: change tests to respect write-once child ns mode 2026-02-26 11:10:03 +01:00
watchdog
wireguard watchdog: softlockup: panic when lockup duration exceeds N thresholds 2026-01-20 19:44:20 -08:00
x86 selftests/x86: Clean up sysret_rip coding style 2026-01-19 12:06:11 +01:00
zram
.gitignore
Makefile netconsole: selftests: Move netconsole selftests to separate target 2026-01-29 17:30:48 -08:00
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h selftests/harness: order TEST_F and XFAIL_ADD constructors 2026-03-05 07:34:54 -08:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
run_kselftest.sh selftests/run_kselftest.sh: Add `--skip` argument option 2026-01-16 13:46:40 -07:00