linux/virt/kvm
Sean Christopherson 422eeb543a KVM: Put mm immediately after async #PF worker completes remote gup()
Put the async #PF worker's reference to the VM's address space as soon as
the worker is done with the mm.  This will allow deferring getting a
reference to the worker itself without having to track whether or not
getting a reference succeeded.

Note, if the vCPU is still alive, there is no danger of the worker getting
stuck with tearing down the host page tables, as userspace also holds a
reference (obviously), i.e. there is no risk of delaying the page-present
notification due to triggering the slow path in mmput().

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20240110011533.503302-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-02-06 11:04:10 -08:00
..
async_pf.c KVM: Put mm immediately after async #PF worker completes remote gup() 2024-02-06 11:04:10 -08:00
async_pf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
binary_stats.c KVM: stats: remove dead stores 2021-08-13 03:35:15 -04:00
coalesced_mmio.c KVM: destruct kvm_io_device while unregistering it from kvm_io_bus 2023-06-13 14:18:09 -07:00
coalesced_mmio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dirty_ring.c KVM: Allow arch code to track number of memslot address spaces per VM 2023-11-14 08:01:05 -05:00
eventfd.c Generic: 2024-01-17 13:03:37 -08:00
guest_memfd.c Generic: 2024-01-17 13:03:37 -08:00
irqchip.c KVM: replace direct irq.h inclusion 2022-11-09 12:31:37 -05:00
Kconfig KVM: fix direction of dependency on MMU notifiers 2024-01-08 08:09:38 -05:00
kvm_main.c Common KVM changes for 6.8: 2024-01-08 08:09:57 -05:00
kvm_mm.h KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory 2023-11-14 08:01:03 -05:00
Makefile.kvm KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory 2023-11-14 08:01:03 -05:00
pfncache.c KVM: Skip unnecessary "unmap" if gpc is already valid during refresh 2022-11-30 19:25:24 +00:00
vfio.c kvm/vfio: avoid bouncing the mutex when adding and deleting groups 2023-08-03 12:01:56 -06:00
vfio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00