Skip to content

Common KVM exit reason test assertions and exit reason sync

Vipin Sharma kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 3 repliesApplied

Changes in v2 from the cover letter

- Improve test assert message.
- Add macro to generate KVM_EXIT_* reason strings.
- Update selftests KVM_EXIT_ reasons to latest version.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: selftests: Make vCPU exit reason test assertion commontools/testing/selftests/kvm/aarch64/psci_test.c tools/testing/selftests/kvm/include/test_util.h tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c +41 more+69 -2930 replies
2/4KVM: selftests: Print expected and actual exit reason in KVM exit reason asserttools/testing/selftests/kvm/include/test_util.h+2 -10 replies
3/4KVM: selftests: Add macro to generate KVM exit reason stringstools/testing/selftests/kvm/lib/kvm_util.c+27 -251 reply
4/4KVM: selftests: Sync KVM exit reasons in selfteststools/testing/selftests/kvm/lib/kvm_util.c+15 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchDavid Matlack
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Patch v2 0/4] Common KVM exit reason test assertions and exit reason sync

Hi,

This patch seris is extracted from
https://lore.kernel.org/lkml/[email protected]/
series.

Specifically, patch 12 is taken out from there and now expanded in to this series.

This patch series contains following changes:

Patch 1 & 2:
Make a macro to clean up all KVM exit reason test assertion.

There are few places where explicit run->exit_reason are used but they cannot be replaced with current macro.

I used following command KVM selftests directory and changed each occurrence:

    grep "run->exit_reason" -nir ./

Patch 3:
This is from Sean Christopherson. Adding a macro to generate KVM exit strings.

Patch 4:
Sync KVM_EXIT_* reasons to sefltests. Many reasons are not present in selftest code.

v2:
- Improve test assert message.
- Add macro to generate KVM_EXIT_* reason strings.
- Update selftests KVM_EXIT_ reasons to latest version.

v1: https://lore.kernel.org/lkml/[email protected]/

Sean Christopherson (1):
KVM: selftests: Add macro to generate KVM exit reason strings

Vipin Sharma (3):
KVM: selftests: Make vCPU exit reason test assertion common
KVM: selftests: Print expected and actual exit reason in KVM exit
reason assert
KVM: selftests: Sync KVM exit reasons in selftests

 .../testing/selftests/kvm/aarch64/psci_test.c |  4 +-
 .../testing/selftests/kvm/include/test_util.h |  9 +++
 tools/testing/selftests/kvm/lib/kvm_util.c    | 66 ++++++++++++-------
 .../kvm/lib/s390x/diag318_test_handler.c      |  3 +-
 .../selftests/kvm/s390x/sync_regs_test.c      | 15 +----
 .../selftests/kvm/set_memory_region_test.c    |  6 +-
 tools/testing/selftests/kvm/x86_64/amx_test.c |  8 +--
 .../kvm/x86_64/cr4_cpuid_sync_test.c          |  8 +--
 .../testing/selftests/kvm/x86_64/debug_regs.c |  2 +-
 .../selftests/kvm/x86_64/flds_emulation.h     |  5 +-
 .../selftests/kvm/x86_64/hyperv_clock.c       |  7 +-
 .../selftests/kvm/x86_64/hyperv_evmcs.c       |  8 +--
 .../selftests/kvm/x86_64/hyperv_features.c    | 14 +---
 .../testing/selftests/kvm/x86_64/hyperv_ipi.c |  6 +-
 .../selftests/kvm/x86_64/hyperv_svm_test.c    |  7 +-
 .../selftests/kvm/x86_64/hyperv_tlb_flush.c   | 14 +---
 .../selftests/kvm/x86_64/kvm_clock_test.c     |  5 +-
 .../selftests/kvm/x86_64/kvm_pv_test.c        |  5 +-
 .../selftests/kvm/x86_64/monitor_mwait_test.c |  9 +--
 .../kvm/x86_64/nested_exceptions_test.c       |  5 +-
 .../selftests/kvm/x86_64/platform_info_test.c | 14 +---
 .../kvm/x86_64/pmu_event_filter_test.c        |  6 +-
 tools/testing/selftests/kvm/x86_64/smm_test.c |  9 +--
 .../testing/selftests/kvm/x86_64/state_test.c |  8 +--
 .../selftests/kvm/x86_64/svm_int_ctl_test.c   |  8 +--
 .../kvm/x86_64/svm_nested_shutdown_test.c     |  7 +-
 .../kvm/x86_64/svm_nested_soft_inject_test.c  |  6 +-
 .../selftests/kvm/x86_64/svm_vmcall_test.c    |  6 +-
 .../selftests/kvm/x86_64/sync_regs_test.c     | 25 ++-----
 .../kvm/x86_64/triple_fault_event_test.c      |  9 +--
 .../selftests/kvm/x86_64/tsc_scaling_sync.c   |  6 +-
 .../kvm/x86_64/ucna_injection_test.c          | 22 ++-----
 .../selftests/kvm/x86_64/userspace_io_test.c  |  6 +-
 .../kvm/x86_64/userspace_msr_exit_test.c      | 22 ++-----
 .../kvm/x86_64/vmx_apic_access_test.c         | 11 +---
 .../kvm/x86_64/vmx_close_while_nested_test.c  |  5 +-
 .../selftests/kvm/x86_64/vmx_dirty_log_test.c |  7 +-
 .../vmx_exception_with_invalid_guest_state.c  |  4 +-
 .../x86_64/vmx_invalid_nested_guest_state.c   |  4 +-
 .../kvm/x86_64/vmx_nested_tsc_scaling_test.c  |  6 +-
 .../kvm/x86_64/vmx_preemption_timer_test.c    |  8 +--
 .../kvm/x86_64/vmx_tsc_adjust_test.c          |  6 +-
 .../selftests/kvm/x86_64/xapic_ipi_test.c     |  6 +-
 .../selftests/kvm/x86_64/xen_shinfo_test.c    |  7 +-
 .../selftests/kvm/x86_64/xen_vmcall_test.c    |  5 +-
 45 files changed, 111 insertions(+), 318 deletions(-)
Signature · 1 line
2.39.1.519.gcb327c4b5f-goog