public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: VFIO: use mutex guards to simplify control flow
@ 2026-03-13 12:20 Carlos López
  2026-03-13 12:20 ` [PATCH 1/4] KVM: VFIO: clean up control flow in kvm_vfio_file_add() Carlos López
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Carlos López @ 2026-03-13 12:20 UTC (permalink / raw)
  To: kvm; +Cc: alex.williamson, pbonzini, Carlos López

Replace several uses of mutex_lock() / mutex_unlock() pairs with mutex
guards, allowing removal of all gotos in virt/kvm/vfio.c.

In this series I also include a small refactor that allows greatly
simplifying kvm_vfio_file_del(), and skipping an unnecessary call to
kvm_vfio_update_coherency() if the list of files managed by the KVM
VFIO device does not change.

Carlos López (4):
  KVM: VFIO: clean up control flow in kvm_vfio_file_add()
  KVM: VFIO: use mutex guard in kvm_vfio_file_set_spapr_tce()
  KVM: VFIO: deduplicate file release logic
  KVM: VFIO: update coherency only if file was deleted

 virt/kvm/vfio.c | 97 ++++++++++++++++++-------------------------------
 1 file changed, 35 insertions(+), 62 deletions(-)


base-commit: d2ea4ff1ce50787a98a3900b3fb1636f3620b7cf
-- 
2.51.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-07  3:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 12:20 [PATCH 0/4] KVM: VFIO: use mutex guards to simplify control flow Carlos López
2026-03-13 12:20 ` [PATCH 1/4] KVM: VFIO: clean up control flow in kvm_vfio_file_add() Carlos López
2026-03-13 12:20 ` [PATCH 2/4] KVM: VFIO: use mutex guard in kvm_vfio_file_set_spapr_tce() Carlos López
2026-04-07  3:48   ` kernel test robot
2026-03-13 12:20 ` [PATCH 3/4] KVM: VFIO: deduplicate file release logic Carlos López
2026-03-13 12:20 ` [PATCH 4/4] KVM: VFIO: update coherency only if file was deleted Carlos López
2026-03-18 20:31 ` [PATCH 0/4] KVM: VFIO: use mutex guards to simplify control flow Alex Williamson
2026-04-03 23:38   ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox