From: Keith Busch <kbusch@meta.com>
To: <pbonzini@redhat.com>, <seanjc@google.com>, <kvm@vger.kernel.org>
Cc: <x86@kernel.org>, <virtualization@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, Keith Busch <kbusch@kernel.org>
Subject: [RFC 0/2] kvm/x86: more huge page recovery fallout
Date: Tue, 25 Feb 2025 18:42:36 -0800 [thread overview]
Message-ID: <20250226024236.1806294-1-kbusch@meta.com> (raw)
From: Keith Busch <kbusch@kernel.org>
Another corner case on the KVM vhost task!
The crosvm VMM might send signals to its threads that have entered
KVM_RUN. The signal specifically is SIGRTRMIN from here:
https://github.com/google/crosvm/blob/main/src/crosvm/sys/linux/vcpu.rs#L651
If this happens to occur when the huge page recovery is trying to create
its vhost task, that will fail with ERESTARTNOINTR. Once this happens,
all KVM_RUN calls will fail with ENOMEM despite memory not being the
problem.
This series propogates the error up so we can distinguish that from the
current defaulting to ENOMEM and replaces the call_once since we need to
be able to call it repeatedly due to this condition.
Keith Busch (2):
vhost: return error instead of NULL on create
kvm: retry nx_huge_page_recovery_thread creation
arch/x86/include/asm/kvm_host.h | 3 +--
arch/x86/kvm/mmu/mmu.c | 25 ++++++++++---------------
arch/x86/kvm/x86.c | 2 +-
drivers/vhost/vhost.c | 2 +-
kernel/vhost_task.c | 4 ++--
5 files changed, 15 insertions(+), 21 deletions(-)
--
2.43.5
reply other threads:[~2025-02-26 2:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250226024236.1806294-1-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=kbusch@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=virtualization@lists.linux.dev \
--cc=x86@kernel.org \
/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®