public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Break up ioctl dispatch functions to one function per ioctl
@ 2022-08-17 16:07 Jason Gunthorpe
  2022-08-17 16:07 ` [PATCH 1/8] vfio-pci: Fix vfio_pci_ioeventfd() to return int Jason Gunthorpe
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Jason Gunthorpe @ 2022-08-17 16:07 UTC (permalink / raw)
  To: Alex Williamson, Cornelia Huck, kvm, llvm, Nathan Chancellor,
	Nick Desaulniers, Tom Rix

Move ioctl dispatch functions for the group FD and PCI to follow a common
pattern:

 - One function per ioctl
 - Function name has 'ioctl' in it
 - Function takes in a __user pointer of the correct type

At least PCI has grown its single ioctl function to over 500 lines and
needs splitting. Group is split up in the same style to make some coming
patches more understandable.

This is based on the "Remove private items from linux/vfio_pci_core.h"
series as it has a minor conflict with it.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Jason Gunthorpe (8):
  vfio-pci: Fix vfio_pci_ioeventfd() to return int
  vfio-pci: Break up vfio_pci_core_ioctl() into one function per ioctl
  vfio-pci: Re-indent what was vfio_pci_core_ioctl()
  vfio-pci: Replace 'void __user *' with proper types in the ioctl
    functions
  vfio: Fold VFIO_GROUP_GET_DEVICE_FD into vfio_group_get_device_fd()
  vfio: Fold VFIO_GROUP_SET_CONTAINER into vfio_group_set_container()
  vfio: Follow the naming pattern for vfio_group_ioctl_unset_container()
  vfio: Split VFIO_GROUP_GET_STATUS into a function

 drivers/vfio/pci/vfio_pci_core.c | 800 ++++++++++++++++---------------
 drivers/vfio/pci/vfio_pci_priv.h |   4 +-
 drivers/vfio/pci/vfio_pci_rdwr.c |   4 +-
 drivers/vfio/vfio_main.c         | 134 +++---
 4 files changed, 480 insertions(+), 462 deletions(-)


base-commit: 05fe7731dbd13f719c8be83e9ad6d6a7b119d301
-- 
2.37.2


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

end of thread, other threads:[~2022-08-31 17:48 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-17 16:07 [PATCH 0/8] Break up ioctl dispatch functions to one function per ioctl Jason Gunthorpe
2022-08-17 16:07 ` [PATCH 1/8] vfio-pci: Fix vfio_pci_ioeventfd() to return int Jason Gunthorpe
2022-08-29  0:30   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 2/8] vfio-pci: Break up vfio_pci_core_ioctl() into one function per ioctl Jason Gunthorpe
2022-08-29  0:31   ` Tian, Kevin
2022-08-29  0:37   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 3/8] vfio-pci: Re-indent what was vfio_pci_core_ioctl() Jason Gunthorpe
2022-08-29  0:32   ` Tian, Kevin
2022-08-29  0:37   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 4/8] vfio-pci: Replace 'void __user *' with proper types in the ioctl functions Jason Gunthorpe
2022-08-29  0:35   ` Tian, Kevin
2022-08-29  0:38   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 5/8] vfio: Fold VFIO_GROUP_GET_DEVICE_FD into vfio_group_get_device_fd() Jason Gunthorpe
2022-08-29  0:36   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 6/8] vfio: Fold VFIO_GROUP_SET_CONTAINER into vfio_group_set_container() Jason Gunthorpe
2022-08-29  0:39   ` Tian, Kevin
2022-08-17 16:07 ` [PATCH 7/8] vfio: Follow the naming pattern for vfio_group_ioctl_unset_container() Jason Gunthorpe
2022-08-29  0:41   ` Tian, Kevin
2022-08-29 15:28     ` Jason Gunthorpe
2022-08-30 16:42       ` Alex Williamson
2022-08-30 16:51         ` Jason Gunthorpe
2022-08-31 17:48           ` Alex Williamson
2022-08-17 16:07 ` [PATCH 8/8] vfio: Split VFIO_GROUP_GET_STATUS into a function Jason Gunthorpe
2022-08-26 23:43   ` Jason Gunthorpe
2022-08-30 16:43     ` Alex Williamson
2022-08-29  0:43   ` Tian, Kevin

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