From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Satish Kharat <satishkh@cisco.com>,
Sashiko Bot <sashiko-bot@kernel.org>,
Oliver Upton <oupton@kernel.org>, Marc Zyngier <maz@kernel.org>
Subject: [PATCH v2 0/6] KVM: Send reschedule IPIs for non-waiting requests
Date: Thu, 19 Nov 2026 15:56:50 -0800 [thread overview]
Message-ID: <20261119235656.70315-1-seanjc@google.com> (raw)
My apologies to the s390 folks for dragging you into KVM's mess. Y'all are
Cc'd because I want to use smp_send_reschedule() to fix a KVM bug, and KVM
can be built as a module on s390. I'm hoping to get an Ack on patch 1,
definitely feel free to ignore the rest.
For the KVM changes, fix two bugs with using the SMP function call framework,
by switching to smp_send_reschedule() for non-waiting requests:
1. Making SMP function calls with IRQs disable can lead to deadlock.
2. Batching IPIs for SMP function calls using the per-CPU cpumask can corrupt
the mask if KVM kicks CPUs from hard IRQ context, as arm64 does when
handling KVM_IRQFD signals.
Sean Christopherson (6):
s390/smp: Export arch_smp_send_reschedule() for KVM
KVM: Add struct and helpers to handle kicking multiple (v)CPUs
KVM: Add dedicated flag to track if multi-vCPU request needs at least
one kick
KVM: Don't kick offline CPUs when making a multi-vCPU request
KVM: Send reschedule IPIs instead of SMP function calls for
non-waiting requests
KVM: Extract and dedup the kick code to check if a CPU needs an IPI
arch/s390/kernel/smp.c | 1 +
virt/kvm/kvm_main.c | 101 ++++++++++++++++++++++++-----------------
2 files changed, 61 insertions(+), 41 deletions(-)
base-commit: d21eef2084a9af87ac2a783bc7c2b175ba114e4e
--
2.56.1.708.g77570a6a1d-goog
next reply other threads:[~2026-11-19 23:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 23:56 Sean Christopherson [this message]
2026-11-19 23:56 ` [PATCH v2 1/6] s390/smp: Export arch_smp_send_reschedule() for KVM Sean Christopherson
2026-11-19 23:56 ` [PATCH v2 2/6] KVM: Add struct and helpers to handle kicking multiple (v)CPUs Sean Christopherson
2026-11-19 23:56 ` [PATCH v2 3/6] KVM: Add dedicated flag to track if multi-vCPU request needs at least one kick Sean Christopherson
2026-11-19 23:56 ` [PATCH v2 4/6] KVM: Don't kick offline CPUs when making a multi-vCPU request Sean Christopherson
2026-11-19 23:56 ` [PATCH v2 5/6] KVM: Send reschedule IPIs instead of SMP function calls for non-waiting requests Sean Christopherson
2026-11-19 23:56 ` [PATCH v2 6/6] KVM: Extract and dedup the kick code to check if a CPU needs an IPI 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=20261119235656.70315-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=satishkh@cisco.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®