[GIT PULL] KVM fixes for Linux 6.4-rc5

From: Paolo Bonzini
Date: Sun Jun 04 2023 - 06:26:37 EST


Linus,

The following changes since commit b9846a698c9aff4eb2214a06ac83638ad098f33f:

KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save (2023-05-21 04:05:51 -0400)

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 f211b45057d8b0264b494f1acebf2e8d7f9432c9:

Merge tag 'kvm-x86-fixes-6.4' of https://github.com/kvm-x86/linux into HEAD (2023-06-03 15:16:58 -0400)

----------------------------------------------------------------
ARM:

* Address some fallout of the locking rework, this time affecting
the way the vgic is configured

* Fix an issue where the page table walker frees a subtree and
then proceeds with walking what it has just freed...

* Check that a given PA donated to the guest is actually memory
(only affecting pKVM)

* Correctly handle MTE CMOs by Set/Way

* Fix the reported address of a watchpoint forwarded to userspace

* Fix the freeing of the root of stage-2 page tables

* Stop creating spurious PMU events to perform detection of the
default PMU and use the existing PMU list instead.

x86:

* Fix a memslot lookup bug in the NX recovery thread that could
theoretically let userspace bypass the NX hugepage mitigation

* Fix a s/BLOCKING/PENDING bug in SVM's vNMI support

* Account exit stats for fastpath VM-Exits that never leave the super
tight run-loop

* Fix an out-of-bounds bug in the optimized APIC map code, and add a
regression test for the race.

----------------------------------------------------------------
Akihiko Odaki (1):
KVM: arm64: Populate fault info for watchpoint

Fuad Tabba (1):
KVM: arm64: Reload PTE after invoking walker callback on preorder traversal

Jean-Philippe Brucker (4):
KVM: arm64: vgic: Fix a circular locking issue
KVM: arm64: vgic: Wrap vgic_its_create() with config_lock
KVM: arm64: vgic: Fix locking comment
KVM: arm64: vgic: Fix a comment

Maciej S. Szmigiero (1):
KVM: SVM: vNMI pending bit is V_NMI_PENDING_MASK not V_NMI_BLOCKING_MASK

Marc Zyngier (2):
arm64: Add missing Set/Way CMO encodings
KVM: arm64: Handle trap of tagged Set/Way CMOs

Michal Luczaj (1):
KVM: selftests: Add test for race in kvm_recalculate_apic_map()

Oliver Upton (3):
KVM: arm64: Drop last page ref in kvm_pgtable_stage2_free_removed()
KVM: arm64: Iterate arm_pmus list to probe for default PMU
KVM: arm64: Document default vPMU behavior on heterogeneous systems

Paolo Bonzini (3):
Merge tag 'kvmarm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
Merge tag 'kvmarm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
Merge tag 'kvm-x86-fixes-6.4' of https://github.com/kvm-x86/linux into HEAD

Sean Christopherson (3):
KVM: x86/mmu: Grab memslot for correct address space in NX recovery worker
KVM: x86: Account fastpath-only VM-Exits in vCPU stats
KVM: x86: Bail from kvm_recalculate_phys_map() if x2APIC ID is out-of-bounds

Will Deacon (1):
KVM: arm64: Prevent unconditional donation of unmapped regions from the host

arch/arm64/include/asm/kvm_pgtable.h | 6 +-
arch/arm64/include/asm/sysreg.h | 6 ++
arch/arm64/kvm/hyp/include/hyp/switch.h | 8 ++-
arch/arm64/kvm/hyp/nvhe/mem_protect.c | 14 ++--
arch/arm64/kvm/hyp/nvhe/switch.c | 2 +
arch/arm64/kvm/hyp/pgtable.c | 17 ++++-
arch/arm64/kvm/hyp/vhe/switch.c | 1 +
arch/arm64/kvm/pmu-emul.c | 58 +++++++----------
arch/arm64/kvm/sys_regs.c | 19 ++++++
arch/arm64/kvm/vgic/vgic-init.c | 27 ++++++--
arch/arm64/kvm/vgic/vgic-its.c | 14 ++--
arch/arm64/kvm/vgic/vgic-kvm-device.c | 10 ++-
arch/arm64/kvm/vgic/vgic-mmio-v3.c | 31 ++++++---
arch/arm64/kvm/vgic/vgic-mmio.c | 9 +--
arch/arm64/kvm/vgic/vgic-v2.c | 6 --
arch/arm64/kvm/vgic/vgic-v3.c | 7 --
arch/arm64/kvm/vgic/vgic-v4.c | 3 +-
arch/x86/kvm/lapic.c | 20 +++++-
arch/x86/kvm/mmu/mmu.c | 5 +-
arch/x86/kvm/svm/svm.c | 2 +-
arch/x86/kvm/x86.c | 3 +
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/x86_64/recalc_apic_map_test.c | 74 ++++++++++++++++++++++
23 files changed, 248 insertions(+), 95 deletions(-)
create mode 100644 tools/testing/selftests/kvm/x86_64/recalc_apic_map_test.c