Misc KVM x86 changes for 6.3. Note, the cpufeatures.h change will conflict with changes in the tip tree, but the resolution should be straightforward. The following changes since commit 7cb79f433e75b05d1635aefaa851cfcd1cb7dc4f: KVM: PPC: Fix refactoring goof in kvmppc_e500mc_init() (2023-01-24 13:00:32 -0500) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-misc-6.3 for you to fetch changes up to e73ba25fdc241c06ab48a1f708a30305d6036e66: KVM: x86: Simplify msr_io() (2023-02-03 15:55:17 -0800) ---------------------------------------------------------------- KVM x86 changes for 6.3: - Advertise support for Intel's fancy new fast REP string features - Fix a double-shootdown issue in the emergency reboot code - Ensure GIF=1 and disable SVM during an emergency reboot, i.e. give SVM similar treatment to VMX - Update Xen's TSC info CPUID sub-leaves as appropriate - Add support for Hyper-V's extended hypercalls, where "support" at this point is just forwarding the hypercalls to userspace - Clean up the kvm->lock vs. kvm->srcu sequences when updating the PMU and MSR filters - One-off fixes and cleanups ---------------------------------------------------------------- David Matlack (1): KVM: x86: Replace cpu_dirty_logging_count with nr_memslots_dirty_logging Jim Mattson (2): x86/cpufeatures: Add macros for Intel's new fast rep string features KVM: x86: Advertise fast REP string features inherent to the CPU Kees Cook (1): KVM: x86: Replace 0-length arrays with flexible arrays Michal Luczaj (8): KVM: x86/emulator: Fix segment load privilege level validation KVM: x86/emulator: Fix comment in __load_segment_descriptor() KVM: x86: Optimize kvm->lock and SRCU interaction (KVM_SET_PMU_EVENT_FILTER) KVM: x86: Optimize kvm->lock and SRCU interaction (KVM_X86_SET_MSR_FILTER) KVM: x86: Simplify msr_filter update KVM: x86: Explicitly state lockdep condition of msr_filter update KVM: x86: Remove unnecessary initialization in kvm_vm_ioctl_set_msr_filter() KVM: x86: Simplify msr_io() Paul Durrant (2): KVM: x86/cpuid: generalize kvm_update_kvm_cpuid_base() and also capture limit KVM: x86/xen: update Xen CPUID Leaf 4 (tsc info) sub-leaves, if present Sean Christopherson (4): x86/crash: Disable virt in core NMI crash handler to avoid double shootdown x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows) x86/reboot: Disable virtualization in an emergency if SVM is supported x86/reboot: Disable SVM, not just VMX, when stopping CPUs Vipin Sharma (5): 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: Test Hyper-V extended hypercall exit to userspace ye xingchen (1): KVM: x86: Replace IS_ERR() with IS_ERR_VALUE() arch/x86/include/asm/cpufeatures.h | 3 + arch/x86/include/asm/kvm_host.h | 9 +- arch/x86/include/asm/reboot.h | 2 + arch/x86/include/asm/virtext.h | 16 +++- arch/x86/include/asm/xen/hypervisor.h | 4 +- arch/x86/include/uapi/asm/kvm.h | 5 +- arch/x86/kernel/crash.c | 17 +--- arch/x86/kernel/reboot.c | 88 ++++++++++++++------ arch/x86/kernel/smp.c | 6 +- arch/x86/kvm/cpuid.c | 31 ++++--- arch/x86/kvm/emulate.c | 6 +- arch/x86/kvm/hyperv.c | 55 ++++++++---- arch/x86/kvm/pmu.c | 3 +- arch/x86/kvm/vmx/vmx.c | 9 +- arch/x86/kvm/x86.c | 34 +++----- arch/x86/kvm/xen.c | 26 ++++++ arch/x86/kvm/xen.h | 7 ++ tools/testing/selftests/kvm/Makefile | 1 + .../testing/selftests/kvm/include/x86_64/hyperv.h | 5 ++ tools/testing/selftests/kvm/lib/kvm_util.c | 1 + tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 2 +- .../kvm/x86_64/hyperv_extended_hypercalls.c | 97 ++++++++++++++++++++++ .../testing/selftests/kvm/x86_64/hyperv_features.c | 9 ++ 23 files changed, 327 insertions(+), 109 deletions(-) create mode 100644 tools/testing/selftests/kvm/x86_64/hyperv_extended_hypercalls.c