linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add Hyper-v extended hypercall support in KVM
@ 2022-11-21 23:40 Vipin Sharma
  2022-11-21 23:40 ` [PATCH v2 1/6] KVM: x86: hyper-v: Use common code for hypercall userspace exit Vipin Sharma
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Vipin Sharma @ 2022-11-21 23:40 UTC (permalink / raw)
  To: seanjc, pbonzini, vkuznets, dmatlack; +Cc: kvm, linux-kernel, Vipin Sharma

This patch series adds Hyper-V extended hypercall support. All
hypercalls will exit to userspace if CPUID.0x40000003.EBX BIT(20) is
set.

v2:
- Intorduced ASSERT_EXIT_REASON macro and replaced all occurences of
  TEST_ASSERT for vcpu exit reason.
- Skip hyperv_extended_hypercalls test if extended hypercalls are not
  supported by the kernel.
- Rebased with latest KVM queue.
- Addressed all of the comments in patch 6 of v1.

v1: https://lore.kernel.org/lkml/20221105045704.2315186-1-vipinsh@google.com/

RFC: https://lore.kernel.org/lkml/20221021185916.1494314-1-vipinsh@google.com/

Vipin Sharma (6):
  KVM: x86: hyper-v: Use common code for hypercall userspace exit
  KVM: x86: hyper-v: Add extended hypercall support in Hyper-v
  KVM: selftests: Test Hyper-V extended hypercall enablement
  KVM: selftests: Replace hardcoded Linux OS id with HYPERV_LINUX_OS_ID
  KVM: selftests: Make vCPU exit reason test assertion common.
  KVM: selftests: Test Hyper-V extended hypercall exit to userspace

 arch/x86/kvm/hyperv.c                         | 43 +++++----
 tools/testing/selftests/kvm/.gitignore        |  1 +
 tools/testing/selftests/kvm/Makefile          |  1 +
 .../testing/selftests/kvm/aarch64/psci_test.c |  4 +-
 .../testing/selftests/kvm/include/test_util.h | 10 ++
 .../selftests/kvm/include/x86_64/hyperv.h     |  4 +
 .../selftests/kvm/include/x86_64/processor.h  |  3 +
 .../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       |  9 +-
 .../selftests/kvm/x86_64/hyperv_evmcs.c       |  8 +-
 .../kvm/x86_64/hyperv_extended_hypercalls.c   | 94 +++++++++++++++++++
 .../selftests/kvm/x86_64/hyperv_features.c    | 23 +++--
 .../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 +-
 50 files changed, 211 insertions(+), 310 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/hyperv_extended_hypercalls.c

-- 
2.38.1.584.g0f3c55d4c2-goog


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

end of thread, other threads:[~2022-11-24  9:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 23:40 [PATCH v2 0/6] Add Hyper-v extended hypercall support in KVM Vipin Sharma
2022-11-21 23:40 ` [PATCH v2 1/6] KVM: x86: hyper-v: Use common code for hypercall userspace exit Vipin Sharma
2022-11-22 16:04   ` Vitaly Kuznetsov
2022-11-22 19:58     ` Sean Christopherson
2022-11-23 20:01       ` Vipin Sharma
2022-11-21 23:40 ` [PATCH v2 2/6] KVM: x86: hyper-v: Add extended hypercall support in Hyper-v Vipin Sharma
2022-11-22 16:29   ` Vitaly Kuznetsov
2022-11-23 19:43     ` Vipin Sharma
2022-11-24  8:36       ` Vitaly Kuznetsov
2022-11-24  9:03         ` Vipin Sharma
2022-11-24  9:28           ` Vitaly Kuznetsov
2022-11-21 23:40 ` [PATCH v2 3/6] KVM: selftests: Test Hyper-V extended hypercall enablement Vipin Sharma
2022-11-22 16:02   ` Vitaly Kuznetsov
2022-11-21 23:40 ` [PATCH v2 4/6] KVM: selftests: Replace hardcoded Linux OS id with HYPERV_LINUX_OS_ID Vipin Sharma
2022-11-22 16:00   ` Vitaly Kuznetsov
2022-11-21 23:40 ` [PATCH v2 5/6] KVM: selftests: Make vCPU exit reason test assertion common Vipin Sharma
2022-11-21 23:40 ` [PATCH v2 6/6] KVM: selftests: Test Hyper-V extended hypercall exit to userspace Vipin Sharma
2022-11-22 15:57   ` Vitaly Kuznetsov
2022-11-23 19:33     ` Vipin Sharma

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