linux/tools/testing/selftests
Linus Torvalds a382b06d29 KVM/arm64 fixes for 6.14, take #4
* Fix a couple of bugs affecting pKVM's PSCI relay implementation
   when running in the hVHE mode, resulting in the host being entered
   with the MMU in an unknown state, and EL2 being in the wrong mode.
 
 x86:
 
 * Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow.
 
 * Ensure DEBUGCTL is context switched on AMD to avoid running the guest with
   the host's value, which can lead to unexpected bus lock #DBs.
 
 * Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't properly
   emulate BTF.  KVM's lack of context switching has meant BTF has always been
   broken to some extent.
 
 * Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as the guest
   can enable DebugSwap without KVM's knowledge.
 
 * Fix a bug in mmu_stress_tests where a vCPU could finish the "writes to RO
   memory" phase without actually generating a write-protection fault.
 
 * Fix a printf() goof in the SEV smoke test that causes build failures with
   -Werror.
 
 * Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when PERFMON_V2
   isn't supported by KVM.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmfNSeUUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNKngf/cLgQAT9AF4nFqcwh5b5uucKHVJ8W
 uTiGlWqLAf2UN53L63eZ/7vKQWGQYkOTFvormR14Jam6IYtytsZw1xLBH4fGtUyB
 qVjk0EPzaKGqn3LrgyneQNCXdyxJv7EBVBgoOKH0pvOksoW2E5ZizhhtRFtL7nCE
 Yk8FQKpP0mIBk04RMsvzJVEFKIb4OZgJadWo0gryg1oF2aAv7mxQjyqUWsBDsb3q
 99c0ElSBfV39FeT8xeok4k7S5jbBWii2KiaH72ZsNiBu0rYmEuLwIoygCNNWL9Wu
 FPdQ+r//YrzfCJSXwGPfdUaRaF4p2642S6oiXQuusNNUmhK6/MRo3mZo8A==
 =XQHm
 -----END PGP SIGNATURE-----

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

Pull KVM fixes from Paolo Bonzini:
 "arm64:

   - Fix a couple of bugs affecting pKVM's PSCI relay implementation
     when running in the hVHE mode, resulting in the host being entered
     with the MMU in an unknown state, and EL2 being in the wrong mode

  x86:

   - Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow

   - Ensure DEBUGCTL is context switched on AMD to avoid running the
     guest with the host's value, which can lead to unexpected bus lock
     #DBs

   - Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't
     properly emulate BTF. KVM's lack of context switching has meant BTF
     has always been broken to some extent

   - Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as
     the guest can enable DebugSwap without KVM's knowledge

   - Fix a bug in mmu_stress_tests where a vCPU could finish the "writes
     to RO memory" phase without actually generating a write-protection
     fault

   - Fix a printf() goof in the SEV smoke test that causes build
     failures with -Werror

   - Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when
     PERFMON_V2 isn't supported by KVM"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: Explicitly zero EAX and EBX when PERFMON_V2 isn't supported by KVM
  KVM: selftests: Fix printf() format goof in SEV smoke test
  KVM: selftests: Ensure all vCPUs hit -EFAULT during initial RO stage
  KVM: SVM: Don't rely on DebugSwap to restore host DR0..DR3
  KVM: SVM: Save host DR masks on CPUs with DebugSwap
  KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu()
  KVM: arm64: Initialize HCR_EL2.E2H early
  KVM: x86: Snapshot the host's DEBUGCTL after disabling IRQs
  KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled
  KVM: x86: Snapshot the host's DEBUGCTL in common x86
  KVM: SVM: Suppress DEBUGCTL.BTF on AMD
  KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value
  KVM: selftests: Assert that STI blocking isn't set after event injection
  KVM: SVM: Set RFLAGS.IF=1 in C code, to get VMRUN out of the STI shadow
