public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Sean Christopherson <seanjc@google.com>
Subject: [GIT PULL] KVM: x86: Misc changes for 6.15
Date: Tue, 18 Mar 2025 11:02:56 -0700	[thread overview]
Message-ID: <20250318180303.283401-2-seanjc@google.com> (raw)
In-Reply-To: <20250318180303.283401-1-seanjc@google.com>

A variety of cleanups and minor fixes, and improved support (and fixes) for
honoring L1 intercepts when emulating instructions on behalf of L2.

FWIW, unless I'm missing something, the severity of the L2 emulation bugs means
that emulating instructions while L2 is active is _very_ rare for real world
use cases.  I.e. the fixes are not urgent.

The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3:

  Linux 6.14-rc2 (2025-02-09 12:45:03 -0800)

are available in the Git repository at:

  https://github.com/kvm-x86/linux.git tags/kvm-x86-misc-6.15

for you to fetch changes up to e6c8728a8e2d20b262209c70a8ca67719a628833:

  KVM: x86: Remove the unreachable case for 0x80000022 leaf in __do_cpuid_func() (2025-03-04 09:19:49 -0800)

----------------------------------------------------------------
KVM x86 misc changes for 6.15:

 - Fix a bug in PIC emulation that caused KVM to emit a spurious KVM_REQ_EVENT.

 - Add a helper to consolidate handling of mp_state transitions, and use it to
   clear pv_unhalted whenever a vCPU is made RUNNABLE.

 - Defer runtime CPUID updates until KVM emulates a CPUID instruction, to
   coalesce updates when multiple pieces of vCPU state are changing, e.g. as
   part of a nested transition.

 - Fix a variety of nested emulation bugs, and add VMX support for synthesizing
   nested VM-Exit on interception (instead of injecting #UD into L2).

 - Drop "support" for PV Async #PF with proctected guests without SEND_ALWAYS,
   as KVM can't get the current CPL.

 - Misc cleanups

----------------------------------------------------------------
Ethan Zhao (1):
      KVM: x86/cpuid: add type suffix to decimal const 48 fix building warning

Jim Mattson (2):
      KVM: x86: Introduce kvm_set_mp_state()
      KVM: x86: Clear pv_unhalted on all transitions to KVM_MP_STATE_RUNNABLE

Li RongQing (1):
      KVM: x86: Use kvfree_rcu() to free old optimized APIC map

Liam Ni (1):
      KVM: x86: Wake vCPU for PIC interrupt injection iff a valid IRQ was found

Sean Christopherson (19):
      KVM: x86: Use for-loop to iterate over XSTATE size entries
      KVM: x86: Apply TSX_CTRL_CPUID_CLEAR if and only if the vCPU has RTM or HLE
      KVM: x86: Query X86_FEATURE_MWAIT iff userspace owns the CPUID feature bit
      KVM: x86: Defer runtime updates of dynamic CPUID bits until CPUID emulation
      KVM: nVMX: Check PAUSE_EXITING, not BUS_LOCK_DETECTION, on PAUSE emulation
      KVM: nSVM: Pass next RIP, not current RIP, for nested VM-Exit on emulation
      KVM: nVMX: Allow emulating RDPID on behalf of L2
      KVM: nVMX: Emulate HLT in L2 if it's not intercepted
      KVM: nVMX: Consolidate missing X86EMUL_INTERCEPTED logic in L2 emulation
      KVM: x86: Plumb the src/dst operand types through to .check_intercept()
      KVM: x86: Plumb the emulator's starting RIP into nested intercept checks
      KVM: x86: Add a #define for the architectural max instruction length
      KVM: nVMX: Allow the caller to provide instruction length on nested VM-Exit
      KVM: nVMX: Synthesize nested VM-Exit for supported emulation intercepts
      KVM: selftests: Add a nested (forced) emulation intercept test for x86
      KVM: x86: Don't inject PV async #PF if SEND_ALWAYS=0 and guest state is protected
      KVM: x86: Rename and invert async #PF's send_user_only flag to send_always
      KVM: x86: Use a dedicated flow for queueing re-injected exceptions
      KVM: x86: Always set mp_state to RUNNABLE on wakeup from HLT

Ted Chen (1):
      KVM: x86: Remove unused iommu_domain and iommu_noncoherent from kvm_arch

Xiaoyao Li (1):
      KVM: x86: Remove the unreachable case for 0x80000022 leaf in __do_cpuid_func()

 arch/x86/include/asm/kvm_host.h                    |   9 +-
 arch/x86/kvm/cpuid.c                               |  52 ++++----
 arch/x86/kvm/cpuid.h                               |   9 +-
 arch/x86/kvm/emulate.c                             |   5 +-
 arch/x86/kvm/i8259.c                               |   2 +-
 arch/x86/kvm/kvm_emulate.h                         |   7 +-
 arch/x86/kvm/lapic.c                               |  17 +--
 arch/x86/kvm/smm.c                                 |   2 +-
 arch/x86/kvm/svm/nested.c                          |   2 +-
 arch/x86/kvm/svm/sev.c                             |   7 +-
 arch/x86/kvm/svm/svm.c                             |  17 ++-
 arch/x86/kvm/trace.h                               |  14 +-
 arch/x86/kvm/vmx/nested.c                          |  18 +--
 arch/x86/kvm/vmx/nested.h                          |  22 +++-
 arch/x86/kvm/vmx/vmx.c                             | 120 ++++++++++++-----
 arch/x86/kvm/x86.c                                 | 136 +++++++++----------
 arch/x86/kvm/x86.h                                 |   7 +
 arch/x86/kvm/xen.c                                 |   4 +-
 tools/testing/selftests/kvm/Makefile.kvm           |   1 +
 .../selftests/kvm/x86/nested_emulation_test.c      | 146 +++++++++++++++++++++
 20 files changed, 416 insertions(+), 181 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86/nested_emulation_test.c

  reply	other threads:[~2025-03-18 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 18:02 [GIT PULL] KVM: x86: Changes for 6.15 Sean Christopherson
2025-03-18 18:02 ` Sean Christopherson [this message]
2025-03-18 18:02 ` [GIT PULL] KVM: x86: MMU changes " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: PV clock " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: Selftests changes for 6.15, part 2 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: Selftests changes for 6.15, part 1 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: SVM changes for 6.15 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: Xen " Sean Christopherson
2025-03-19 17:53 ` [GIT PULL] KVM: x86: Changes " Paolo Bonzini
2025-03-19 19:42   ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250318180303.283401-2-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox