mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org, rcu@vger.kernel.org,
	 linux-rt-devel@lists.linux.dev,
	Paolo Bonzini <pbonzini@redhat.com>, Paul Durrant <paul@xen.org>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Fred Griffoul <fgriffo@amazon.co.uk>,
	 "Paul E . McKenney"	 <paulmck@kernel.org>,
	Kunwu Chan <kunwu.chan@linux.dev>,
	Kunwu Chan	 <kunwu.chan@gmail.com>,
	syzbot+208f7f3e5f59c11aeb90@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 00/20] KVM: Use atomic SRCU for gfn-to-pfn cache, reinstate guest mode for x86 nesting
Date: Wed, 11 Nov 2026 10:38:58 -0800	[thread overview]
Message-ID: <07358e4fcd606c8dece26dff21443bd61087f0c9.camel@infradead.org> (raw)
In-Reply-To: <avN7PfMdfZcYl7Gt@seanjc-mac.roam.internal>

[-- Attachment #1: Type: text/plain, Size: 3743 bytes --]

On Tue, 2026-11-10 at 12:14 -0800, Sean Christopherson wrote:
> On Tue, Nov 10, 2026, David Woodhouse wrote:
> > On Thu, 2026-11-05 at 02:00 +0000, David Woodhouse wrote:
> > > From: David Woodhouse <dwmw@amazon.co.uk>
> > > 
> > > Based on v7.4-rc1 (kvm/next doesn't have the atomic SRCU flavour yet),
> > > this series:
> > > 
> > >  • Converts the GPC to use atomic SRCU, ditching the rwlock which was a
> > >    scaling and latency problem, and which PREEMPT_RT hated because it
> > >    turned the rwlock into a sleeping lock¹.
> > > 
> > >  • Fixes the pre-existing bugs which torture-testing that conversion
> > >    shook out: a guest-reachable dirty ring overflow from the hypercall
> > >    page write (128 pushes of the same gfn against 64 reserved entries,
> > >    without PML), and a lost TLB flush request in record_steal_time().
> > > 
> > >  • Adds KVM_XEN_VCPU_ATTR_TYPE_WRITE_HYPERCALL_PAGE, for VMMs which
> > >    intercept the guest's MSR write and need to replay it from host
> > >    context².
> > > 
> > >  • Cleans up the intentional lack of dirty-tracking of Xen shinfo and
> > >    vcpu_info pages (Sean).
> > > 
> > >  • Converts steal-time / preempted status to use gfn_to_pfn_cache.
> > >    (Carsten)
> > > 
> > 
> > I love it when sashiko-bot finds things which my own local runs don't.
> > I'm still iterating on the latter part of the series; I think it
> > probably makes sense to merge the first half (patches 1-9 above), and
> > the nested parts (below) can come later.
> > 
> > Sean, what do you think?
> 
> Ya, I'm definitely in favor of that.  Even if Sashiko didn't find anything, I
> think I'd want to grab the GUEST_USES_PFN stuff separately.

Cool. Then I'll focus on kvmclock and VSM stuff for now, and come back
to the GPC-nesting fun later. The basic GPC SRCU patches 1-9 in my tree
are still identical to what was posted in this thread, and what I've
been torture-testing all along:

https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/gpc-srcu-v2-part1

Carsten Stollmaier (1):
      KVM: x86: Use gfn_to_pfn_cache for steal time / preempted status

David Woodhouse (5):
      KVM: x86/xen: Fill the hypercall page with a single guest write
      KVM: x86/xen: Add KVM_XEN_VCPU_ATTR_TYPE_WRITE_HYPERCALL_PAGE
      KVM: x86: Request the guest TLB flush from record_steal_time()
      KVM: selftests: Actually deactivate the HVA-based shared_info cache in xen_shinfo_test
      KVM: pfncache: Use atomic SRCU for readers instead of a rwlock

Sean Christopherson (3):
      KVM: x86/xen: Extract delivery of event to vCPU into a separate helper
      KVM: x86/xen: Explicitly tag "shared info" page as never being dirty tracked
      KVM: x86/xen: Don't dirty track "vCPU info" page


 Documentation/virt/kvm/api.rst                    |  27 +-
 arch/x86/include/asm/kvm_host.h                   |   2 +-
 arch/x86/include/uapi/asm/kvm.h                   |   3 +
 arch/x86/kvm/msrs.c                               |   7 +-
 arch/x86/kvm/x86.c                                | 165 ++++----
 arch/x86/kvm/xen.c                                | 380 ++++++++++-------
 include/linux/kvm_host.h                          |  41 +-
 include/linux/kvm_types.h                         |  38 +-
 include/linux/srcu.h                              |   7 +
 tools/testing/selftests/kvm/x86/xen_shinfo_test.c |   2 +-
 tools/testing/selftests/kvm/x86/xen_vmcall_test.c | 118 ++++++
 virt/kvm/kvm_main.c                               |   9 +
 virt/kvm/pfncache.c                               | 485 +++++++++++++++++-----
 13 files changed, 944 insertions(+), 340 deletions(-)




[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6179 bytes --]

      reply	other threads:[~2026-11-11 18:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  2:00 David Woodhouse
2026-11-05  2:00 ` [PATCH v2 01/20] KVM: x86/xen: Fill the hypercall page with a single guest write David Woodhouse
2026-11-05  2:00 ` [PATCH v2 02/20] KVM: x86/xen: Add KVM_XEN_VCPU_ATTR_TYPE_WRITE_HYPERCALL_PAGE David Woodhouse
2026-11-05  2:00 ` [PATCH v2 03/20] KVM: x86/xen: Extract delivery of event to vCPU into a separate helper David Woodhouse
2026-11-05  2:00 ` [PATCH v2 04/20] KVM: x86/xen: Explicitly tag "shared info" page as never being dirty tracked David Woodhouse
2026-11-05  2:00 ` [PATCH v2 05/20] KVM: x86/xen: Don't dirty track "vCPU info" page David Woodhouse
2026-11-05  2:00 ` [PATCH v2 06/20] KVM: x86: Request the guest TLB flush from record_steal_time() David Woodhouse
2026-11-10 20:19   ` Sean Christopherson
2026-11-10 21:14     ` David Woodhouse
2026-11-05  2:00 ` [PATCH v2 07/20] KVM: selftests: Actually deactivate the HVA-based shared_info cache in xen_shinfo_test David Woodhouse
2026-11-05  2:00 ` [PATCH v2 08/20] KVM: pfncache: Use atomic SRCU for readers instead of a rwlock David Woodhouse
2026-11-05  2:00 ` [PATCH v2 09/20] KVM: x86: Use gfn_to_pfn_cache for steal time / preempted status David Woodhouse
2026-11-05  2:00 ` [PATCH v2 10/20] KVM: pfncache: Add guest-mode pinning (GUEST_USES_PFN successor) David Woodhouse
2026-11-05  2:29   ` sashiko-bot
2026-11-05  2:00 ` [PATCH v2 11/20] KVM: nVMX: Implement cache for L1 MSR bitmap David Woodhouse
2026-11-05  2:00 ` [PATCH v2 12/20] KVM: nVMX: Use pinned pfncache for L1 APIC virtualization pages David Woodhouse
2026-11-05  2:33   ` sashiko-bot
2026-11-05  2:00 ` [PATCH v2 13/20] KVM: x86: Post KVM_REQ_GET_NESTED_STATE_PAGES on memslot updates David Woodhouse
2026-11-05  2:00 ` [PATCH v2 14/20] KVM: selftests: Add nested VMX APIC cache invalidation test David Woodhouse
2026-11-05  2:25   ` sashiko-bot
2026-11-05  2:00 ` [PATCH v2 15/20] KVM: nSVM: Use a gfn_to_pfn_cache for the vmcb12 page David Woodhouse
2026-11-05  2:00 ` [PATCH v2 16/20] KVM: nSVM: Cache L1's MSR permissions map pages David Woodhouse
2026-11-05  2:00 ` [PATCH v2 17/20] KVM: nSVM: Cache L1's IO " David Woodhouse
2026-11-05  2:01 ` [PATCH v2 18/20] KVM: selftests: Add nested transition benchmark David Woodhouse
2026-11-05  2:01 ` [PATCH v2 19/20] KVM: selftests: Add Xen evtchn vs memslot-update race test David Woodhouse
2026-11-05  2:01 ` [PATCH v2 20/20] KVM: selftests: Add Xen evtchn vs mmu_notifier race test for HVA caches David Woodhouse
2026-11-05  2:28   ` sashiko-bot
2026-11-10 19:52 ` [PATCH v2 00/20] KVM: Use atomic SRCU for gfn-to-pfn cache, reinstate guest mode for x86 nesting David Woodhouse
2026-11-10 20:14   ` Sean Christopherson
2026-11-11 18:38     ` David Woodhouse [this message]

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=07358e4fcd606c8dece26dff21443bd61087f0c9.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=fgriffo@amazon.co.uk \
    --cc=kunwu.chan@gmail.com \
    --cc=kunwu.chan@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=paul@xen.org \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rcu@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=syzbot+208f7f3e5f59c11aeb90@syzkaller.appspotmail.com \
    --cc=vkuznets@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

all inboxes | Powered by JetHome®