From: David Matlack <dmatlack@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ackerley Tng <ackerleytng@google.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Andrew Jones <ajones@ventanamicro.com>,
Anup Patel <anup@brainfault.org>,
Atish Patra <atish.patra@linux.dev>,
Bibo Mao <maobibo@loongson.cn>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Colin Ian King <colin.i.king@gmail.com>,
David Hildenbrand <david@kernel.org>,
David Matlack <dmatlack@google.com>,
Fuad Tabba <tabba@google.com>,
Huacai Chen <chenhuacai@kernel.org>,
James Houghton <jthoughton@google.com>,
Janosch Frank <frankja@linux.ibm.com>,
Joey Gouly <joey.gouly@arm.com>,
kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org,
kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-riscv@lists.infradead.org, Lisa Wang <wyihan@google.com>,
loongarch@lists.linux.dev, Marc Zyngier <maz@kernel.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
Nutty Liu <nutty.liu@hotmail.com>,
Oliver Upton <oupton@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <pjw@kernel.org>,
"Pratik R. Sampat" <prsampat@amd.com>,
Rahul Kumar <rk0006818@gmail.com>,
Sean Christopherson <seanjc@google.com>,
Shuah Khan <shuah@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Tianrui Zhao <zhaotianrui@loongson.cn>,
Wu Fei <wu.fei9@sanechips.com.cn>,
Yosry Ahmed <yosry.ahmed@linux.dev>,
Zenghui Yu <yuzenghui@huawei.com>
Subject: [PATCH v2 00/10] KVM: selftests: Use kernel-style integer and g[vp]a_t types
Date: Fri, 20 Feb 2026 00:42:13 +0000 [thread overview]
Message-ID: <20260220004223.4168331-1-dmatlack@google.com> (raw)
This series renames types across all KVM selftests to more align with
types used in the kernel:
vm_vaddr_t -> gva_t
vm_paddr_t -> gpa_t
uint64_t -> u64
uint32_t -> u32
uint16_t -> u16
uint8_t -> u8
int64_t -> s64
int32_t -> s32
int16_t -> s16
int8_t -> s8
The goal of this series is to make the KVM selftests code more concise
(the new type names are shorter) and more similar to the kernel, since
selftests are developed by kernel developers.
v2:
- Reapply the series on top of kvm/queue
v1: https://lore.kernel.org/kvm/20250501183304.2433192-1-dmatlack@google.com/
David Matlack (10):
KVM: selftests: Use gva_t instead of vm_vaddr_t
KVM: selftests: Use gpa_t instead of vm_paddr_t
KVM: selftests: Use gpa_t for GPAs in Hyper-V selftests
KVM: selftests: Use u64 instead of uint64_t
KVM: selftests: Use s64 instead of int64_t
KVM: selftests: Use u32 instead of uint32_t
KVM: selftests: Use s32 instead of int32_t
KVM: selftests: Use u16 instead of uint16_t
KVM: selftests: Use s16 instead of int16_t
KVM: selftests: Use u8 instead of uint8_t
.../selftests/kvm/access_tracking_perf_test.c | 42 +--
tools/testing/selftests/kvm/arch_timer.c | 6 +-
.../selftests/kvm/arm64/aarch32_id_regs.c | 14 +-
.../testing/selftests/kvm/arm64/arch_timer.c | 8 +-
.../kvm/arm64/arch_timer_edge_cases.c | 161 +++++----
.../selftests/kvm/arm64/debug-exceptions.c | 72 ++--
.../testing/selftests/kvm/arm64/hypercalls.c | 24 +-
.../testing/selftests/kvm/arm64/idreg-idst.c | 4 +-
.../testing/selftests/kvm/arm64/no-vgic-v3.c | 6 +-
.../selftests/kvm/arm64/page_fault_test.c | 82 ++---
tools/testing/selftests/kvm/arm64/psci_test.c | 26 +-
.../testing/selftests/kvm/arm64/sea_to_user.c | 32 +-
.../testing/selftests/kvm/arm64/set_id_regs.c | 66 ++--
.../selftests/kvm/arm64/smccc_filter.c | 10 +-
tools/testing/selftests/kvm/arm64/vgic_init.c | 56 +--
tools/testing/selftests/kvm/arm64/vgic_irq.c | 137 ++++----
.../selftests/kvm/arm64/vgic_lpi_stress.c | 20 +-
.../selftests/kvm/arm64/vpmu_counter_access.c | 56 +--
.../testing/selftests/kvm/coalesced_io_test.c | 38 +-
.../selftests/kvm/demand_paging_test.c | 10 +-
.../selftests/kvm/dirty_log_perf_test.c | 14 +-
tools/testing/selftests/kvm/dirty_log_test.c | 82 ++---
tools/testing/selftests/kvm/get-reg-list.c | 2 +-
.../testing/selftests/kvm/guest_memfd_test.c | 16 +-
.../testing/selftests/kvm/guest_print_test.c | 22 +-
.../selftests/kvm/hardware_disable_test.c | 6 +-
.../selftests/kvm/include/arm64/arch_timer.h | 30 +-
.../selftests/kvm/include/arm64/delay.h | 4 +-
.../testing/selftests/kvm/include/arm64/gic.h | 8 +-
.../selftests/kvm/include/arm64/gic_v3_its.h | 8 +-
.../selftests/kvm/include/arm64/processor.h | 22 +-
.../selftests/kvm/include/arm64/ucall.h | 4 +-
.../selftests/kvm/include/arm64/vgic.h | 22 +-
.../testing/selftests/kvm/include/kvm_util.h | 328 +++++++++---------
.../selftests/kvm/include/kvm_util_types.h | 4 +-
.../kvm/include/loongarch/arch_timer.h | 4 +-
.../selftests/kvm/include/loongarch/ucall.h | 4 +-
.../testing/selftests/kvm/include/memstress.h | 30 +-
.../selftests/kvm/include/riscv/arch_timer.h | 22 +-
.../selftests/kvm/include/riscv/processor.h | 9 +-
.../selftests/kvm/include/riscv/ucall.h | 4 +-
.../kvm/include/s390/diag318_test_handler.h | 2 +-
.../selftests/kvm/include/s390/facility.h | 4 +-
.../selftests/kvm/include/s390/ucall.h | 4 +-
.../testing/selftests/kvm/include/sparsebit.h | 6 +-
.../testing/selftests/kvm/include/test_util.h | 40 ++-
.../selftests/kvm/include/timer_test.h | 18 +-
.../selftests/kvm/include/ucall_common.h | 22 +-
.../selftests/kvm/include/userfaultfd_util.h | 6 +-
.../testing/selftests/kvm/include/x86/apic.h | 22 +-
.../testing/selftests/kvm/include/x86/evmcs.h | 22 +-
.../selftests/kvm/include/x86/hyperv.h | 28 +-
.../selftests/kvm/include/x86/kvm_util_arch.h | 36 +-
tools/testing/selftests/kvm/include/x86/pmu.h | 9 +-
.../selftests/kvm/include/x86/processor.h | 282 ++++++++-------
tools/testing/selftests/kvm/include/x86/sev.h | 20 +-
.../selftests/kvm/include/x86/svm_util.h | 12 +-
.../testing/selftests/kvm/include/x86/ucall.h | 2 +-
tools/testing/selftests/kvm/include/x86/vmx.h | 70 ++--
.../selftests/kvm/kvm_page_table_test.c | 54 +--
tools/testing/selftests/kvm/lib/arm64/gic.c | 6 +-
.../selftests/kvm/lib/arm64/gic_private.h | 26 +-
.../testing/selftests/kvm/lib/arm64/gic_v3.c | 90 ++---
.../selftests/kvm/lib/arm64/gic_v3_its.c | 12 +-
.../selftests/kvm/lib/arm64/processor.c | 126 +++----
tools/testing/selftests/kvm/lib/arm64/ucall.c | 12 +-
tools/testing/selftests/kvm/lib/arm64/vgic.c | 40 +--
tools/testing/selftests/kvm/lib/elf.c | 8 +-
tools/testing/selftests/kvm/lib/guest_modes.c | 2 +-
.../testing/selftests/kvm/lib/guest_sprintf.c | 18 +-
tools/testing/selftests/kvm/lib/kvm_util.c | 220 ++++++------
.../selftests/kvm/lib/loongarch/processor.c | 79 +++--
.../selftests/kvm/lib/loongarch/ucall.c | 12 +-
tools/testing/selftests/kvm/lib/memstress.c | 38 +-
.../selftests/kvm/lib/riscv/processor.c | 58 ++--
.../kvm/lib/s390/diag318_test_handler.c | 12 +-
.../testing/selftests/kvm/lib/s390/facility.c | 2 +-
.../selftests/kvm/lib/s390/processor.c | 42 +--
tools/testing/selftests/kvm/lib/sparsebit.c | 18 +-
tools/testing/selftests/kvm/lib/test_util.c | 30 +-
.../testing/selftests/kvm/lib/ucall_common.c | 30 +-
.../selftests/kvm/lib/userfaultfd_util.c | 14 +-
tools/testing/selftests/kvm/lib/x86/apic.c | 2 +-
tools/testing/selftests/kvm/lib/x86/hyperv.c | 14 +-
.../testing/selftests/kvm/lib/x86/memstress.c | 14 +-
tools/testing/selftests/kvm/lib/x86/pmu.c | 8 +-
.../testing/selftests/kvm/lib/x86/processor.c | 199 ++++++-----
tools/testing/selftests/kvm/lib/x86/sev.c | 20 +-
tools/testing/selftests/kvm/lib/x86/svm.c | 16 +-
tools/testing/selftests/kvm/lib/x86/ucall.c | 4 +-
tools/testing/selftests/kvm/lib/x86/vmx.c | 44 +--
.../selftests/kvm/loongarch/arch_timer.c | 28 +-
.../kvm/memslot_modification_stress_test.c | 10 +-
.../testing/selftests/kvm/memslot_perf_test.c | 164 ++++-----
tools/testing/selftests/kvm/mmu_stress_test.c | 28 +-
.../selftests/kvm/pre_fault_memory_test.c | 10 +-
.../testing/selftests/kvm/riscv/arch_timer.c | 8 +-
.../testing/selftests/kvm/riscv/ebreak_test.c | 6 +-
.../selftests/kvm/riscv/get-reg-list.c | 4 +-
.../selftests/kvm/riscv/sbi_pmu_test.c | 8 +-
tools/testing/selftests/kvm/s390/debug_test.c | 8 +-
tools/testing/selftests/kvm/s390/memop.c | 94 ++---
tools/testing/selftests/kvm/s390/resets.c | 6 +-
.../selftests/kvm/s390/shared_zeropage_test.c | 2 +-
tools/testing/selftests/kvm/s390/tprot.c | 24 +-
.../selftests/kvm/s390/ucontrol_test.c | 2 +-
.../selftests/kvm/set_memory_region_test.c | 40 +--
tools/testing/selftests/kvm/steal_time.c | 66 ++--
.../kvm/system_counter_offset_test.c | 12 +-
tools/testing/selftests/kvm/x86/amx_test.c | 14 +-
.../selftests/kvm/x86/aperfmperf_test.c | 16 +-
.../selftests/kvm/x86/apic_bus_clock_test.c | 24 +-
tools/testing/selftests/kvm/x86/cpuid_test.c | 6 +-
tools/testing/selftests/kvm/x86/debug_regs.c | 4 +-
.../kvm/x86/dirty_log_page_splitting_test.c | 16 +-
.../testing/selftests/kvm/x86/fastops_test.c | 52 +--
.../selftests/kvm/x86/feature_msrs_test.c | 12 +-
.../selftests/kvm/x86/fix_hypercall_test.c | 20 +-
.../selftests/kvm/x86/flds_emulation.h | 6 +-
.../testing/selftests/kvm/x86/hwcr_msr_test.c | 10 +-
.../testing/selftests/kvm/x86/hyperv_clock.c | 6 +-
.../testing/selftests/kvm/x86/hyperv_evmcs.c | 10 +-
.../kvm/x86/hyperv_extended_hypercalls.c | 20 +-
.../selftests/kvm/x86/hyperv_features.c | 26 +-
tools/testing/selftests/kvm/x86/hyperv_ipi.c | 12 +-
.../selftests/kvm/x86/hyperv_svm_test.c | 10 +-
.../selftests/kvm/x86/hyperv_tlb_flush.c | 36 +-
.../selftests/kvm/x86/kvm_buslock_test.c | 2 +-
.../selftests/kvm/x86/kvm_clock_test.c | 14 +-
tools/testing/selftests/kvm/x86/kvm_pv_test.c | 10 +-
.../selftests/kvm/x86/monitor_mwait_test.c | 2 +-
.../selftests/kvm/x86/nested_close_kvm_test.c | 2 +-
.../selftests/kvm/x86/nested_dirty_log_test.c | 10 +-
.../selftests/kvm/x86/nested_emulation_test.c | 20 +-
.../kvm/x86/nested_exceptions_test.c | 6 +-
.../kvm/x86/nested_invalid_cr3_test.c | 2 +-
.../selftests/kvm/x86/nested_set_state_test.c | 4 +-
.../kvm/x86/nested_tsc_adjust_test.c | 12 +-
.../kvm/x86/nested_tsc_scaling_test.c | 26 +-
.../kvm/x86/nested_vmsave_vmload_test.c | 2 +-
.../selftests/kvm/x86/nx_huge_pages_test.c | 18 +-
.../selftests/kvm/x86/platform_info_test.c | 6 +-
.../selftests/kvm/x86/pmu_counters_test.c | 110 +++---
.../selftests/kvm/x86/pmu_event_filter_test.c | 102 +++---
.../kvm/x86/private_mem_conversions_test.c | 78 ++---
.../kvm/x86/private_mem_kvm_exits_test.c | 14 +-
.../selftests/kvm/x86/set_boot_cpu_id.c | 6 +-
.../selftests/kvm/x86/set_sregs_test.c | 6 +-
.../selftests/kvm/x86/sev_init2_tests.c | 6 +-
.../selftests/kvm/x86/sev_smoke_test.c | 16 +-
.../x86/smaller_maxphyaddr_emulation_test.c | 8 +-
tools/testing/selftests/kvm/x86/smm_test.c | 8 +-
tools/testing/selftests/kvm/x86/state_test.c | 14 +-
.../selftests/kvm/x86/svm_int_ctl_test.c | 2 +-
.../kvm/x86/svm_nested_shutdown_test.c | 2 +-
.../kvm/x86/svm_nested_soft_inject_test.c | 10 +-
.../selftests/kvm/x86/svm_vmcall_test.c | 2 +-
.../selftests/kvm/x86/sync_regs_test.c | 2 +-
.../kvm/x86/triple_fault_event_test.c | 4 +-
.../testing/selftests/kvm/x86/tsc_msrs_test.c | 2 +-
.../selftests/kvm/x86/tsc_scaling_sync.c | 4 +-
.../selftests/kvm/x86/ucna_injection_test.c | 45 +--
.../selftests/kvm/x86/userspace_io_test.c | 4 +-
.../kvm/x86/userspace_msr_exit_test.c | 58 ++--
.../selftests/kvm/x86/vmx_apic_access_test.c | 4 +-
.../kvm/x86/vmx_apicv_updates_test.c | 4 +-
.../kvm/x86/vmx_invalid_nested_guest_state.c | 2 +-
.../testing/selftests/kvm/x86/vmx_msrs_test.c | 22 +-
.../kvm/x86/vmx_nested_la57_state_test.c | 4 +-
.../selftests/kvm/x86/vmx_pmu_caps_test.c | 12 +-
.../kvm/x86/vmx_preemption_timer_test.c | 2 +-
.../selftests/kvm/x86/xapic_ipi_test.c | 58 ++--
.../selftests/kvm/x86/xapic_state_test.c | 20 +-
.../selftests/kvm/x86/xapic_tpr_test.c | 24 +-
.../selftests/kvm/x86/xcr0_cpuid_test.c | 8 +-
.../selftests/kvm/x86/xen_shinfo_test.c | 22 +-
.../testing/selftests/kvm/x86/xss_msr_test.c | 2 +-
177 files changed, 2514 insertions(+), 2519 deletions(-)
base-commit: b1195183ed42f1522fae3fe44ebee3af437aa000
--
2.53.0.414.gf7e9f6c205-goog
next reply other threads:[~2026-02-20 0:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 0:42 David Matlack [this message]
2026-02-20 0:42 ` [PATCH v2 01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t David Matlack
2026-02-20 0:42 ` [PATCH v2 02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t David Matlack
2026-02-20 0:42 ` [PATCH v2 03/10] KVM: selftests: Use gpa_t for GPAs in Hyper-V selftests David Matlack
2026-02-20 0:42 ` [PATCH v2 05/10] KVM: selftests: Use s64 instead of int64_t David Matlack
2026-02-20 0:42 ` [PATCH v2 07/10] KVM: selftests: Use s32 instead of int32_t David Matlack
2026-02-20 0:42 ` [PATCH v2 08/10] KVM: selftests: Use u16 instead of uint16_t David Matlack
2026-02-20 0:42 ` [PATCH v2 09/10] KVM: selftests: Use s16 instead of int16_t David Matlack
2026-02-20 0:42 ` [PATCH v2 10/10] KVM: selftests: Use u8 instead of uint8_t David Matlack
[not found] ` <20260220004223.4168331-5-dmatlack@google.com>
2026-03-05 17:19 ` [PATCH v2 04/10] KVM: selftests: Use u64 instead of uint64_t Sean Christopherson
2026-03-05 17:26 ` David Matlack
2026-03-05 17:22 ` [PATCH v2 00/10] KVM: selftests: Use kernel-style integer and g[vp]a_t types Sean Christopherson
2026-03-05 17:26 ` David Matlack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260220004223.4168331-1-dmatlack@google.com \
--to=dmatlack@google.com \
--cc=ackerleytng@google.com \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@linux.dev \
--cc=borntraeger@linux.ibm.com \
--cc=chenhuacai@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=joey.gouly@arm.com \
--cc=jthoughton@google.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=maz@kernel.org \
--cc=mlevitsk@redhat.com \
--cc=nutty.liu@hotmail.com \
--cc=oupton@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=pjw@kernel.org \
--cc=prsampat@amd.com \
--cc=rk0006818@gmail.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=wu.fei9@sanechips.com.cn \
--cc=wyihan@google.com \
--cc=yosry.ahmed@linux.dev \
--cc=yuzenghui@huawei.com \
--cc=zhaotianrui@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox