[GIT PULL] KVM: Generic changes for 6.11
From: Sean Christopherson
Date: Fri Jul 12 2024 - 19:57:47 EST
Might be worth peeking at the vcpu->wants_to_run vs. preemption change, to make
sure that it aligns with QEMU's views on live migration and steal time. Ditto
for the vCPU ID change from Mathias (though if QEMU runs afoul of that one...).
The following changes since commit c3f38fa61af77b49866b006939479069cd451173:
Linux 6.10-rc2 (2024-06-02 15:44:56 -0700)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-generic-6.11
for you to fetch changes up to 25bc6af60f6121071ab4aa924a24cf6011125614:
KVM: Add missing MODULE_DESCRIPTION() (2024-06-28 08:51:41 -0700)
----------------------------------------------------------------
KVM generic changes for 6.11
- Enable halt poll shrinking by default, as Intel found it to be a clear win.
- Setup empty IRQ routing when creating a VM to avoid having to synchronize
SRCU when creating a split IRQCHIP on x86.
- Rework the sched_in/out() paths to replace kvm_arch_sched_in() with a flag
that arch code can use for hooking both sched_in() and sched_out().
- Take the vCPU @id as an "unsigned long" instead of "u32" to avoid
truncating a bogus value from userspace, e.g. to help userspace detect bugs.
- Mark a vCPU as preempted if and only if it's scheduled out while in the
KVM_RUN loop, e.g. to avoid marking it preempted and thus writing guest
memory when retrieving guest state during live migration blackout.
- A few minor cleanups
----------------------------------------------------------------
Borislav Petkov (1):
KVM: Unexport kvm_debugfs_dir
Dan Carpenter (1):
KVM: Fix a goof where kvm_create_vm() returns 0 instead of -ENOMEM
David Matlack (3):
KVM: Introduce vcpu->wants_to_run
KVM: Ensure new code that references immediate_exit gets extra scrutiny
KVM: Mark a vCPU as preempted/ready iff it's scheduled out while running
Jeff Johnson (1):
KVM: Add missing MODULE_DESCRIPTION()
Julian Stecklina (1):
KVM: fix documentation rendering for KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM
Mathias Krause (4):
KVM: Reject overly excessive IDs in KVM_CREATE_VCPU
KVM: x86: Limit check IDs for KVM_SET_BOOT_CPU_ID
KVM: selftests: Test max vCPU IDs corner cases
KVM: selftests: Test vCPU boot IDs above 2^32 and MAX_VCPU_ID
Parshuram Sangle (2):
KVM: Enable halt polling shrink parameter by default
KVM: Update halt polling documentation to note that KVM has 4 module params
Sean Christopherson (8):
Revert "KVM: async_pf: avoid recursive flushing of work items"
KVM: Add a flag to track if a loaded vCPU is scheduled out
KVM: VMX: Move PLE grow/shrink helpers above vmx_vcpu_load()
KVM: x86: Fold kvm_arch_sched_in() into kvm_arch_vcpu_load()
KVM: Delete the now unused kvm_arch_sched_in()
KVM: x86: Unconditionally set l1tf_flush_l1d during vCPU load
KVM: x86: Drop now-superflous setting of l1tf_flush_l1d in vcpu_run()
KVM: x86: Prevent excluding the BSP on setting max_vcpu_ids
Yi Wang (3):
KVM: Setup empty IRQ routing when creating a VM
KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP
KVM: s390: Don't re-setup dummy routing when KVM_CREATE_IRQCHIP
Documentation/virt/kvm/api.rst | 8 +--
Documentation/virt/kvm/halt-polling.rst | 12 ++--
arch/arm64/include/asm/kvm_host.h | 1 -
arch/arm64/kvm/arm.c | 2 +-
arch/loongarch/include/asm/kvm_host.h | 1 -
arch/loongarch/kvm/vcpu.c | 2 +-
arch/mips/include/asm/kvm_host.h | 1 -
arch/mips/kvm/mips.c | 2 +-
arch/powerpc/include/asm/kvm_host.h | 1 -
arch/powerpc/kvm/powerpc.c | 2 +-
arch/riscv/include/asm/kvm_host.h | 1 -
arch/riscv/kvm/vcpu.c | 2 +-
arch/s390/include/asm/kvm_host.h | 1 -
arch/s390/kvm/kvm-s390.c | 11 +--
arch/x86/include/asm/kvm-x86-ops.h | 1 -
arch/x86/include/asm/kvm_host.h | 2 -
arch/x86/kvm/irq.h | 1 -
arch/x86/kvm/irq_comm.c | 7 --
arch/x86/kvm/pmu.c | 6 +-
arch/x86/kvm/svm/svm.c | 11 +--
arch/x86/kvm/vmx/main.c | 2 -
arch/x86/kvm/vmx/vmx.c | 80 +++++++++++-----------
arch/x86/kvm/vmx/x86_ops.h | 1 -
arch/x86/kvm/x86.c | 36 +++++-----
include/linux/kvm_host.h | 12 ++--
include/uapi/linux/kvm.h | 15 +++-
.../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 22 +++++-
.../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 16 +++++
virt/kvm/async_pf.c | 13 +---
virt/kvm/irqchip.c | 24 +++++++
virt/kvm/kvm_main.c | 46 +++++++++----
31 files changed, 196 insertions(+), 146 deletions(-)