* [GIT PULL] KVM: x86: Changes for 6.16
@ 2025-05-23 16:24 Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
The calm before the storm... Though I suppose you already weathered a major
TDX storm :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: x86: Misc changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
@ 2025-05-23 16:24 ` Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
Nothing major, the most interesting change is an optimization to rescan I/O
APIC routes after an EOI VM-Exit when an interception of the EOI was necessary
only because of an in-flight IRQ from the previous routing.
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-misc-6.16
for you to fetch changes up to 37d8bad41d2b0a7d269affb85979a8e4114e177a:
KVM: Remove obsolete comment about locking for kvm_io_bus_read/write (2025-05-08 07:16:15 -0700)
----------------------------------------------------------------
KVM x86 misc changes for 6.16:
- Unify virtualization of IBRS on nested VM-Exit, and cross-vCPU IBPB, between
SVM and VMX.
- Advertise support to userspace for WRMSRNS and PREFETCHI.
- Rescan I/O APIC routes after handling EOI that needed to be intercepted due
to the old/previous routing, but not the new/current routing.
- Add a module param to control and enumerate support for device posted
interrupts.
- Misc cleanups.
----------------------------------------------------------------
Babu Moger (1):
KVM: x86: Advertise support for AMD's PREFETCHI
Borislav Petkov (1):
KVM: x86: Sort CPUID_8000_0021_EAX leaf bits properly
Dan Carpenter (1):
KVM: x86: clean up a return
Li RongQing (1):
KVM: Remove obsolete comment about locking for kvm_io_bus_read/write
Sean Christopherson (7):
x86/msr: Rename the WRMSRNS opcode macro to ASM_WRMSRNS (for KVM)
KVM: x86: Advertise support for WRMSRNS
KVM: x86: Isolate edge vs. level check in userspace I/O APIC route scanning
KVM: x86: Add a helper to deduplicate I/O APIC EOI interception logic
KVM: VMX: Don't send UNBLOCK when starting device assignment without APICv
KVM: x86: Add module param to control and enumerate device posted IRQs
KVM: x86: Unify cross-vCPU IBPB
Yosry Ahmed (4):
x86/cpufeatures: Define X86_FEATURE_AMD_IBRS_SAME_MODE
KVM: x86: Propagate AMD's IbrsSameMode to the guest
KVM: x86: Generalize IBRS virtualization on emulated VM-exit
KVM: SVM: Clear current_vmcb during vCPU free for all *possible* CPUs
weizijie (1):
KVM: x86: Rescan I/O APIC routes after EOI interception for old routing
arch/x86/include/asm/cpufeatures.h | 2 ++
arch/x86/include/asm/kvm_host.h | 4 +++-
arch/x86/include/asm/msr.h | 4 ++--
arch/x86/kvm/cpuid.c | 8 ++++++-
arch/x86/kvm/ioapic.c | 7 ++----
arch/x86/kvm/ioapic.h | 2 ++
arch/x86/kvm/irq_comm.c | 37 +++++++++++++++++++++++++++-----
arch/x86/kvm/lapic.c | 8 +++++++
arch/x86/kvm/svm/nested.c | 2 ++
arch/x86/kvm/svm/svm.c | 27 ++---------------------
arch/x86/kvm/svm/svm.h | 2 --
arch/x86/kvm/vmx/nested.c | 17 ++++-----------
arch/x86/kvm/vmx/posted_intr.c | 7 +++---
arch/x86/kvm/vmx/vmx.c | 18 ++++------------
arch/x86/kvm/vmx/vmx.h | 3 +--
arch/x86/kvm/x86.c | 29 +++++++++++++++++++++++--
arch/x86/kvm/x86.h | 18 ++++++++++++++++
tools/arch/x86/include/asm/cpufeatures.h | 1 +
virt/kvm/kvm_main.c | 3 ---
19 files changed, 120 insertions(+), 79 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: x86: MMU changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
@ 2025-05-23 16:24 ` Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: Posted Interrupt PIR " Sean Christopherson
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
Spurious fault cleanups, and minor fixup for S-EPT.
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-6.16
for you to fetch changes up to 6a3d704959bd04ab37fc588aff70b3078f3c90e8:
KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call() (2025-05-16 13:13:58 -0700)
----------------------------------------------------------------
KVM x86 MMU changes for 6.16:
- Refine and harden handling of spurious faults.
- Use kvm_x86_call() instead of open coding static_call().
----------------------------------------------------------------
Sean Christopherson (1):
KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call()
Yan Zhao (4):
KVM: x86/mmu: Further check old SPTE is leaf for spurious prefetch fault
KVM: x86/tdp_mmu: Merge prefetch and access checks for spurious faults
KVM: x86/tdp_mmu: WARN if PFN changes for spurious faults
KVM: x86/mmu: Warn if PFN changes on shadow-present SPTE in shadow MMU
arch/x86/kvm/mmu/mmu.c | 5 +++--
arch/x86/kvm/mmu/tdp_mmu.c | 19 +++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: x86: Posted Interrupt PIR changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
@ 2025-05-23 16:25 ` Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: selftests " Sean Christopherson
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:25 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
Clean up and optimize KVM's processing of the PIR based on the approach taken
by the kernel for posted MSIs, and then dedup the two users so that any future
optimizations/fixes benefit both parties.
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-pir-6.16
for you to fetch changes up to edaf3eded386257b0e6504f6b2c29fd8d84c8d29:
x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and posted MSIs (2025-04-24 11:19:41 -0700)
----------------------------------------------------------------
KVM x86 posted interrupt changes for 6.16:
Refine and optimize KVM's software processing of the PIR, and ultimately share
PIR harvesting code between KVM and the kernel's Posted MSI handler
----------------------------------------------------------------
Sean Christopherson (8):
x86/irq: Ensure initial PIR loads are performed exactly once
x86/irq: Track if IRQ was found in PIR during initial loop (to load PIR vals)
KVM: VMX: Ensure vIRR isn't reloaded at odd times when sync'ing PIR
x86/irq: KVM: Track PIR bitmap as an "unsigned long" array
KVM: VMX: Process PIR using 64-bit accesses on 64-bit kernels
KVM: VMX: Isolate pure loads from atomic XCHG when processing PIR
KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentation
x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and posted MSIs
arch/x86/include/asm/posted_intr.h | 78 ++++++++++++++++++++++++++++++++++----
arch/x86/kernel/irq.c | 63 +++++-------------------------
arch/x86/kvm/lapic.c | 20 +++++-----
arch/x86/kvm/lapic.h | 4 +-
arch/x86/kvm/vmx/posted_intr.h | 2 +-
5 files changed, 95 insertions(+), 72 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: selftests changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
` (2 preceding siblings ...)
2025-05-23 16:25 ` [GIT PULL] KVM: x86: Posted Interrupt PIR " Sean Christopherson
@ 2025-05-23 16:25 ` Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:25 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
Add support for SNP and MGRLU in selftests, and add a test verify fastops
(which was easier than walking PeterZ through getting a guest running with
unrestricted guest disabled :-D).
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.16
for you to fetch changes up to d166453ebd2925edde24872d9b8ac60065eb0618:
KVM: selftests: access_tracking_perf_test: Use MGLRU for access tracking (2025-05-16 12:58:21 -0700)
----------------------------------------------------------------
KVM selftests changes for 6.16:
- Add support for SNP to the various SEV selftests.
- Add a selftest to verify fastops instructions via forced emulation.
- Add MGLRU support to the access tracking perf test.
----------------------------------------------------------------
James Houghton (3):
cgroup: selftests: Move cgroup_util into its own library
KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests
KVM: selftests: access_tracking_perf_test: Use MGLRU for access tracking
Maxim Levitsky (1):
KVM: selftests: access_tracking_perf_test: Add option to skip the sanity check
Pratik R. Sampat (9):
KVM: selftests: SEV-SNP test for KVM_SEV_INIT2
KVM: selftests: Add vmgexit helper
KVM: selftests: Add SMT control state helper
KVM: selftests: Replace assert() with TEST_ASSERT_EQ()
KVM: selftests: Introduce SEV VM type check
KVM: selftests: Add library support for interacting with SNP
KVM: selftests: Force GUEST_MEMFD flag for SNP VM type
KVM: selftests: Decouple SEV policy from VM type
KVM: selftests: Add a basic SEV-SNP smoke test
Sean Christopherson (4):
KVM: selftests: Add a test for x86's fastops emulation
KVM: selftests: Extract guts of THP accessor to standalone sysfs helpers
cgroup: selftests: Move memcontrol specific helpers out of common cgroup_util.c
cgroup: selftests: Add API to find root of specific controller
arch/x86/include/uapi/asm/kvm.h | 1 +
tools/arch/x86/include/uapi/asm/kvm.h | 1 +
tools/testing/selftests/cgroup/Makefile | 21 +-
.../selftests/cgroup/{ => lib}/cgroup_util.c | 118 ++-----
.../cgroup/{ => lib/include}/cgroup_util.h | 13 +-
tools/testing/selftests/cgroup/lib/libcgroup.mk | 19 +
tools/testing/selftests/cgroup/test_memcontrol.c | 78 +++++
tools/testing/selftests/kvm/Makefile.kvm | 5 +-
.../selftests/kvm/access_tracking_perf_test.c | 281 +++++++++++++--
tools/testing/selftests/kvm/include/kvm_util.h | 35 ++
tools/testing/selftests/kvm/include/lru_gen_util.h | 51 +++
tools/testing/selftests/kvm/include/test_util.h | 1 +
.../testing/selftests/kvm/include/x86/processor.h | 1 +
tools/testing/selftests/kvm/include/x86/sev.h | 53 ++-
tools/testing/selftests/kvm/lib/kvm_util.c | 21 +-
tools/testing/selftests/kvm/lib/lru_gen_util.c | 387 +++++++++++++++++++++
tools/testing/selftests/kvm/lib/test_util.c | 42 ++-
tools/testing/selftests/kvm/lib/x86/processor.c | 4 +-
tools/testing/selftests/kvm/lib/x86/sev.c | 76 +++-
tools/testing/selftests/kvm/x86/fastops_test.c | 165 +++++++++
tools/testing/selftests/kvm/x86/hyperv_cpuid.c | 21 +-
tools/testing/selftests/kvm/x86/sev_init2_tests.c | 13 +
tools/testing/selftests/kvm/x86/sev_smoke_test.c | 75 ++--
23 files changed, 1273 insertions(+), 209 deletions(-)
rename tools/testing/selftests/cgroup/{ => lib}/cgroup_util.c (88%)
rename tools/testing/selftests/cgroup/{ => lib/include}/cgroup_util.h (91%)
create mode 100644 tools/testing/selftests/cgroup/lib/libcgroup.mk
create mode 100644 tools/testing/selftests/kvm/include/lru_gen_util.h
create mode 100644 tools/testing/selftests/kvm/lib/lru_gen_util.c
create mode 100644 tools/testing/selftests/kvm/x86/fastops_test.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: x86: SVM changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
` (3 preceding siblings ...)
2025-05-23 16:25 ` [GIT PULL] KVM: selftests " Sean Christopherson
@ 2025-05-23 16:25 ` Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:25 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
A variety of SEV changes, and support for BUS_LOCK_EXIT (Bus Lock Threshold).
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-svm-6.16
for you to fetch changes up to 72df72e1c6ddfb6e0c2bce174d5879bc095540c8:
KVM: selftests: Add test to verify KVM_CAP_X86_BUS_LOCK_EXIT (2025-05-19 11:05:19 -0700)
----------------------------------------------------------------
KVM SVM changes for 6.16:
- Wait for target vCPU to acknowledge KVM_REQ_UPDATE_PROTECTED_GUEST_STATE to
fix a race between AP destroy and VMRUN.
- Decrypt and dump the VMSA in dump_vmcb() if debugging enabled for the VM.
- Add support for ALLOWED_SEV_FEATURES.
- Add #VMGEXIT to the set of handlers special cased for CONFIG_RETPOLINE=y.
- Treat DEBUGCTL[5:2] as reserved to pave the way for virtualizing features
that utilize those bits.
- Don't account temporary allocations in sev_send_update_data().
- Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM, via Bus Lock Threshold.
----------------------------------------------------------------
Kim Phillips (1):
KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field
Kishon Vijay Abraham I (1):
x86/cpufeatures: Add "Allowed SEV Features" Feature
Manali Shukla (3):
KVM: x86: Make kvm_pio_request.linear_rip a common field for user exits
x86/cpufeatures: Add CPUID feature bit for the Bus Lock Threshold
KVM: SVM: Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM CPUs
Nikunj A Dadhania (2):
KVM: SVM: Add architectural definitions/assets for Bus Lock Threshold
KVM: selftests: Add test to verify KVM_CAP_X86_BUS_LOCK_EXIT
Peng Hao (2):
KVM: SVM: avoid frequency indirect calls
x86/sev: Remove unnecessary GFP_KERNEL_ACCOUNT for temporary variables
Sean Christopherson (1):
KVM: SVM: Treat DEBUGCTL[5:2] as reserved
Tom Lendacky (6):
KVM: SVM: Fix SNP AP destroy race with VMRUN
KVM: SVM: Decrypt SEV VMSA in dump_vmcb() if debugging is enabled
KVM: SVM: Dump guest register state in dump_vmcb()
KVM: SVM: Add the type of VM for which the VMCB/VMSA is being dumped
KVM: SVM: Include the vCPU ID when dumping a VMCB
KVM: SVM: Add a mutex to dump_vmcb() to prevent concurrent output
Documentation/virt/kvm/api.rst | 5 +
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/kvm_host.h | 5 +-
arch/x86/include/asm/svm.h | 10 +-
arch/x86/include/uapi/asm/svm.h | 2 +
arch/x86/kvm/svm/nested.c | 34 ++++++
arch/x86/kvm/svm/sev.c | 113 ++++++++++++++++-
arch/x86/kvm/svm/svm.c | 135 +++++++++++++++++++--
arch/x86/kvm/svm/svm.h | 12 ++
arch/x86/kvm/x86.c | 8 +-
include/linux/kvm_host.h | 19 ++-
tools/testing/selftests/kvm/Makefile.kvm | 1 +
tools/testing/selftests/kvm/x86/kvm_buslock_test.c | 135 +++++++++++++++++++++
virt/kvm/kvm_main.c | 19 ++-
14 files changed, 469 insertions(+), 31 deletions(-)
create mode 100644 tools/testing/selftests/kvm/x86/kvm_buslock_test.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] KVM: x86: VMX changes for 6.16
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
` (4 preceding siblings ...)
2025-05-23 16:25 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
@ 2025-05-23 16:25 ` Sean Christopherson
5 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2025-05-23 16:25 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson
A handful of minor tweaks and fixes, and a big reduction of the boilerplate
needed for forking vt_x86_ops between VMX and TDX.
The following changes since commit 45eb29140e68ffe8e93a5471006858a018480a45:
Merge branch 'kvm-fixes-6.15-rc4' into HEAD (2025-04-24 13:39:34 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-vmx-6.16
for you to fetch changes up to 907092bf7cbddee4381729f23a33780d84b1bb7c:
KVM: VMX: Clean up and macrofy x86_ops (2025-05-02 13:37:26 -0700)
----------------------------------------------------------------
KVM VMX changes for 6.16:
- Explicitly check MSR load/store list counts to fix a potential overflow on
32-bit kernels.
- Flush shadow VMCSes on emergency reboot.
- Revert mem_enc_ioctl() back to an optional hook, as it's nullified when
SEV or TDX is disabled via Kconfig.
- Macrofy the handling of vt_x86_ops to eliminate a pile of boilerplate code
needed for TDX, and to optimize CONFIG_KVM_INTEL_TDX=n builds.
----------------------------------------------------------------
Chao Gao (1):
KVM: VMX: Flush shadow VMCS on emergency reboot
Sean Christopherson (2):
KVM: nVMX: Check MSR load/store list counts during VM-Enter consistency checks
KVM: x86: Revert kvm_x86_ops.mem_enc_ioctl() back to an OPTIONAL hook
Uros Bizjak (1):
KVM: VMX: Use LEAVE in vmx_do_interrupt_irqoff()
Vishal Verma (3):
KVM: VMX: Move vt_apicv_pre_state_restore() to posted_intr.c and tweak name
KVM: VMX: Define a VMX glue macro for kvm_complete_insn_gp()
KVM: VMX: Clean up and macrofy x86_ops
arch/x86/include/asm/kvm-x86-ops.h | 2 +-
arch/x86/kvm/vmx/main.c | 202 ++++++++++++++++++-------------------
arch/x86/kvm/vmx/nested.c | 31 ++++--
arch/x86/kvm/vmx/posted_intr.c | 10 +-
arch/x86/kvm/vmx/posted_intr.h | 3 +-
arch/x86/kvm/vmx/vmenter.S | 3 +-
arch/x86/kvm/vmx/vmx.c | 5 +-
arch/x86/kvm/vmx/x86_ops.h | 66 +-----------
arch/x86/kvm/x86.c | 7 +-
9 files changed, 142 insertions(+), 187 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-05-23 16:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 16:24 [GIT PULL] KVM: x86: Changes for 6.16 Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
2025-05-23 16:24 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: Posted Interrupt PIR " Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: selftests " Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2025-05-23 16:25 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
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).