MAINTAINERS | 12 +-
arch/arm64/include/uapi/asm/kvm.h | 3 -
arch/riscv/include/uapi/asm/kvm.h | 3 -
include/uapi/linux/kvm.h | 4 +
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 345 +-----------------
tools/testing/selftests/kvm/Makefile.kvm | 330 +++++++++++++++++
.../kvm/{aarch64 => arm64}/aarch32_id_regs.c | 10 +-
.../kvm/{aarch64 => arm64}/arch_timer.c | 0
.../arch_timer_edge_cases.c | 0
.../kvm/{aarch64 => arm64}/debug-exceptions.c | 4 +-
.../kvm/{aarch64 => arm64}/get-reg-list.c | 0
.../kvm/{aarch64 => arm64}/hypercalls.c | 6 +-
.../kvm/{aarch64 => arm64}/mmio_abort.c | 0
.../kvm/{aarch64 => arm64}/no-vgic-v3.c | 2 +-
.../kvm/{aarch64 => arm64}/page_fault_test.c | 0
.../kvm/{aarch64 => arm64}/psci_test.c | 6 +-
.../kvm/{aarch64 => arm64}/set_id_regs.c | 18 +-
.../kvm/{aarch64 => arm64}/smccc_filter.c | 0
.../{aarch64 => arm64}/vcpu_width_config.c | 0
.../kvm/{aarch64 => arm64}/vgic_init.c | 0
.../kvm/{aarch64 => arm64}/vgic_irq.c | 0
.../kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0
.../{aarch64 => arm64}/vpmu_counter_access.c | 19 +-
.../selftests/kvm/dirty_log_perf_test.c | 2 +-
.../include/{aarch64 => arm64}/arch_timer.h | 0
.../kvm/include/{aarch64 => arm64}/delay.h | 0
.../kvm/include/{aarch64 => arm64}/gic.h | 0
.../kvm/include/{aarch64 => arm64}/gic_v3.h | 0
.../include/{aarch64 => arm64}/gic_v3_its.h | 0
.../{aarch64 => arm64}/kvm_util_arch.h | 0
.../include/{aarch64 => arm64}/processor.h | 0
.../kvm/include/{aarch64 => arm64}/spinlock.h | 0
.../kvm/include/{aarch64 => arm64}/ucall.h | 0
.../kvm/include/{aarch64 => arm64}/vgic.h | 0
.../testing/selftests/kvm/include/kvm_util.h | 10 +-
.../kvm/include/{s390x => s390}/debug_print.h | 0
.../{s390x => s390}/diag318_test_handler.h | 0
.../kvm/include/{s390x => s390}/facility.h | 0
.../include/{s390x => s390}/kvm_util_arch.h | 0
.../kvm/include/{s390x => s390}/processor.h | 0
.../kvm/include/{s390x => s390}/sie.h | 0
.../kvm/include/{s390x => s390}/ucall.h | 0
.../kvm/include/{x86_64 => x86}/apic.h | 2 -
.../kvm/include/{x86_64 => x86}/evmcs.h | 3 -
.../kvm/include/{x86_64 => x86}/hyperv.h | 3 -
.../include/{x86_64 => x86}/kvm_util_arch.h | 0
.../kvm/include/{x86_64 => x86}/mce.h | 2 -
.../kvm/include/{x86_64 => x86}/pmu.h | 0
.../kvm/include/{x86_64 => x86}/processor.h | 2 -
.../kvm/include/{x86_64 => x86}/sev.h | 0
.../kvm/include/{x86_64 => x86}/svm.h | 6 -
.../kvm/include/{x86_64 => x86}/svm_util.h | 3 -
.../kvm/include/{x86_64 => x86}/ucall.h | 0
.../kvm/include/{x86_64 => x86}/vmx.h | 2 -
.../kvm/lib/{aarch64 => arm64}/gic.c | 0
.../kvm/lib/{aarch64 => arm64}/gic_private.h | 0
.../kvm/lib/{aarch64 => arm64}/gic_v3.c | 0
.../kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0
.../kvm/lib/{aarch64 => arm64}/handlers.S | 0
.../kvm/lib/{aarch64 => arm64}/processor.c | 8 +-
.../kvm/lib/{aarch64 => arm64}/spinlock.c | 0
.../kvm/lib/{aarch64 => arm64}/ucall.c | 0
.../kvm/lib/{aarch64 => arm64}/vgic.c | 0
tools/testing/selftests/kvm/lib/kvm_util.c | 3 +-
.../selftests/kvm/lib/riscv/processor.c | 66 ++--
.../{s390x => s390}/diag318_test_handler.c | 0
.../kvm/lib/{s390x => s390}/facility.c | 0
.../kvm/lib/{s390x => s390}/processor.c | 0
.../selftests/kvm/lib/{s390x => s390}/ucall.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/apic.c | 0
.../kvm/lib/{x86_64 => x86}/handlers.S | 0
.../kvm/lib/{x86_64 => x86}/hyperv.c | 0
.../kvm/lib/{x86_64 => x86}/memstress.c | 2 +-
.../selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0
.../kvm/lib/{x86_64 => x86}/processor.c | 2 -
.../selftests/kvm/lib/{x86_64 => x86}/sev.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 -
.../selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 -
..._guest_memory_test.c => mmu_stress_test.c} | 162 +++++++-
.../testing/selftests/kvm/riscv/arch_timer.c | 2 +-
.../testing/selftests/kvm/riscv/ebreak_test.c | 2 +-
.../selftests/kvm/riscv/sbi_pmu_test.c | 2 +-
.../selftests/kvm/{s390x => s390}/cmma_test.c | 0
.../selftests/kvm/{s390x => s390}/config | 0
.../{s390x => s390}/cpumodel_subfuncs_test.c | 0
.../kvm/{s390x => s390}/debug_test.c | 0
.../selftests/kvm/{s390x => s390}/memop.c | 0
.../selftests/kvm/{s390x => s390}/resets.c | 2 +-
.../{s390x => s390}/shared_zeropage_test.c | 0
.../kvm/{s390x => s390}/sync_regs_test.c | 0
.../selftests/kvm/{s390x => s390}/tprot.c | 0
.../kvm/{s390x => s390}/ucontrol_test.c | 0
.../selftests/kvm/set_memory_region_test.c | 6 +-
tools/testing/selftests/kvm/steal_time.c | 3 +-
.../selftests/kvm/{x86_64 => x86}/amx_test.c | 0
.../kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0
.../kvm/{x86_64 => x86}/cpuid_test.c | 0
.../kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0
.../kvm/{x86_64 => x86}/debug_regs.c | 0
.../dirty_log_page_splitting_test.c | 0
.../exit_on_emulation_failure_test.c | 0
.../kvm/{x86_64 => x86}/feature_msrs_test.c | 0
.../kvm/{x86_64 => x86}/fix_hypercall_test.c | 0
.../kvm/{x86_64 => x86}/flds_emulation.h | 0
.../kvm/{x86_64 => x86}/hwcr_msr_test.c | 0
.../kvm/{x86_64 => x86}/hyperv_clock.c | 0
.../kvm/{x86_64 => x86}/hyperv_cpuid.c | 0
.../kvm/{x86_64 => x86}/hyperv_evmcs.c | 0
.../hyperv_extended_hypercalls.c | 0
.../kvm/{x86_64 => x86}/hyperv_features.c | 0
.../kvm/{x86_64 => x86}/hyperv_ipi.c | 0
.../kvm/{x86_64 => x86}/hyperv_svm_test.c | 0
.../kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0
.../kvm/{x86_64 => x86}/kvm_clock_test.c | 0
.../kvm/{x86_64 => x86}/kvm_pv_test.c | 0
.../kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0
.../kvm/{x86_64 => x86}/monitor_mwait_test.c | 0
.../{x86_64 => x86}/nested_exceptions_test.c | 0
.../kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0
.../kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0
.../kvm/{x86_64 => x86}/platform_info_test.c | 0
.../kvm/{x86_64 => x86}/pmu_counters_test.c | 0
.../{x86_64 => x86}/pmu_event_filter_test.c | 0
.../private_mem_conversions_test.c | 0
.../private_mem_kvm_exits_test.c | 0
.../{x86_64 => x86}/recalc_apic_map_test.c | 0
.../kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0
.../kvm/{x86_64 => x86}/set_sregs_test.c | 0
.../kvm/{x86_64 => x86}/sev_init2_tests.c | 0
.../kvm/{x86_64 => x86}/sev_migrate_tests.c | 0
.../kvm/{x86_64 => x86}/sev_smoke_test.c | 0
.../smaller_maxphyaddr_emulation_test.c | 0
.../selftests/kvm/{x86_64 => x86}/smm_test.c | 0
.../kvm/{x86_64 => x86}/state_test.c | 0
.../kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0
.../svm_nested_shutdown_test.c | 0
.../svm_nested_soft_inject_test.c | 0
.../kvm/{x86_64 => x86}/svm_vmcall_test.c | 0
.../kvm/{x86_64 => x86}/sync_regs_test.c | 0
.../{x86_64 => x86}/triple_fault_event_test.c | 0
.../kvm/{x86_64 => x86}/tsc_msrs_test.c | 0
.../kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0
.../kvm/{x86_64 => x86}/ucna_injection_test.c | 0
.../kvm/{x86_64 => x86}/userspace_io_test.c | 0
.../{x86_64 => x86}/userspace_msr_exit_test.c | 0
.../{x86_64 => x86}/vmx_apic_access_test.c | 0
.../vmx_close_while_nested_test.c | 0
.../kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0
.../vmx_exception_with_invalid_guest_state.c | 0
.../vmx_invalid_nested_guest_state.c | 0
.../kvm/{x86_64 => x86}/vmx_msrs_test.c | 0
.../vmx_nested_tsc_scaling_test.c | 0
.../kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0
.../vmx_preemption_timer_test.c | 0
.../vmx_set_nested_state_test.c | 0
.../kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0
.../kvm/{x86_64 => x86}/xapic_ipi_test.c | 0
.../kvm/{x86_64 => x86}/xapic_state_test.c | 0
.../kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0
.../kvm/{x86_64 => x86}/xen_shinfo_test.c | 0
.../kvm/{x86_64 => x86}/xen_vmcall_test.c | 0
.../kvm/{x86_64 => x86}/xss_msr_test.c | 0
164 files changed, 584 insertions(+), 477 deletions(-)
create mode 100644 tools/testing/selftests/kvm/Makefile.kvm
rename tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c (95%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c (99%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c (97%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/facility.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/sie.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h (99%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c (98%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c (98%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c (99%)
rename tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} (60%)
rename tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/config (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/debug_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/memop.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/resets.c (99%)
rename tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/tprot.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c (100%)
Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to
avoid unpleasant conflicts, and because I hope to land both in kvm/next
shortly after 6.12-rc1 since they impact all of KVM selftests.
mmu_stress_test
---------------
Convert the max_guest_memory_test into a more generic mmu_stress_test.
The basic gist of the "conversion" is to have the test do mprotect() on
guest memory while vCPUs are accessing said memory, e.g. to verify KVM
and mmu_notifiers are working as intended.
The original plan was that patch 3 would be a single patch, but things
snowballed in order to rework vcpu_get_reg() to return a value instead
of using an out-param. Having to define a variable just to bump the
program counter on arm64 annoyed me.
$ARCH
-----
Play nice with treewrite builds of unsupported architectures, e.g. arm
(32-bit), as KVM selftests' Makefile doesn't do anything to ensure the
target architecture is actually one KVM selftests supports.
The last two patches are opportunistic changes (since the above Makefile
change will generate conflicts everywhere) to switch to using $(ARCH)
instead of the target triple for arch specific directories, e.g. arm64
instead of aarch64, mainly so as not to be different from the rest of
the kernel.
Compile tested on all architectures, runtime tested on x86 and arm64.
v4:
- Rebase and squash the series.
- Exclude Makefile.kvm from .gitignore. [kernel test bot]
v3 (of mmu_stress_test):
- Rebased onto v6.12-rc2.
- Disable strict aliasing to fix the PMCR snafu.
- Collect reviews. [Drew]
- Minor changelog fixes. [Drew]
- Include ucall_common.h to prep for RISC-V. [Drew]
v2:
- Rebase onto kvm/next.
- Add the aforementioned vcpu_get_reg() changes/disaster.
- Actually add arm64 support for the fancy mprotect() testcase (I did this
before v1, but managed to forget to include the changes when posting).
- Emit "mov %rax, (%rax)" on x86. [James]
- Add a comment to explain the fancy mprotect() vs. vCPUs logic.
- Drop the KVM x86 patches (applied and/or will be handled separately).
v1: https://lore.kernel.org/all/20240809194335.1726916-1-seanjc@google.com
[1] https://lore.kernel.org/all/20241009154953.1073471-1-seanjc@google.com
[2] https://lore.kernel.org/all/20240826190116.145945-1-seanjc@google.com
Sean Christopherson (16):
KVM: Move KVM_REG_SIZE() definition to common uAPI header
KVM: selftests: Return a value from vcpu_get_reg() instead of using an
out-param
KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
KVM: selftests: Check for a potential unhandled exception iff KVM_RUN
succeeded
KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
KVM: selftests: Compute number of extra pages needed in
mmu_stress_test
KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
KVM: selftests: Enable mmu_stress_test on arm64
KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
KVM: selftests: Precisely limit the number of guest loops in
mmu_stress_test
KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
KVM: selftests: Provide empty 'all' and 'clean' targets for
unsupported ARCHs
KVM: selftests: Use canonical $(ARCH) paths for KVM selftests
directories
KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
MAINTAINERS | 12 +-
arch/arm64/include/uapi/asm/kvm.h | 3 -
arch/riscv/include/uapi/asm/kvm.h | 3 -
include/uapi/linux/kvm.h | 4 +
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 345 +-----------------
tools/testing/selftests/kvm/Makefile.kvm | 330 +++++++++++++++++
.../kvm/{aarch64 => arm64}/aarch32_id_regs.c | 10 +-
.../kvm/{aarch64 => arm64}/arch_timer.c | 0
.../arch_timer_edge_cases.c | 0
.../kvm/{aarch64 => arm64}/debug-exceptions.c | 4 +-
.../kvm/{aarch64 => arm64}/get-reg-list.c | 0
.../kvm/{aarch64 => arm64}/hypercalls.c | 6 +-
.../kvm/{aarch64 => arm64}/mmio_abort.c | 0
.../kvm/{aarch64 => arm64}/no-vgic-v3.c | 2 +-
.../kvm/{aarch64 => arm64}/page_fault_test.c | 0
.../kvm/{aarch64 => arm64}/psci_test.c | 6 +-
.../kvm/{aarch64 => arm64}/set_id_regs.c | 18 +-
.../kvm/{aarch64 => arm64}/smccc_filter.c | 0
.../{aarch64 => arm64}/vcpu_width_config.c | 0
.../kvm/{aarch64 => arm64}/vgic_init.c | 0
.../kvm/{aarch64 => arm64}/vgic_irq.c | 0
.../kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0
.../{aarch64 => arm64}/vpmu_counter_access.c | 19 +-
.../selftests/kvm/dirty_log_perf_test.c | 2 +-
.../include/{aarch64 => arm64}/arch_timer.h | 0
.../kvm/include/{aarch64 => arm64}/delay.h | 0
.../kvm/include/{aarch64 => arm64}/gic.h | 0
.../kvm/include/{aarch64 => arm64}/gic_v3.h | 0
.../include/{aarch64 => arm64}/gic_v3_its.h | 0
.../{aarch64 => arm64}/kvm_util_arch.h | 0
.../include/{aarch64 => arm64}/processor.h | 0
.../kvm/include/{aarch64 => arm64}/spinlock.h | 0
.../kvm/include/{aarch64 => arm64}/ucall.h | 0
.../kvm/include/{aarch64 => arm64}/vgic.h | 0
.../testing/selftests/kvm/include/kvm_util.h | 10 +-
.../kvm/include/{s390x => s390}/debug_print.h | 0
.../{s390x => s390}/diag318_test_handler.h | 0
.../kvm/include/{s390x => s390}/facility.h | 0
.../include/{s390x => s390}/kvm_util_arch.h | 0
.../kvm/include/{s390x => s390}/processor.h | 0
.../kvm/include/{s390x => s390}/sie.h | 0
.../kvm/include/{s390x => s390}/ucall.h | 0
.../kvm/include/{x86_64 => x86}/apic.h | 2 -
.../kvm/include/{x86_64 => x86}/evmcs.h | 3 -
.../kvm/include/{x86_64 => x86}/hyperv.h | 3 -
.../include/{x86_64 => x86}/kvm_util_arch.h | 0
.../kvm/include/{x86_64 => x86}/mce.h | 2 -
.../kvm/include/{x86_64 => x86}/pmu.h | 0
.../kvm/include/{x86_64 => x86}/processor.h | 2 -
.../kvm/include/{x86_64 => x86}/sev.h | 0
.../kvm/include/{x86_64 => x86}/svm.h | 6 -
.../kvm/include/{x86_64 => x86}/svm_util.h | 3 -
.../kvm/include/{x86_64 => x86}/ucall.h | 0
.../kvm/include/{x86_64 => x86}/vmx.h | 2 -
.../kvm/lib/{aarch64 => arm64}/gic.c | 0
.../kvm/lib/{aarch64 => arm64}/gic_private.h | 0
.../kvm/lib/{aarch64 => arm64}/gic_v3.c | 0
.../kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0
.../kvm/lib/{aarch64 => arm64}/handlers.S | 0
.../kvm/lib/{aarch64 => arm64}/processor.c | 8 +-
.../kvm/lib/{aarch64 => arm64}/spinlock.c | 0
.../kvm/lib/{aarch64 => arm64}/ucall.c | 0
.../kvm/lib/{aarch64 => arm64}/vgic.c | 0
tools/testing/selftests/kvm/lib/kvm_util.c | 3 +-
.../selftests/kvm/lib/riscv/processor.c | 66 ++--
.../{s390x => s390}/diag318_test_handler.c | 0
.../kvm/lib/{s390x => s390}/facility.c | 0
.../kvm/lib/{s390x => s390}/processor.c | 0
.../selftests/kvm/lib/{s390x => s390}/ucall.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/apic.c | 0
.../kvm/lib/{x86_64 => x86}/handlers.S | 0
.../kvm/lib/{x86_64 => x86}/hyperv.c | 0
.../kvm/lib/{x86_64 => x86}/memstress.c | 2 +-
.../selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0
.../kvm/lib/{x86_64 => x86}/processor.c | 2 -
.../selftests/kvm/lib/{x86_64 => x86}/sev.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 -
.../selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0
.../selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 -
..._guest_memory_test.c => mmu_stress_test.c} | 162 +++++++-
.../testing/selftests/kvm/riscv/arch_timer.c | 2 +-
.../testing/selftests/kvm/riscv/ebreak_test.c | 2 +-
.../selftests/kvm/riscv/sbi_pmu_test.c | 2 +-
.../selftests/kvm/{s390x => s390}/cmma_test.c | 0
.../selftests/kvm/{s390x => s390}/config | 0
.../{s390x => s390}/cpumodel_subfuncs_test.c | 0
.../kvm/{s390x => s390}/debug_test.c | 0
.../selftests/kvm/{s390x => s390}/memop.c | 0
.../selftests/kvm/{s390x => s390}/resets.c | 2 +-
.../{s390x => s390}/shared_zeropage_test.c | 0
.../kvm/{s390x => s390}/sync_regs_test.c | 0
.../selftests/kvm/{s390x => s390}/tprot.c | 0
.../kvm/{s390x => s390}/ucontrol_test.c | 0
.../selftests/kvm/set_memory_region_test.c | 6 +-
tools/testing/selftests/kvm/steal_time.c | 3 +-
.../selftests/kvm/{x86_64 => x86}/amx_test.c | 0
.../kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0
.../kvm/{x86_64 => x86}/cpuid_test.c | 0
.../kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0
.../kvm/{x86_64 => x86}/debug_regs.c | 0
.../dirty_log_page_splitting_test.c | 0
.../exit_on_emulation_failure_test.c | 0
.../kvm/{x86_64 => x86}/feature_msrs_test.c | 0
.../kvm/{x86_64 => x86}/fix_hypercall_test.c | 0
.../kvm/{x86_64 => x86}/flds_emulation.h | 0
.../kvm/{x86_64 => x86}/hwcr_msr_test.c | 0
.../kvm/{x86_64 => x86}/hyperv_clock.c | 0
.../kvm/{x86_64 => x86}/hyperv_cpuid.c | 0
.../kvm/{x86_64 => x86}/hyperv_evmcs.c | 0
.../hyperv_extended_hypercalls.c | 0
.../kvm/{x86_64 => x86}/hyperv_features.c | 0
.../kvm/{x86_64 => x86}/hyperv_ipi.c | 0
.../kvm/{x86_64 => x86}/hyperv_svm_test.c | 0
.../kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0
.../kvm/{x86_64 => x86}/kvm_clock_test.c | 0
.../kvm/{x86_64 => x86}/kvm_pv_test.c | 0
.../kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0
.../kvm/{x86_64 => x86}/monitor_mwait_test.c | 0
.../{x86_64 => x86}/nested_exceptions_test.c | 0
.../kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0
.../kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0
.../kvm/{x86_64 => x86}/platform_info_test.c | 0
.../kvm/{x86_64 => x86}/pmu_counters_test.c | 0
.../{x86_64 => x86}/pmu_event_filter_test.c | 0
.../private_mem_conversions_test.c | 0
.../private_mem_kvm_exits_test.c | 0
.../{x86_64 => x86}/recalc_apic_map_test.c | 0
.../kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0
.../kvm/{x86_64 => x86}/set_sregs_test.c | 0
.../kvm/{x86_64 => x86}/sev_init2_tests.c | 0
.../kvm/{x86_64 => x86}/sev_migrate_tests.c | 0
.../kvm/{x86_64 => x86}/sev_smoke_test.c | 0
.../smaller_maxphyaddr_emulation_test.c | 0
.../selftests/kvm/{x86_64 => x86}/smm_test.c | 0
.../kvm/{x86_64 => x86}/state_test.c | 0
.../kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0
.../svm_nested_shutdown_test.c | 0
.../svm_nested_soft_inject_test.c | 0
.../kvm/{x86_64 => x86}/svm_vmcall_test.c | 0
.../kvm/{x86_64 => x86}/sync_regs_test.c | 0
.../{x86_64 => x86}/triple_fault_event_test.c | 0
.../kvm/{x86_64 => x86}/tsc_msrs_test.c | 0
.../kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0
.../kvm/{x86_64 => x86}/ucna_injection_test.c | 0
.../kvm/{x86_64 => x86}/userspace_io_test.c | 0
.../{x86_64 => x86}/userspace_msr_exit_test.c | 0
.../{x86_64 => x86}/vmx_apic_access_test.c | 0
.../vmx_close_while_nested_test.c | 0
.../kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0
.../vmx_exception_with_invalid_guest_state.c | 0
.../vmx_invalid_nested_guest_state.c | 0
.../kvm/{x86_64 => x86}/vmx_msrs_test.c | 0
.../vmx_nested_tsc_scaling_test.c | 0
.../kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0
.../vmx_preemption_timer_test.c | 0
.../vmx_set_nested_state_test.c | 0
.../kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0
.../kvm/{x86_64 => x86}/xapic_ipi_test.c | 0
.../kvm/{x86_64 => x86}/xapic_state_test.c | 0
.../kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0
.../kvm/{x86_64 => x86}/xen_shinfo_test.c | 0
.../kvm/{x86_64 => x86}/xen_vmcall_test.c | 0
.../kvm/{x86_64 => x86}/xss_msr_test.c | 0
164 files changed, 584 insertions(+), 477 deletions(-)
create mode 100644 tools/testing/selftests/kvm/Makefile.kvm
rename tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c (95%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c (99%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c (97%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/facility.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/sie.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h (99%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c (98%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c (98%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c (99%)
rename tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} (60%)
rename tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/config (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/debug_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/memop.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/resets.c (99%)
rename tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/tprot.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c (100%)
base-commit: 4d911c7abee56771b0219a9fbf0120d06bdc9c14
--
2.47.0.338.g60cca15819-goog
On Wed, 27 Nov 2024 16:55:31 -0800, Sean Christopherson wrote:
> Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to
> avoid unpleasant conflicts, and because I hope to land both in kvm/next
> shortly after 6.12-rc1 since they impact all of KVM selftests.
>
> mmu_stress_test
> ---------------
> Convert the max_guest_memory_test into a more generic mmu_stress_test.
> The basic gist of the "conversion" is to have the test do mprotect() on
> guest memory while vCPUs are accessing said memory, e.g. to verify KVM
> and mmu_notifiers are working as intended.
>
> [...]
As I am running out of time before I disappear for two weeks, applied to:
https://github.com/kvm-x86/linux.git selftests_arch
Other KVM maintainers, that branch is officially immutable. I also pushed a tag,
kvm-selftests-arch-6.14, just in case I pull a stupid and manage to clobber the
branch. My apologies if this causes pain. AFAICT, there aren't any queued or
in-flight patches that git's rename magic can't automatically handle, so hopefully
this ends up being pain-free.
Paolo, here's a pull request if you want to pull this into kvm/next long before
the 6.14 merge window. Diff stats at the very bottom (hilariously long).
---
The following changes since commit 3522c419758ee8dca5a0e8753ee0070a22157bc1:
Merge tag 'kvm-riscv-fixes-6.13-1' of https://github.com/kvm-riscv/linux into HEAD (2024-12-13 13:59:20 -0500)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-selftests-arch-6.14
for you to fetch changes up to d76fe926b6c443f912bbb14bbcd42a8b9e5d68f6:
KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR (2024-12-17 08:49:49 -0800)
----------------------------------------------------------------
KVM selftests "tree"-wide changes for 6.14:
- Rework vcpu_get_reg() to return a value instead of using an out-param, and
update all affected arch code accordingly.
- Convert the max_guest_memory_test into a more generic mmu_stress_test.
The basic gist of the "conversion" is to have the test do mprotect() on
guest memory while vCPUs are accessing said memory, e.g. to verify KVM
and mmu_notifiers are working as intended.
- Play nice with treewrite builds of unsupported architectures, e.g. arm
(32-bit), as KVM selftests' Makefile doesn't do anything to ensure the
target architecture is actually one KVM selftests supports.
- Use the kernel's $(ARCH) definition instead of the target triple for arch
specific directories, e.g. arm64 instead of aarch64, mainly so as not to
be different from the rest of the kernel.
----------------------------------------------------------------
Sean Christopherson (16):
KVM: Move KVM_REG_SIZE() definition to common uAPI header
KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
KVM: selftests: Compute number of extra pages needed in mmu_stress_test
KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
KVM: selftests: Enable mmu_stress_test on arm64
KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
---
[01/16] KVM: Move KVM_REG_SIZE() definition to common uAPI header
https://github.com/kvm-x86/linux/commit/915d2f0718a4
[02/16] KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
https://github.com/kvm-x86/linux/commit/411e22037f8c
[03/16] KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
https://github.com/kvm-x86/linux/commit/446d7f483be3
[04/16] KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
https://github.com/kvm-x86/linux/commit/f3c4e02e4da2
[05/16] KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
https://github.com/kvm-x86/linux/commit/356ebe558f55
[06/16] KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
https://github.com/kvm-x86/linux/commit/66d612d32fe3
[07/16] KVM: selftests: Compute number of extra pages needed in mmu_stress_test
https://github.com/kvm-x86/linux/commit/f1e0b743b12e
[08/16] KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
https://github.com/kvm-x86/linux/commit/0ce51ad9d565
[09/16] KVM: selftests: Enable mmu_stress_test on arm64
https://github.com/kvm-x86/linux/commit/d2fa5a3b80c6
[10/16] KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
https://github.com/kvm-x86/linux/commit/c1797c2be44d
[11/16] KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
https://github.com/kvm-x86/linux/commit/9615ab61eb54
[12/16] KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
https://github.com/kvm-x86/linux/commit/d9a3b8ab6643
[13/16] KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
https://github.com/kvm-x86/linux/commit/a606855e27b3
[14/16] KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
https://github.com/kvm-x86/linux/commit/1f13ec4de22d
[15/16] KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
https://github.com/kvm-x86/linux/commit/022d78205681
[16/16] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
https://github.com/kvm-x86/linux/commit/d76fe926b6c4
--
https://github.com/kvm-x86/linux/tree/next
MAINTAINERS | 12 +--
arch/arm64/include/uapi/asm/kvm.h | 3 -
arch/riscv/include/uapi/asm/kvm.h | 3 -
include/uapi/linux/kvm.h | 4 +
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 345 ++------------------------------------------------------------------------------
tools/testing/selftests/kvm/Makefile.kvm | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c | 10 +--
tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c | 4 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c | 6 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c | 2 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c | 6 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c | 18 ++---
tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c | 19 +++--
tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +-
tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h | 0
tools/testing/selftests/kvm/include/kvm_util.h | 10 ++-
tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/facility.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/processor.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/sie.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h | 6 --
tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h | 2 -
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c | 8 +-
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c | 0
tools/testing/selftests/kvm/lib/kvm_util.c | 3 +-
tools/testing/selftests/kvm/lib/riscv/processor.c | 66 ++++++++--------
tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c | 2 +-
tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c | 2 -
tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 -
tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 -
tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} | 162 ++++++++++++++++++++++++++++++++++----
tools/testing/selftests/kvm/riscv/arch_timer.c | 2 +-
tools/testing/selftests/kvm/riscv/ebreak_test.c | 2 +-
tools/testing/selftests/kvm/riscv/sbi_pmu_test.c | 2 +-
tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/config | 0
tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/debug_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/memop.c | 0
tools/testing/selftests/kvm/{s390x => s390}/resets.c | 2 +-
tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/tprot.c | 0
tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c | 0
tools/testing/selftests/kvm/set_memory_region_test.c | 6 +-
tools/testing/selftests/kvm/steal_time.c | 3 +-
tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0
tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c | 0
164 files changed, 584 insertions(+), 477 deletions(-)
create mode 100644 tools/testing/selftests/kvm/Makefile.kvm
rename tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c (95%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c (99%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c (97%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/facility.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/sie.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h (99%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c (98%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c (98%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c (99%)
rename tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} (60%)
rename tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/config (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/debug_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/memop.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/resets.c (99%)
rename tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/tprot.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c (100%)
On Wed, Dec 18, 2024, Sean Christopherson wrote:
> On Wed, 27 Nov 2024 16:55:31 -0800, Sean Christopherson wrote:
> > Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to
> > avoid unpleasant conflicts, and because I hope to land both in kvm/next
> > shortly after 6.12-rc1 since they impact all of KVM selftests.
> >
> > mmu_stress_test
> > ---------------
> > Convert the max_guest_memory_test into a more generic mmu_stress_test.
> > The basic gist of the "conversion" is to have the test do mprotect() on
> > guest memory while vCPUs are accessing said memory, e.g. to verify KVM
> > and mmu_notifiers are working as intended.
> >
> > [...]
>
> As I am running out of time before I disappear for two weeks, applied to:
>
> https://github.com/kvm-x86/linux.git selftests_arch
>
> Other KVM maintainers, that branch is officially immutable. I also pushed a tag,
> kvm-selftests-arch-6.14, just in case I pull a stupid and manage to clobber the
> branch. My apologies if this causes pain. AFAICT, there aren't any queued or
> in-flight patches that git's rename magic can't automatically handle, so hopefully
> this ends up being pain-free.
>
> Paolo, here's a pull request if you want to pull this into kvm/next long before
> the 6.14 merge window. Diff stats at the very bottom (hilariously long).
Argh! I completely forget to build test this on non-x86, and missed that arm64
snuck in 75cd027cbcb1 ("KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely
ignored"). *sigh*
Given that I just sent out mail, I'm going to cross my fingers and hope that no
one has merged the above branch/tag. I've deleted the branch and tags from the
remote, but kept the tag locally just in case.
Please holler if you managed to grab the broken branch/tag. If no one screams,
I'll assume I got luckly and will push a fixed version (with different names) later
today.
On Wed, Dec 18, 2024, Sean Christopherson wrote:
> On Wed, Dec 18, 2024, Sean Christopherson wrote:
> > On Wed, 27 Nov 2024 16:55:31 -0800, Sean Christopherson wrote:
> > > Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to
> > > avoid unpleasant conflicts, and because I hope to land both in kvm/next
> > > shortly after 6.12-rc1 since they impact all of KVM selftests.
> > >
> > > mmu_stress_test
> > > ---------------
> > > Convert the max_guest_memory_test into a more generic mmu_stress_test.
> > > The basic gist of the "conversion" is to have the test do mprotect() on
> > > guest memory while vCPUs are accessing said memory, e.g. to verify KVM
> > > and mmu_notifiers are working as intended.
> > >
> > > [...]
> >
> > As I am running out of time before I disappear for two weeks, applied to:
> >
> > https://github.com/kvm-x86/linux.git selftests_arch
> >
> > Other KVM maintainers, that branch is officially immutable. I also pushed a tag,
> > kvm-selftests-arch-6.14, just in case I pull a stupid and manage to clobber the
> > branch. My apologies if this causes pain. AFAICT, there aren't any queued or
> > in-flight patches that git's rename magic can't automatically handle, so hopefully
> > this ends up being pain-free.
> >
> > Paolo, here's a pull request if you want to pull this into kvm/next long before
> > the 6.14 merge window. Diff stats at the very bottom (hilariously long).
>
> Argh! I completely forget to build test this on non-x86, and missed that arm64
> snuck in 75cd027cbcb1 ("KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely
> ignored"). *sigh*
>
> Given that I just sent out mail, I'm going to cross my fingers and hope that no
> one has merged the above branch/tag. I've deleted the branch and tags from the
> remote, but kept the tag locally just in case.
>
> Please holler if you managed to grab the broken branch/tag. If no one screams,
> I'll assume I got luckly and will push a fixed version (with different names) later
> today.
Third time is the charm. Compile tested on all architectures, and runtime tested
on x86 and arm64.
https://github.com/kvm-x86/linux.git selftests_treewide_6.14
---
The following changes since commit 3522c419758ee8dca5a0e8753ee0070a22157bc1:
Merge tag 'kvm-riscv-fixes-6.13-1' of https://github.com/kvm-riscv/linux into HEAD (2024-12-13 13:59:20 -0500)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-selftests-treewide-6.14
for you to fetch changes up to 9af04539d474dda4984ff4909d4568e6123c8cba:
KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR (2024-12-18 14:15:05 -0800)
----------------------------------------------------------------
KVM selftests "tree"-wide changes for 6.14:
- Rework vcpu_get_reg() to return a value instead of using an out-param, and
update all affected arch code accordingly.
- Convert the max_guest_memory_test into a more generic mmu_stress_test.
The basic gist of the "conversion" is to have the test do mprotect() on
guest memory while vCPUs are accessing said memory, e.g. to verify KVM
and mmu_notifiers are working as intended.
- Play nice with treewrite builds of unsupported architectures, e.g. arm
(32-bit), as KVM selftests' Makefile doesn't do anything to ensure the
target architecture is actually one KVM selftests supports.
- Use the kernel's $(ARCH) definition instead of the target triple for arch
specific directories, e.g. arm64 instead of aarch64, mainly so as not to
be different from the rest of the kernel.
----------------------------------------------------------------
Sean Christopherson (16):
KVM: Move KVM_REG_SIZE() definition to common uAPI header
KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
KVM: selftests: Compute number of extra pages needed in mmu_stress_test
KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
KVM: selftests: Enable mmu_stress_test on arm64
KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
--
[01/16] KVM: Move KVM_REG_SIZE() definition to common uAPI header
https://github.com/kvm-x86/linux/commit/915d2f0718a4
[02/16] KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
https://github.com/kvm-x86/linux/commit/09bb926d2907
[03/16] KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
https://github.com/kvm-x86/linux/commit/fe85ce31b289
[04/16] KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
https://github.com/kvm-x86/linux/commit/d6533c151338
[05/16] KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
https://github.com/kvm-x86/linux/commit/b12391498d1e
[06/16] KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
https://github.com/kvm-x86/linux/commit/55e164df482a
[07/16] KVM: selftests: Compute number of extra pages needed in mmu_stress_test
https://github.com/kvm-x86/linux/commit/1ddd3ea75ac3
[08/16] KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
https://github.com/kvm-x86/linux/commit/c35d8f579e50
[09/16] KVM: selftests: Enable mmu_stress_test on arm64
https://github.com/kvm-x86/linux/commit/8abe7632a1ee
[10/16] KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
https://github.com/kvm-x86/linux/commit/3a0422526404
[11/16] KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
https://github.com/kvm-x86/linux/commit/82b542e11848
[12/16] KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
https://github.com/kvm-x86/linux/commit/80b7859a3a43
[13/16] KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
https://github.com/kvm-x86/linux/commit/b6c304aec648
[14/16] KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
https://github.com/kvm-x86/linux/commit/43fbd8cd389f
[15/16] KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
https://github.com/kvm-x86/linux/commit/67730e6c53d7
[16/16] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
https://github.com/kvm-x86/linux/commit/9af04539d474
MAINTAINERS | 12 +--
arch/arm64/include/uapi/asm/kvm.h | 3 -
arch/riscv/include/uapi/asm/kvm.h | 3 -
include/uapi/linux/kvm.h | 4 +
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 345 ++------------------------------------------------------------------------------
tools/testing/selftests/kvm/Makefile.kvm | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c | 10 +--
tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c | 4 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c | 6 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c | 2 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c | 8 +-
tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c | 22 +++---
tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0
tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c | 19 +++--
tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +-
tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h | 0
tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h | 0
tools/testing/selftests/kvm/include/kvm_util.h | 10 ++-
tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/facility.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/processor.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/sie.h | 0
tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h | 2 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h | 6 --
tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h | 3 -
tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h | 0
tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h | 2 -
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c | 8 +-
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c | 0
tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c | 0
tools/testing/selftests/kvm/lib/kvm_util.c | 3 +-
tools/testing/selftests/kvm/lib/riscv/processor.c | 66 ++++++++--------
tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c | 0
tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c | 2 +-
tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c | 2 -
tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 -
tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0
tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 -
tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} | 162 ++++++++++++++++++++++++++++++++++----
tools/testing/selftests/kvm/riscv/arch_timer.c | 2 +-
tools/testing/selftests/kvm/riscv/ebreak_test.c | 2 +-
tools/testing/selftests/kvm/riscv/sbi_pmu_test.c | 2 +-
tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/config | 0
tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/debug_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/memop.c | 0
tools/testing/selftests/kvm/{s390x => s390}/resets.c | 2 +-
tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c | 0
tools/testing/selftests/kvm/{s390x => s390}/tprot.c | 0
tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c | 0
tools/testing/selftests/kvm/set_memory_region_test.c | 6 +-
tools/testing/selftests/kvm/steal_time.c | 3 +-
tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0
tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c | 0
tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c | 0
164 files changed, 587 insertions(+), 480 deletions(-)
create mode 100644 tools/testing/selftests/kvm/Makefile.kvm
rename tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c (95%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c (99%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c (98%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c (96%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c (97%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c (100%)
rename tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c (97%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/facility.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/processor.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/sie.h (100%)
rename tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h (99%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h (98%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h (94%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h (100%)
rename tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h (99%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c (98%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c (100%)
rename tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c (98%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c (99%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c (100%)
rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c (99%)
rename tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} (60%)
rename tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/config (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/debug_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/memop.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/resets.c (99%)
rename tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/tprot.c (100%)
rename tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c (100%)
rename tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c (100%)
On Wed, Dec 18, 2024 at 06:00:50PM -0800, Sean Christopherson wrote:
> On Wed, Dec 18, 2024, Sean Christopherson wrote:
> > On Wed, Dec 18, 2024, Sean Christopherson wrote:
> > > On Wed, 27 Nov 2024 16:55:31 -0800, Sean Christopherson wrote:
> > > > Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to
> > > > avoid unpleasant conflicts, and because I hope to land both in kvm/next
> > > > shortly after 6.12-rc1 since they impact all of KVM selftests.
> > > >
> > > > mmu_stress_test
> > > > ---------------
> > > > Convert the max_guest_memory_test into a more generic mmu_stress_test.
> > > > The basic gist of the "conversion" is to have the test do mprotect() on
> > > > guest memory while vCPUs are accessing said memory, e.g. to verify KVM
> > > > and mmu_notifiers are working as intended.
> > > >
> > > > [...]
> > >
> > > As I am running out of time before I disappear for two weeks, applied to:
> > >
> > > https://github.com/kvm-x86/linux.git selftests_arch
> > >
> > > Other KVM maintainers, that branch is officially immutable. I also pushed a tag,
> > > kvm-selftests-arch-6.14, just in case I pull a stupid and manage to clobber the
> > > branch. My apologies if this causes pain. AFAICT, there aren't any queued or
> > > in-flight patches that git's rename magic can't automatically handle, so hopefully
> > > this ends up being pain-free.
> > >
> > > Paolo, here's a pull request if you want to pull this into kvm/next long before
> > > the 6.14 merge window. Diff stats at the very bottom (hilariously long).
> >
> > Argh! I completely forget to build test this on non-x86, and missed that arm64
> > snuck in 75cd027cbcb1 ("KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely
> > ignored"). *sigh*
> >
> > Given that I just sent out mail, I'm going to cross my fingers and hope that no
> > one has merged the above branch/tag. I've deleted the branch and tags from the
> > remote, but kept the tag locally just in case.
> >
> > Please holler if you managed to grab the broken branch/tag. If no one screams,
> > I'll assume I got luckly and will push a fixed version (with different names) later
> > today.
>
> Third time is the charm. Compile tested on all architectures, and runtime tested
> on x86 and arm64.
>
> https://github.com/kvm-x86/linux.git selftests_treewide_6.14
>
> ---
> The following changes since commit 3522c419758ee8dca5a0e8753ee0070a22157bc1:
>
> Merge tag 'kvm-riscv-fixes-6.13-1' of https://github.com/kvm-riscv/linux into HEAD (2024-12-13 13:59:20 -0500)
>
> are available in the Git repository at:
>
> https://github.com/kvm-x86/linux.git tags/kvm-selftests-treewide-6.14
>
> for you to fetch changes up to 9af04539d474dda4984ff4909d4568e6123c8cba:
>
> KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR (2024-12-18 14:15:05 -0800)
>
> ----------------------------------------------------------------
> KVM selftests "tree"-wide changes for 6.14:
>
> - Rework vcpu_get_reg() to return a value instead of using an out-param, and
> update all affected arch code accordingly.
>
> - Convert the max_guest_memory_test into a more generic mmu_stress_test.
> The basic gist of the "conversion" is to have the test do mprotect() on
> guest memory while vCPUs are accessing said memory, e.g. to verify KVM
> and mmu_notifiers are working as intended.
>
> - Play nice with treewrite builds of unsupported architectures, e.g. arm
nit: treewide, not treewrite
> (32-bit), as KVM selftests' Makefile doesn't do anything to ensure the
> target architecture is actually one KVM selftests supports.
>
> - Use the kernel's $(ARCH) definition instead of the target triple for arch
> specific directories, e.g. arm64 instead of aarch64, mainly so as not to
> be different from the rest of the kernel.
>
> ----------------------------------------------------------------
> Sean Christopherson (16):
> KVM: Move KVM_REG_SIZE() definition to common uAPI header
> KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
> KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
> KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
> KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
> KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
> KVM: selftests: Compute number of extra pages needed in mmu_stress_test
> KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
> KVM: selftests: Enable mmu_stress_test on arm64
> KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
> KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
> KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
> KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
> KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
> KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
> KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
> --
>
> [01/16] KVM: Move KVM_REG_SIZE() definition to common uAPI header
> https://github.com/kvm-x86/linux/commit/915d2f0718a4
> [02/16] KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
> https://github.com/kvm-x86/linux/commit/09bb926d2907
> [03/16] KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate
> https://github.com/kvm-x86/linux/commit/fe85ce31b289
> [04/16] KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
> https://github.com/kvm-x86/linux/commit/d6533c151338
> [05/16] KVM: selftests: Rename max_guest_memory_test to mmu_stress_test
> https://github.com/kvm-x86/linux/commit/b12391498d1e
> [06/16] KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test
> https://github.com/kvm-x86/linux/commit/55e164df482a
> [07/16] KVM: selftests: Compute number of extra pages needed in mmu_stress_test
> https://github.com/kvm-x86/linux/commit/1ddd3ea75ac3
> [08/16] KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c
> https://github.com/kvm-x86/linux/commit/c35d8f579e50
> [09/16] KVM: selftests: Enable mmu_stress_test on arm64
> https://github.com/kvm-x86/linux/commit/8abe7632a1ee
> [10/16] KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
> https://github.com/kvm-x86/linux/commit/3a0422526404
> [11/16] KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test
> https://github.com/kvm-x86/linux/commit/82b542e11848
> [12/16] KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test
> https://github.com/kvm-x86/linux/commit/80b7859a3a43
> [13/16] KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)
> https://github.com/kvm-x86/linux/commit/b6c304aec648
> [14/16] KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
> https://github.com/kvm-x86/linux/commit/43fbd8cd389f
> [15/16] KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
> https://github.com/kvm-x86/linux/commit/67730e6c53d7
> [16/16] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
> https://github.com/kvm-x86/linux/commit/9af04539d474
>
>
> MAINTAINERS | 12 +--
> arch/arm64/include/uapi/asm/kvm.h | 3 -
> arch/riscv/include/uapi/asm/kvm.h | 3 -
> include/uapi/linux/kvm.h | 4 +
> tools/testing/selftests/kvm/.gitignore | 1 +
> tools/testing/selftests/kvm/Makefile | 345 ++------------------------------------------------------------------------------
> tools/testing/selftests/kvm/Makefile.kvm | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c | 10 +--
> tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c | 4 +-
> tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c | 6 +-
> tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c | 2 +-
> tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c | 8 +-
> tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c | 22 +++---
> tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0
> tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c | 19 +++--
> tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +-
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h | 0
> tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h | 0
> tools/testing/selftests/kvm/include/kvm_util.h | 10 ++-
> tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/facility.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/processor.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/sie.h | 0
> tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h | 0
> tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h | 2 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h | 3 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h | 3 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h | 0
> tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h | 2 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h | 0
> tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h | 2 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h | 0
> tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h | 6 --
> tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h | 3 -
> tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h | 0
> tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h | 2 -
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c | 8 +-
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c | 0
> tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c | 0
> tools/testing/selftests/kvm/lib/kvm_util.c | 3 +-
> tools/testing/selftests/kvm/lib/riscv/processor.c | 66 ++++++++--------
> tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c | 0
> tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c | 0
> tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c | 0
> tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c | 2 +-
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c | 2 -
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 -
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0
> tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 -
> tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} | 162 ++++++++++++++++++++++++++++++++++----
> tools/testing/selftests/kvm/riscv/arch_timer.c | 2 +-
> tools/testing/selftests/kvm/riscv/ebreak_test.c | 2 +-
> tools/testing/selftests/kvm/riscv/sbi_pmu_test.c | 2 +-
> tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/config | 0
> tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/debug_test.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/memop.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/resets.c | 2 +-
> tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/tprot.c | 0
> tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c | 0
> tools/testing/selftests/kvm/set_memory_region_test.c | 6 +-
> tools/testing/selftests/kvm/steal_time.c | 3 +-
> tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c | 0
> tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c | 0
> 164 files changed, 587 insertions(+), 480 deletions(-)
> create mode 100644 tools/testing/selftests/kvm/Makefile.kvm
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/aarch32_id_regs.c (95%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/arch_timer_edge_cases.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/debug-exceptions.c (99%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/get-reg-list.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/hypercalls.c (98%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/mmio_abort.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c (98%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/page_fault_test.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/psci_test.c (96%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/set_id_regs.c (97%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/smccc_filter.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/vcpu_width_config.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_init.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_irq.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/vgic_lpi_stress.c (100%)
> rename tools/testing/selftests/kvm/{aarch64 => arm64}/vpmu_counter_access.c (97%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/arch_timer.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/delay.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/gic_v3_its.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/kvm_util_arch.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/processor.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/spinlock.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/ucall.h (100%)
> rename tools/testing/selftests/kvm/include/{aarch64 => arm64}/vgic.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/debug_print.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/diag318_test_handler.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/facility.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/kvm_util_arch.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/processor.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/sie.h (100%)
> rename tools/testing/selftests/kvm/include/{s390x => s390}/ucall.h (100%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/apic.h (98%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/evmcs.h (99%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/hyperv.h (99%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/kvm_util_arch.h (100%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/mce.h (94%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/pmu.h (100%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/processor.h (99%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/sev.h (100%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm.h (98%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/svm_util.h (94%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/ucall.h (100%)
> rename tools/testing/selftests/kvm/include/{x86_64 => x86}/vmx.h (99%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic.c (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_private.h (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/gic_v3_its.c (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/handlers.S (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/processor.c (98%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/spinlock.c (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/ucall.c (100%)
> rename tools/testing/selftests/kvm/lib/{aarch64 => arm64}/vgic.c (100%)
> rename tools/testing/selftests/kvm/lib/{s390x => s390}/diag318_test_handler.c (100%)
> rename tools/testing/selftests/kvm/lib/{s390x => s390}/facility.c (100%)
> rename tools/testing/selftests/kvm/lib/{s390x => s390}/processor.c (100%)
> rename tools/testing/selftests/kvm/lib/{s390x => s390}/ucall.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/apic.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/handlers.S (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/hyperv.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/memstress.c (98%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/pmu.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/processor.c (99%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/sev.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/svm.c (99%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/ucall.c (100%)
> rename tools/testing/selftests/kvm/lib/{x86_64 => x86}/vmx.c (99%)
> rename tools/testing/selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} (60%)
> rename tools/testing/selftests/kvm/{s390x => s390}/cmma_test.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/config (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/cpumodel_subfuncs_test.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/debug_test.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/memop.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/resets.c (99%)
> rename tools/testing/selftests/kvm/{s390x => s390}/shared_zeropage_test.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/sync_regs_test.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/tprot.c (100%)
> rename tools/testing/selftests/kvm/{s390x => s390}/ucontrol_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/amx_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/apic_bus_clock_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/cpuid_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/debug_regs.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/dirty_log_page_splitting_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/exit_on_emulation_failure_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/feature_msrs_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/fix_hypercall_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/flds_emulation.h (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_clock.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_extended_hypercalls.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_features.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_ipi.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_svm_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/hyperv_tlb_flush.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_clock_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/kvm_pv_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/max_vcpuid_cap_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/monitor_mwait_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/nested_exceptions_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/nx_huge_pages_test.sh (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/platform_info_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_counters_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/pmu_event_filter_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_conversions_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/private_mem_kvm_exits_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/recalc_apic_map_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/set_boot_cpu_id.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/set_sregs_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_init2_tests.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_migrate_tests.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/sev_smoke_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/smaller_maxphyaddr_emulation_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/smm_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/state_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_int_ctl_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_shutdown_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_nested_soft_inject_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/svm_vmcall_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/sync_regs_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/triple_fault_event_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/tsc_scaling_sync.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/ucna_injection_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_io_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/userspace_msr_exit_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_apic_access_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_close_while_nested_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_dirty_log_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_exception_with_invalid_guest_state.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_invalid_nested_guest_state.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_nested_tsc_scaling_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_pmu_caps_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_preemption_timer_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_set_nested_state_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xapic_state_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xcr0_cpuid_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_shinfo_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xen_vmcall_test.c (100%)
> rename tools/testing/selftests/kvm/{x86_64 => x86}/xss_msr_test.c (100%)
>
--
On 12/19/24 03:00, Sean Christopherson wrote: > On Wed, Dec 18, 2024, Sean Christopherson wrote: >> On Wed, Dec 18, 2024, Sean Christopherson wrote: >>> On Wed, 27 Nov 2024 16:55:31 -0800, Sean Christopherson wrote: >>>> Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to >>>> avoid unpleasant conflicts, and because I hope to land both in kvm/next >>>> shortly after 6.12-rc1 since they impact all of KVM selftests. >>>> >>>> mmu_stress_test >>>> --------------- >>>> Convert the max_guest_memory_test into a more generic mmu_stress_test. >>>> The basic gist of the "conversion" is to have the test do mprotect() on >>>> guest memory while vCPUs are accessing said memory, e.g. to verify KVM >>>> and mmu_notifiers are working as intended. >>>> >>>> [...] >>> >>> As I am running out of time before I disappear for two weeks, applied to: >>> >>> https://github.com/kvm-x86/linux.git selftests_arch >>> >>> Other KVM maintainers, that branch is officially immutable. I also pushed a tag, >>> kvm-selftests-arch-6.14, just in case I pull a stupid and manage to clobber the >>> branch. My apologies if this causes pain. AFAICT, there aren't any queued or >>> in-flight patches that git's rename magic can't automatically handle, so hopefully >>> this ends up being pain-free. >>> >>> Paolo, here's a pull request if you want to pull this into kvm/next long before >>> the 6.14 merge window. Diff stats at the very bottom (hilariously long). Pulled, thanks. Paolo
On Wed, Nov 27, 2024, Sean Christopherson wrote: > Two separate series (mmu_stress_test[1] and $ARCH[2]), posted as one to > avoid unpleasant conflicts, and because I hope to land both in kvm/next > shortly after 6.12-rc1 since they impact all of KVM selftests. > > mmu_stress_test > --------------- > Convert the max_guest_memory_test into a more generic mmu_stress_test. > The basic gist of the "conversion" is to have the test do mprotect() on > guest memory while vCPUs are accessing said memory, e.g. to verify KVM > and mmu_notifiers are working as intended. > > The original plan was that patch 3 would be a single patch, but things > snowballed in order to rework vcpu_get_reg() to return a value instead > of using an out-param. Having to define a variable just to bump the > program counter on arm64 annoyed me. > > $ARCH > ----- > Play nice with treewrite builds of unsupported architectures, e.g. arm > (32-bit), as KVM selftests' Makefile doesn't do anything to ensure the > target architecture is actually one KVM selftests supports. > > The last two patches are opportunistic changes (since the above Makefile > change will generate conflicts everywhere) to switch to using $(ARCH) > instead of the target triple for arch specific directories, e.g. arm64 > instead of aarch64, mainly so as not to be different from the rest of > the kernel. Paolo, Unless you or someone else have concerns, can you apply this to kvm/next sooner than later? I'd like to start applying selftests changes for 6.14 and don't want generate conflicts, and I really don't want to have to rebase and push this series out again. Thanks!
© 2016 - 2026 Red Hat, Inc.