The Linux Kernel Mailing List
 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: Generic and documentation updates for 7.3
Date: Wed, 12 Aug 2026 14:31:58 -0700	[thread overview]
Message-ID: <20260812213206.1564354-4-seanjc@google.com> (raw)
In-Reply-To: <20260812213206.1564354-1-seanjc@google.com>

So the subject is a bit of a lie, as three of the five patches are x86 specific.
But two are common documentation updates, and the third has a hard dependency on
a common KVM change that might be questionable.

The potentially controversial change is to add a per-VM bitmap to track which
vCPU IDs have been "claimed", so that arch code doesn't have to guard against
duplicate vCPU IDs during kvm_arch_vcpu_create() and kvm_arch_vcpu_destroy().
The part that's a little less than awesome is that the bitmap is effectively
wasted memory once the VM has reached steady state.  But, AFAICT, it shouldn't
be a meaningful amount of memory in practice.

The alternative solution we came up with was to use another xarray so that the
tracking entry could be deleted once a vCPU is fully realized.  The consensus
was that the complexity of the xarray approach wasn't justified, even though
the added complexity is relatively small.

The following changes since commit a204badd8432f93b7e862e7dac6db0fe3d65f370:

  Merge branch 'kvm-chainsaw' into HEAD (2026-06-25 11:32:09 +0200)

are available in the Git repository at:

  https://github.com/kvm-x86/linux.git tags/kvm-x86-generic-7.3

for you to fetch changes up to b41f2ca6c06011c36b75f5d53aa17c05ed90be21:

  KVM: VMX: Fix stale PID-pointer table entry left after vCPU free (2026-07-31 15:13:31 -0700)

----------------------------------------------------------------
KVM arch-neutral and documentation changes for 7.3

 - Remove kvm_debugfs_dir if kvm_init() fails after creating KVM's debugfs.

 - Document some of the "fun" gotchas with the APIC base when creating IRQCHIPs
   on x86.

 - Add a per-VM bitmap to track which vCPU IDs have been "claimed" but for
   which the vCPU isn't yet online, and use the bitmap to reject duplicate IDs
   before calling into arch code.  This allows arch code to consume vcpu_id
   without having to worry about cross-vCPU clobbering (at least s390 and x86
   have had related bugs).

 - Zero a vCPU's entry in VMX's Posted Interrupt Descriptor table used for IPI
   virtualization when the vCPU is freed to fix a use-after-free where hardware
   will write to a freed vCPU's PID.

----------------------------------------------------------------
Dmytro Maluka (2):
      KVM: Check for duplicate vcpu_id as early as possible
      KVM: VMX: Fix stale PID-pointer table entry left after vCPU free

Tim Wiederhake (2):
      KVM: x86: Document that KVM_CREATE_IRQCHIP must precede vCPU creation
      KVM: x86: Document APIC base address constraint for in-kernel irqchip

leixiang (1):
      KVM: Remove kvm_debugfs_dir on kvm_init() error paths

 Documentation/virt/kvm/api.rst | 15 ++++++++++++++-
 arch/x86/kvm/vmx/vmx.c         |  3 +++
 include/linux/kvm_host.h       |  1 +
 virt/kvm/kvm_main.c            | 10 +++++++++-
 4 files changed, 27 insertions(+), 2 deletions(-)

  parent reply	other threads:[~2026-08-12 21:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 21:31 [GIT PULL] KVM: x86 pull requests for 7.3 Sean Christopherson
2026-08-12 21:31 ` [GIT PULL] KVM: x86: Xen clock/timekeeping changes " Sean Christopherson
2026-08-12 21:31 ` [GIT PULL] KVM: guest_memfd and x86 CoCo " Sean Christopherson
2026-08-12 21:31 ` Sean Christopherson [this message]
2026-08-18 11:15   ` [GIT PULL] KVM: Generic and documentation updates " Paolo Bonzini
2026-08-12 21:31 ` [GIT PULL] KVM: MAINTAINERS " Sean Christopherson
2026-08-18 11:10   ` Paolo Bonzini
2026-08-12 21:32 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
2026-08-18 11:42   ` Paolo Bonzini
2026-08-12 21:32 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2026-08-12 21:32 ` [GIT PULL] KVM: Selftests change for 7.3, part 1 Sean Christopherson
2026-08-18 11:17   ` Paolo Bonzini
2026-08-12 21:32 ` [GIT PULL] KVM: x86: KVM: Selftests change for 7.3, part 2 Sean Christopherson
2026-08-18 11:25   ` Paolo Bonzini
2026-08-12 21:32 ` [GIT PULL] KVM: x86: SVM changes for 7.3 Sean Christopherson
2026-08-18 11:41   ` Paolo Bonzini
2026-08-12 21:32 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
2026-08-14 19:25 ` [GIT PULL] KVM: x86 pull requests " David Woodhouse
2026-08-15  7:55   ` Paolo Bonzini
2026-08-15 10:29     ` David Woodhouse
2026-08-17 14:40       ` Sean Christopherson
2026-08-18 12:29         ` Paolo Bonzini

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=20260812213206.1564354-4-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