lkml.org 
[lkml]   [2024]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/4] KVM: Async #PF fixes and cleanups
From
On Tue, 09 Jan 2024 17:15:29 -0800, Sean Christopherson wrote:
> Fix a use-after-module-unload bug in the async #PF code by ensuring all
> workqueue items fully complete before tearing down vCPUs. Do a bit of
> cleanup to try and make the code slightly more readable.
>
> Side topic, I'm pretty s390's flic_set_attr() is broken/racy. The async #PF
> code assumes that only the vCPU can invoke
> kvm_clear_async_pf_completion_queue(), as there are multiple assets that
> are effectively protected by vcpu->mutex. I don't any real world VMMs
> trigger the race(s), but AFAICT it's a bug. I think/assume taking all
> vCPUs' mutexes would plug the hole?
>
> [...]

Applied to kvm-x86 asyncpf, with comment tweaks as per Vitaly. Thanks!

[1/4] KVM: Always flush async #PF workqueue when vCPU is being destroyed
https://github.com/kvm-x86/linux/commit/3d75b8aa5c29
[2/4] KVM: Put mm immediately after async #PF worker completes remote gup()
https://github.com/kvm-x86/linux/commit/422eeb543ac9
[3/4] KVM: Get reference to VM's address space in the async #PF worker
https://github.com/kvm-x86/linux/commit/8284765f03b7
[4/4] KVM: Nullify async #PF worker's "apf" pointer as soon as it might be freed
https://github.com/kvm-x86/linux/commit/c2744ed2230a

--
https://github.com/kvm-x86/linux/tree/next

\
 
 \ /
  Last update: 2024-05-27 14:51    [W:1.161 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site