mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vipin Sharma <vipinsh@google.com>
To: seanjc@google.com, pbonzini@redhat.com, maz@kernel.org,
	james.morse@arm.com, suzuki.poulose@arm.com,
	oliver.upton@linux.dev, yuzenghui@huawei.com,
	borntraeger@linux.ibm.com, frankja@linux.ibm.com,
	imbrenda@linux.ibm.com, david@redhat.com
Cc: dmatlack@google.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Vipin Sharma <vipinsh@google.com>
Subject: [Patch v2 0/4] Common KVM exit reason test assertions and exit reason sync
Date: Fri,  3 Feb 2023 17:45:43 -0800	[thread overview]
Message-ID: <20230204014547.583711-1-vipinsh@google.com> (raw)

Hi,

This patch seris is extracted from
https://lore.kernel.org/lkml/20221212183720.4062037-1-vipinsh@google.com/
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/20221212183720.4062037-13-vipinsh@google.com/

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(-)

-- 
2.39.1.519.gcb327c4b5f-goog


             reply	other threads:[~2023-02-04  1:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04  1:45 Vipin Sharma [this message]
2023-02-04  1:45 ` [Patch v2 1/4] KVM: selftests: Make vCPU exit reason test assertion common Vipin Sharma
2023-02-04  1:45 ` [Patch v2 2/4] KVM: selftests: Print expected and actual exit reason in KVM exit reason assert Vipin Sharma
2023-02-04  1:45 ` [Patch v2 3/4] KVM: selftests: Add macro to generate KVM exit reason strings Vipin Sharma
2023-02-06 20:51   ` Vipin Sharma
2023-02-04  1:45 ` [Patch v2 4/4] KVM: selftests: Sync KVM exit reasons in selftests Vipin Sharma
2023-03-06 18:41 ` [Patch v2 0/4] Common KVM exit reason test assertions and exit reason sync Vipin Sharma
2023-03-14 13:55 ` Paolo Bonzini

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=20230204014547.583711-1-vipinsh@google.com \
    --to=vipinsh@google.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=dmatlack@google.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /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

all inboxes | Powered by JetHome®