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: Async #PF changes for 6.9
Date: Fri, 8 Mar 2024 14:36:54 -0800 [thread overview]
Message-ID: <20240308223702.1350851-2-seanjc@google.com> (raw)
In-Reply-To: <20240308223702.1350851-1-seanjc@google.com>
Fix a long-standing bug in the async #PF code where KVM code could be left
running in a workqueue even after all *external* references to KVM-the-module
have been put, and a few minor cleanups on top.
The following changes since commit 41bccc98fb7931d63d03f326a746ac4d429c1dd3:
Linux 6.8-rc2 (2024-01-28 17:01:12 -0800)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-asyncpf-6.9
for you to fetch changes up to c2744ed2230a92636f04cde48f2f7d8d3486e194:
KVM: Nullify async #PF worker's "apf" pointer as soon as it might be freed (2024-02-06 11:04:58 -0800)
----------------------------------------------------------------
KVM async page fault changes for 6.9:
- Always flush the async page fault workqueue when a work item is being
removed, especially during vCPU destruction, to ensure that there are no
workers running in KVM code when all references to KVM-the-module are gone,
i.e. to prevent a use-after-free if kvm.ko is unloaded.
- Grab a reference to the VM's mm_struct in the async #PF worker itself instead
of gifting the worker a reference, e.g. so that there's no need to remember
to *conditionally* clean up after the worker.
----------------------------------------------------------------
Sean Christopherson (4):
KVM: Always flush async #PF workqueue when vCPU is being destroyed
KVM: Put mm immediately after async #PF worker completes remote gup()
KVM: Get reference to VM's address space in the async #PF worker
KVM: Nullify async #PF worker's "apf" pointer as soon as it might be freed
include/linux/kvm_host.h | 1 -
virt/kvm/async_pf.c | 73 ++++++++++++++++++++++++++++++++----------------
2 files changed, 49 insertions(+), 25 deletions(-)
next prev parent reply other threads:[~2024-03-08 22:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 22:36 [GIT PULL] KVM: x86 pull requests for 6.9 Sean Christopherson
2024-03-08 22:36 ` Sean Christopherson [this message]
2024-03-11 14:23 ` [GIT PULL] KVM: Async #PF changes " Paolo Bonzini
2024-03-08 22:36 ` [GIT PULL] KVM: Common MMU " Sean Christopherson
2024-03-11 14:23 ` Paolo Bonzini
2024-03-08 22:36 ` [GIT PULL] KVM: x86: Misc " Sean Christopherson
2024-03-11 14:28 ` Paolo Bonzini
2024-03-08 22:36 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2024-03-11 14:30 ` Paolo Bonzini
2024-03-14 18:31 ` Paolo Bonzini
2024-03-14 18:38 ` Sean Christopherson
2024-03-14 18:43 ` Paolo Bonzini
2024-03-08 22:36 ` [GIT PULL] KVM: x86: PMU " Sean Christopherson
2024-03-11 14:40 ` Paolo Bonzini
2024-03-08 22:36 ` [GIT PULL] KVM: x86: Selftests " Sean Christopherson
2024-03-11 14:21 ` Paolo Bonzini
2024-03-11 14:35 ` Paolo Bonzini
2024-03-12 23:00 ` Sean Christopherson
2024-03-14 18:40 ` Sean Christopherson
2024-03-08 22:37 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
2024-03-11 14:42 ` Paolo Bonzini
2024-03-08 22:37 ` [GIT PULL] KVM: Xen and gfn_to_pfn_cache " Sean Christopherson
2024-03-11 14:02 ` Janosch Frank
2024-03-11 14:43 ` 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=20240308223702.1350851-2-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