linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] RISCV: Add kvm Sstc timer selftests
@ 2023-09-14  1:36 Haibo Xu
  2023-09-14  1:36 ` [PATCH v3 1/9] KVM: selftests: Unify the codes for guest exception handling Haibo Xu
                   ` (8 more replies)
  0 siblings, 9 replies; 31+ messages in thread
From: Haibo Xu @ 2023-09-14  1:36 UTC (permalink / raw)
  Cc: xiaobo55x, haibo1.xu, ajones, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Paolo Bonzini, Shuah Khan, Marc Zyngier, Oliver Upton,
	James Morse, Suzuki K Poulose, Zenghui Yu, Anup Patel,
	Atish Patra, Sean Christopherson, Ricardo Koller,
	Vishal Annapurve, Like Xu, Vipin Sharma, David Matlack,
	Thomas Huth, Colton Lewis, Aaron Lewis, linux-kernel, linux-riscv,
	kvm, linux-kselftest, linux-arm-kernel, kvmarm, kvm-riscv

The RISC-V arch_timer selftests is used to validate Sstc timer
functionality in a guest, which sets up periodic timer interrupts
and check the basic interrupt status upon its receipt.

This KVM selftests was ported from aarch64 arch_timer and tested
with Linux v6.6-rc1 on a Qemu riscv64 virt machine.

---
Changed since v2:
  * Rebase to Linux 6.6-rc1
  * Add separate patch for kvm/Makefile improvement
  * Move aarch64 specific macros to aarch64/arch_timer.c
  * Add -DCONFIG_64BIT to kvm/Makefile CFLAGS to ensure
    only 64bit registers were available in csr.h
  * Avoid some #ifdef in kvm/arch_timer.c by setting some
    aarch64 specific variable to 0 on risc-v

