[GIT PULL] Second batch of KVM changes for Linux 5.12

From: Paolo Bonzini
Date: Thu Feb 25 2021 - 16:11:17 EST


Linus,

The following changes since commit 8c6e67bec3192f16fa624203c8131e10cc4814ba:

Merge tag 'kvmarm-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (2021-02-12 11:23:44 -0500)

are available in the Git repository at:

https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus

for you to fetch changes up to 2df8d3807ce7f75bb975f1aeae8fc6757527c62d:

KVM: SVM: Fix nested VM-Exit on #GP interception handling (2021-02-25 05:13:05 -0500)

----------------------------------------------------------------
x86:
- take into account HVA before retrying on MMU notifier race
- fixes for nested AMD guests without NPT
- allow INVPCID in guest without PCID
- disable PML in hardware when not in use
- MMU code cleanups

----------------------------------------------------------------
David Stevens (1):
KVM: x86/mmu: Consider the hva in mmu_notifier retry

Ignacio Alvarado (1):
selftests: kvm: add hardware_disable test

Like Xu (1):
KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

Lukas Bulwahn (1):
KVM: Documentation: rectify rst markup in KVM_GET_SUPPORTED_HV_CPUID

Makarand Sonare (1):
KVM: VMX: Dynamically enable/disable PML based on memslot dirty logging

Maxim Levitsky (2):
KVM: VMX: read idt_vectoring_info a bit earlier
KVM: nSVM: move nested vmrun tracepoint to enter_svm_guest_mode

Paolo Bonzini (4):
selftests: kvm: avoid uninitialized variable warning
KVM: nSVM: fix running nested guests when npt=0
KVM: nVMX: no need to undo inject_page_fault change on nested vmexit
KVM: nSVM: prepare guest save area while is_guest_mode is true

Sean Christopherson (17):
KVM: SVM: Intercept INVPCID when it's disabled to inject #UD
KVM: x86: Advertise INVPCID by default
KVM: VMX: Allow INVPCID in guest without PCID
KVM: x86/mmu: Expand collapsible SPTE zap for TDP MMU to ZONE_DEVICE and HugeTLB pages
KVM: x86/mmu: Split out max mapping level calculation to helper
KVM: x86/mmu: Pass the memslot to the rmap callbacks
KVM: x86/mmu: Consult max mapping level when zapping collapsible SPTEs
KVM: nVMX: Disable PML in hardware when running L2
KVM: x86/mmu: Expand on the comment in kvm_vcpu_ad_need_write_protect()
KVM: x86/mmu: Make dirty log size hook (PML) a value, not a function
KVM: x86: Move MMU's PML logic to common code
KVM: x86: Further clarify the logic and comments for toggling log dirty
KVM: x86/mmu: Don't set dirty bits when disabling dirty logging w/ PML
KVM: x86: Fold "write-protect large" use case into generic write-protect
KVM: x86/mmu: Remove a variety of unnecessary exports
KVM: x86/mmu: Skip mmu_notifier check when handling MMIO page fault
KVM: SVM: Fix nested VM-Exit on #GP interception handling

Documentation/virt/kvm/api.rst | 2 +
arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +-
arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +-
arch/x86/include/asm/kvm-x86-ops.h | 6 +-
arch/x86/include/asm/kvm_host.h | 36 +---
arch/x86/kvm/cpuid.c | 2 +-
arch/x86/kvm/mmu/mmu.c | 224 ++++++++-------------
arch/x86/kvm/mmu/mmu_internal.h | 7 +-
arch/x86/kvm/mmu/paging_tmpl.h | 14 +-
arch/x86/kvm/mmu/tdp_mmu.c | 66 +-----
arch/x86/kvm/mmu/tdp_mmu.h | 3 +-
arch/x86/kvm/svm/nested.c | 48 +++--
arch/x86/kvm/svm/svm.c | 22 +-
arch/x86/kvm/vmx/nested.c | 37 ++--
arch/x86/kvm/vmx/pmu_intel.c | 4 +-
arch/x86/kvm/vmx/vmx.c | 112 ++++-------
arch/x86/kvm/vmx/vmx.h | 2 +
arch/x86/kvm/x86.c | 143 +++++++------
include/linux/kvm_host.h | 25 ++-
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 1 +
.../testing/selftests/kvm/hardware_disable_test.c | 165 +++++++++++++++
tools/testing/selftests/kvm/lib/x86_64/processor.c | 3 +-
virt/kvm/kvm_main.c | 29 ++-
24 files changed, 533 insertions(+), 423 deletions(-)
create mode 100644 tools/testing/selftests/kvm/hardware_disable_test.c