2025-03-09 09:04:08 -10:00
..
acct selftests: acct: Add ksft_exit_skip if not running as root 2025-01-14 17:06:31 -07:00
alsa selftests/alsa: Fix circular dependency involving global-timer 2024-12-20 10:00:41 +01:00
amd-pstate
arm64 CRC updates for 6.14 2025-01-22 19:55:08 -08:00
bpf perf tools fixes for v6.14: 2nd batch 2025-02-25 13:32:32 -08:00
breakpoints selftests: breakpoints: use remaining time to check if suspend succeed 2024-10-02 14:37:30 -06:00
cachestat
capabilities
cgroup selftests/cgroup: use bash in test_cpuset_v1_hp.sh 2025-02-04 09:36:54 -10:00
clone3 clone3: clone3_cap_checkpoint_restore: remove unused MAX_PID_NS_LEVEL macro 2024-09-30 11:39:56 -06:00
connector
core selftests: core: add unshare_test to gitignore 2024-09-30 11:42:11 -06:00
coredump selftests: coredump: Add stackdump test 2025-01-04 10:12:18 +01:00
cpu-hotplug
cpufreq selftests/cpufreq: gitignore output files and clean them in make clean 2024-12-09 17:51:41 -07:00
damon selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries 2025-03-05 21:36:16 -08:00
devices kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3 2024-10-02 14:30:58 -06:00
dma
dmabuf-heaps
drivers selftests: drv-net: Check if combined-count exists 2025-02-27 07:30:32 -08:00
dt kselftest: dt: Ignore nodes that have ancestors disabled 2024-09-05 07:54:16 -05:00
efivarfs selftests/efivarfs: add concurrent update tests 2025-01-21 16:34:41 +01:00
exec AT_EXECVE_CHECK update for v6.14-rc1 (fix1) 2025-01-31 17:12:31 -08:00
fchmodat2
filelock
filesystems selftests: always check mask returned by statmount(2) 2025-02-07 10:27:26 +01:00
firmware
fpu
ftrace selftests/ftrace: Let fprobe test consider already enabled functions 2025-02-27 21:02:09 -05:00
futex
gpio selftests: gpio: gpio-sim: Fix missing chip disablements 2025-01-23 15:44:48 +01:00
hid perf tools fixes for v6.14: 2nd batch 2025-02-25 13:32:32 -08:00
ia64
intel_pstate selftests/intel_pstate: check if cpupower is installed 2024-10-28 21:18:57 -06:00
iommu iommufd/selftest: Cover IOMMU_FAULT_QUEUE_ALLOC in iommufd_fail_nth 2024-12-03 12:15:00 -04:00
ipc selftests/ipc: Remove unused variables 2025-01-14 17:06:31 -07:00
ir
kcmp
kexec
kmod
kselftest AT_EXECVE_CHECK introduction for v6.14-rc1 2025-01-22 20:34:42 -08:00
kvm KVM: selftests: Fix printf() format goof in SEV smoke test 2025-03-03 07:45:34 -08:00
landlock selftests/landlock: Add binaries to .gitignore 2025-02-14 09:23:11 +01:00
lib selftests: lib: remove strscpy test 2024-08-01 13:55:33 -06:00
livepatch selftests: livepatch: handle PRINTK_CALLER in check_result() 2025-01-27 11:41:28 +01:00
lkdtm
locking
lsm selftests: refactor the lsm `flags_overset_lsm_set_self_attr` test 2024-12-18 18:14:29 -05:00
media_tests selftest: media_tests: fix trivial UAF typo 2025-01-14 17:06:31 -07:00
membarrier
memfd selftests/memfd/memfd_test: fix possible NULL pointer dereference 2025-01-25 20:22:44 -08:00
memory-hotplug
mincore
mm Revert "selftests/mm: remove local __NR_* definitions" 2025-03-05 21:36:12 -08:00
module selftests: find_symbol: Actually use load_mod() parameter 2024-11-28 11:17:38 -08:00
mount
mount_setattr selftests/mount_setattr: Fix failures on 64K PAGE_SIZE kernels 2024-11-20 09:18:48 +01:00
move_mount_set_group
mqueue
nci
net selftests: drv-net: test XDP, HDS auto and the ioctl path 2025-02-24 14:16:37 -08:00
nolibc selftests/nolibc: add configurations for riscv32 2025-01-13 22:21:34 +01:00
ntb
openat2
pci_endpoint selftests: pci_endpoint: Migrate to Kselftest framework 2025-01-21 14:17:55 -06:00
pcie_bwctrl selftests/pcie_bwctrl: Create selftests 2024-11-16 10:09:30 -06:00
perf_events
pid_namespace tests/pid_namespace: add pid_max tests 2024-12-02 11:25:25 +01:00
pidfd Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
power_supply
powerpc selftests/powerpc: Fix argument order to timer_sub() 2025-01-11 10:39:45 +05:30
prctl
proc
pstore
ptp selftest/ptp: update ptp selftest to exercise the gettimex options 2024-10-04 15:36:43 -07:00
ptrace
rcutorture Merge branches 'fixes.2024.12.14a', 'rcutorture.2024.12.14a', 'srcu.2024.12.14a' and 'torture-test.2024.12.14a' into rcu-merge.2024.12.14a 2024-12-14 17:32:26 +01:00
resctrl selftests/resctrl: Discover SNC kernel support and adjust messages 2025-01-14 17:06:32 -07:00
ring-buffer selftests/ring-buffer: Add test for out-of-bound pgoff mapping 2025-01-14 17:06:32 -07:00
riscv RISC-V Patches for the 6.14 Merge Window, Part 1 2025-01-31 15:13:25 -08:00
rlimits
rseq rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm 2025-02-14 13:06:36 -08:00
rtc selftest: rtc: Add to check rtc alarm status for alarm related test 2024-10-23 14:13:00 -06:00
rust selftests: rust: config: disable GCC_PLUGINS 2024-08-11 17:32:55 -06:00
safesetid
sched
sched_ext sched_ext: selftests: Fix grammar in tests description 2025-02-13 06:46:22 -10:00
seccomp selftests/seccomp: validate uretprobe syscall passes through seccomp 2025-02-06 13:19:14 -08:00
sgx
signal selftests: Add a test mangling with uc_sigmask 2024-10-29 01:01:49 -06:00
size
sparc64
splice
static_keys
sync
syscall_user_dispatch
sysctl
tc-testing selftests/tc-testing: Add a test case for qdisc_tree_reduce_backlog() 2025-02-05 18:15:00 -08:00
tdx
thermal/intel
timens
timers selftests: timers: clocksource-switch: Adapt progress to kselftest framework 2025-01-14 17:06:31 -07:00
tmpfs selftests: tmpfs: Add kselftest support to tmpfs 2025-01-14 17:06:32 -07:00
tpm2 selftests: tpm2: test_smoke: Run only when TPM2 is avaialable. 2024-09-17 18:56:37 +03:00
tty
turbostat
uevent
user_events
vDSO selftests/vDSO: Fix GNU hash table entry size for s390x 2025-03-04 17:15:18 +01:00
watchdog selftests/watchdog-test: Fix system accidentally reset after watchdog-test 2024-10-28 21:34:43 -06:00
wireguard Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
x86 x86/mm/selftests: Fix typo in lam.c 2024-12-06 20:04:32 +01:00
zram selftests/zram: gitignore output file 2025-01-14 17:06:31 -07:00
.gitignore
Makefile Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
gen_kselftest_tar.sh
kselftest.h selftests: kselftest: Fix the wrong format specifier 2025-01-14 17:06:31 -07:00
kselftest_deps.sh
kselftest_harness.h selftests: harness: fix printing of mismatch values in __EXPECT() 2025-01-14 17:06:32 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk
run_kselftest.sh selftests/run_kselftest.sh: Fix help string for --per-test-log 2025-01-14 17:06:32 -07:00