Haibo Xu (9):
  KVM: selftests: Unify the codes for guest exception handling
  KVM: selftests: Unify the makefile rule for split targets
  KVM: arm64: selftests: Split arch_timer test code
  tools: riscv: Add header file csr.h
  KVM: riscv: selftests: Switch to use macro from csr.h
  KVM: riscv: selftests: Add exception handling support
  KVM: riscv: selftests: Add guest helper to get vcpu id
  KVM: riscv: selftests: Change vcpu_has_ext to a common function
  KVM: riscv: selftests: Add sstc timer test

 tools/arch/riscv/include/asm/csr.h            | 521 ++++++++++++++++++
 tools/testing/selftests/kvm/Makefile          |  14 +-
 .../selftests/kvm/aarch64/arch_timer.c        | 291 +---------
 .../selftests/kvm/aarch64/debug-exceptions.c  |   4 +-
 .../selftests/kvm/aarch64/page_fault_test.c   |   4 +-
 .../testing/selftests/kvm/aarch64/vgic_irq.c  |   4 +-
 tools/testing/selftests/kvm/arch_timer.c      | 250 +++++++++
 .../selftests/kvm/include/aarch64/processor.h |  12 +-
 .../selftests/kvm/include/kvm_util_base.h     |   9 +
 .../selftests/kvm/include/riscv/arch_timer.h  |  80 +++
 .../selftests/kvm/include/riscv/processor.h   |  63 ++-
 .../testing/selftests/kvm/include/test_util.h |   2 +
 .../selftests/kvm/include/timer_test.h        |  43 ++
 .../selftests/kvm/include/x86_64/processor.h  |   5 -
 .../selftests/kvm/lib/aarch64/processor.c     |   6 +-
 .../selftests/kvm/lib/riscv/handlers.S        | 101 ++++
 .../selftests/kvm/lib/riscv/processor.c       |  86 +++
 .../selftests/kvm/lib/x86_64/processor.c      |   4 +-
 .../testing/selftests/kvm/riscv/arch_timer.c  | 107 ++++
 .../selftests/kvm/riscv/get-reg-list.c        |  16 +-
 tools/testing/selftests/kvm/x86_64/amx_test.c |   4 +-
 .../selftests/kvm/x86_64/fix_hypercall_test.c |   4 +-
 .../selftests/kvm/x86_64/hyperv_evmcs.c       |   4 +-
 .../selftests/kvm/x86_64/hyperv_features.c    |   8 +-
 .../testing/selftests/kvm/x86_64/hyperv_ipi.c |   6 +-
 .../selftests/kvm/x86_64/kvm_pv_test.c        |   4 +-
 .../selftests/kvm/x86_64/monitor_mwait_test.c |   4 +-
 .../kvm/x86_64/pmu_event_filter_test.c        |   8 +-
 .../smaller_maxphyaddr_emulation_test.c       |   4 +-
 .../selftests/kvm/x86_64/svm_int_ctl_test.c   |   4 +-
 .../kvm/x86_64/svm_nested_shutdown_test.c     |   4 +-
 .../kvm/x86_64/svm_nested_soft_inject_test.c  |   4 +-
 .../kvm/x86_64/ucna_injection_test.c          |   8 +-
 .../kvm/x86_64/userspace_msr_exit_test.c      |   4 +-
 .../vmx_exception_with_invalid_guest_state.c  |   4 +-
 .../selftests/kvm/x86_64/vmx_pmu_caps_test.c  |   4 +-
 .../selftests/kvm/x86_64/xapic_ipi_test.c     |   4 +-
 .../selftests/kvm/x86_64/xcr0_cpuid_test.c    |   4 +-
 .../selftests/kvm/x86_64/xen_shinfo_test.c    |   4 +-
 39 files changed, 1338 insertions(+), 374 deletions(-)
 create mode 100644 tools/arch/riscv/include/asm/csr.h
 create mode 100644 tools/testing/selftests/kvm/arch_timer.c
 create mode 100644 tools/testing/selftests/kvm/include/riscv/arch_timer.h
 create mode 100644 tools/testing/selftests/kvm/include/timer_test.h
 create mode 100644 tools/testing/selftests/kvm/lib/riscv/handlers.S
 create mode 100644 tools/testing/selftests/kvm/riscv/arch_timer.c

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-12-05  7:58 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14  1:36 [PATCH v3 0/9] RISCV: Add kvm Sstc timer selftests Haibo Xu
2023-09-14  1:36 ` [PATCH v3 1/9] KVM: selftests: Unify the codes for guest exception handling Haibo Xu
2023-09-14  1:36 ` [PATCH v3 2/9] KVM: selftests: Unify the makefile rule for split targets Haibo Xu
2023-09-14  8:46   ` Andrew Jones
2023-10-03 10:28   ` Andrew Jones
2023-10-08  2:58     ` Haibo Xu
2023-11-22  8:13       ` Andrew Jones
2023-11-23  2:50         ` Haibo Xu
2023-09-14  1:36 ` [PATCH v3 3/9] KVM: arm64: selftests: Split arch_timer test code Haibo Xu
2023-09-14  8:43   ` Andrew Jones
2023-09-14  1:36 ` [PATCH v3 4/9] tools: riscv: Add header file csr.h Haibo Xu
2023-09-14  8:14   ` Andrew Jones
2023-09-15  6:08     ` Haibo Xu
2023-09-14  1:36 ` [PATCH v3 5/9] KVM: riscv: selftests: Switch to use macro from csr.h Haibo Xu
2023-09-14  8:52   ` Andrew Jones
2023-09-15  6:13     ` Haibo Xu
2023-09-14  1:37 ` [PATCH v3 6/9] KVM: riscv: selftests: Add exception handling support Haibo Xu
2023-09-14  1:37 ` [PATCH v3 7/9] KVM: riscv: selftests: Add guest helper to get vcpu id Haibo Xu
2023-09-14  1:37 ` [PATCH v3 8/9] KVM: riscv: selftests: Change vcpu_has_ext to a common function Haibo Xu
2023-09-14  9:05   ` Andrew Jones
2023-09-15  6:14     ` Haibo Xu
2023-09-14  1:37 ` [PATCH v3 9/9] KVM: riscv: selftests: Add sstc timer test Haibo Xu
2023-09-14  9:36   ` Andrew Jones
2023-09-14  9:52     ` Conor Dooley
2023-09-14 10:15       ` Andrew Jones
2023-09-15  6:23         ` Haibo Xu
2023-09-14  9:51   ` Andrew Jones
2023-09-15  6:21     ` Haibo Xu
2023-12-04  2:42       ` Haibo Xu
2023-12-04 11:32         ` Andrew Jones
2023-12-05  7:58           ` Haibo Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).