From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] KVM: Generic changes for 6.20
Date: Fri, 27 Feb 2026 15:21:39 -0800 [thread overview]
Message-ID: <aaInA0WGEM3fVCNs@google.com> (raw)
In-Reply-To: <aYp86UFynnoBLy3m@google.com>
On Mon, Feb 09, 2026, Sean Christopherson wrote:
> On Mon, Feb 09, 2026, Paolo Bonzini wrote:
> > On Mon, Feb 9, 2026 at 6:38 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
> > >
> > > On Sat, Feb 7, 2026 at 5:10 AM Sean Christopherson <seanjc@google.com> wrote:
> > > > - Document that vcpu->mutex is take outside of kvm->slots_lock, which is all
> > > > kinds of unintuitive, but is unfortunately the existing behavior for
> > > > multiple architectures, and in a weird way actually makes sense.
> > >
> > > I disagree that it is "arguably wrong" how you put it in the commit
> > > message. vcpu->mutex is really a "don't worry about multiple ioctls at
> > > the same time" mutex that tries to stay out of the way. It only
> > > becomes unintuitive in special cases like
> > > tdx_acquire_vm_state_locks().
> > >
> > > By itself this would not be a reason to resend, but while at it you
> > > could mention that vcpu->mutex is taken outside kvm->slots_arch_lock?
> >
> > ... as well as mention kvm_alloc_apic_access_page() in the commit message.
>
> Ya, will do.
Finally got around to prepping a v2, and I realized that vcpu->mutex isn't held
when kvm_alloc_apic_access_page() is called, and thus isn't (currently) taken
outside kvm->slots_arch_lock.
avic_init_backing_page() and kvm_alloc_apic_access_page() are called with a vCPU,
but only via kvm_arch_vcpu_create(), when neither vcpu->mutex nor kvm->lock are
held (the vCPU is still unreachable).
Given that locking.rst doesn't bother documenting that kvm->lock is taken outside
kvm->slots_arch_lock (there's a whole section on slots locking), I'm inclined to
keep the new entry as just:
- vcpu->mutex is taken outside kvm->slots_lock
But update the changelog to not claim that the behavior is "arguablyh wrong".
next prev parent reply other threads:[~2026-02-27 23:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-07 4:10 [GIT PULL] KVM: x86 pull requests for 6.20 Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: x86: APIC related changes " Sean Christopherson
2026-02-09 18:33 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: Generic " Sean Christopherson
2026-02-09 17:38 ` Paolo Bonzini
2026-02-09 17:42 ` Paolo Bonzini
2026-02-10 0:33 ` Sean Christopherson
2026-02-27 23:21 ` Sean Christopherson [this message]
2026-02-28 13:56 ` Paolo Bonzini
2026-03-02 14:53 ` Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: guest_memfd " Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: x86: Misc " Sean Christopherson
2026-02-09 17:56 ` Paolo Bonzini
2026-02-09 21:19 ` Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: x86: Mediated PMU " Sean Christopherson
2026-02-09 16:44 ` Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: selftests changes " Sean Christopherson
2026-02-09 17:46 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2026-02-09 17:51 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: x86: VMX " 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=aaInA0WGEM3fVCNs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.