Skip to content

RFC Document synchronization used in managing guest faults

Ackerley Tng b4-sent kvm linux-doc lkml loongarch 1 version In review

Get series with b4
b4 am [email protected] change-id 20260527-kvm-locking-docs-3c6dee0fabce

Versions newest first

  1. v1 RFC Latest12 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12Documentation: KVM: Elaborate comment on kvm_usage_lockDocumentation/virt/kvm/locking.rst+17 -21 reply
2/12Documentation: KVM: Consolidate notes about cpu_read_lock() and kvm_lockDocumentation/virt/kvm/locking.rst+5 -71 reply
3/12Documentation: KVM: Consolidate notes about kvm->slots_lock and irq_lockDocumentation/virt/kvm/locking.rst+2 -31 reply
4/12Documentation: KVM: Turn - into bullet pointDocumentation/virt/kvm/locking.rst+1 -10 replies
5/12Documentation: KVM: Explain what rule the exception section is meant forDocumentation/virt/kvm/locking.rst+4 -00 replies
6/12Documentation: KVM: Have actual headings for exceptionsDocumentation/virt/kvm/locking.rst+4 -20 replies
7/12Documentation: KVM: Drop mention of kvm->lock in SRCU documentationDocumentation/virt/kvm/locking.rst+2 -21 reply
8/12Documentation: KVM: Add example for kvm->srcu in relation to mutex/lockDocumentation/virt/kvm/locking.rst+6 -31 reply
9/12Documentation: KVM: Document synchronization for managing guest faultsDocumentation/virt/kvm/locking.rst+108 -00 replies
10/12KVM: guest_memfd: Clarify comment about gmem.file vs kvm->srcuvirt/kvm/guest_memfd.c+7 -21 reply
11/12KVM: mmu: Point users of host_pfn_mapping_level() to docsarch/loongarch/kvm/mmu.c arch/x86/kvm/mmu/mmu.c+8 -401 reply
12/12Documentation: KVM: Focus acquisition order section on preventing deadlocksDocumentation/virt/kvm/locking.rst+3 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 00/12] Document synchronization used in managing guest faults

In [1], Sean suggested consolidating comments for some functions.

While trying to consolidate comments, I read up more about synchronization used in managing guest faults and put together some updates for Documentation/virt/kvm/locking.rst, including some fixes to the current content.

I'm generalizing the kinds of functions Sean was referring to as "documentation for functions that depend on derived information from GFNs", and kvm_gmem_get_memory_attributes() from the conversion series [1] will also point to the documentation that is updated in this patch series.

[1] https://lore.kernel.org/all/[email protected]/

---
Ackerley Tng (12):
Documentation: KVM: Elaborate comment on kvm_usage_lock
Documentation: KVM: Consolidate notes about cpu_read_lock() and kvm_lock
Documentation: KVM: Consolidate notes about kvm->slots_lock and irq_lock
Documentation: KVM: Turn - into bullet point
Documentation: KVM: Explain what rule the exception section is meant for
Documentation: KVM: Have actual headings for exceptions
Documentation: KVM: Drop mention of kvm->lock in SRCU documentation
Documentation: KVM: Add example for kvm->srcu in relation to mutex/lock
Documentation: KVM: Document synchronization for managing guest faults
KVM: guest_memfd: Clarify comment about gmem.file vs kvm->srcu
KVM: mmu: Point users of host_pfn_mapping_level() to docs
Documentation: KVM: Focus acquisition order section on preventing deadlocks

 Documentation/virt/kvm/locking.rst | 173 ++++++++++++++++++++++++++++++++-----
 arch/loongarch/kvm/mmu.c           |  24 +----
 arch/x86/kvm/mmu/mmu.c             |  24 +----
 virt/kvm/guest_memfd.c             |   9 +-
 4 files changed, 165 insertions(+), 65 deletions(-)

---
base-commit: b7fbe9a1bf9ee6c967ef77d366ca58c35fcf1887
change-id: 20260527-kvm-locking-docs-3c6dee0fabce

Best regards,
--
Ackerley Tng <[email protected]>