]> git.ipfire.org Git - thirdparty/linux.git/commit
vfio/pci: Share the core device pointer while invoking feature functions
authorVivek Kasireddy <vivek.kasireddy@intel.com>
Thu, 20 Nov 2025 09:28:27 +0000 (11:28 +0200)
committerAlex Williamson <alex@shazbot.org>
Thu, 20 Nov 2025 19:02:40 +0000 (12:02 -0700)
commit47d13c939d89d348966857b24bb15092398ed8bb
tree20440e5ba585721819fe8e393c27d0b7b5dab9a7
parent64a5dedcff801072154a806102d731ecdf0e7552
vfio/pci: Share the core device pointer while invoking feature functions

There is no need to share the main device pointer (struct vfio_device *)
with all the feature functions as they only need the core device
pointer. Therefore, extract the core device pointer once in the
caller (vfio_pci_core_ioctl_feature) and share it instead.

Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Alex Mastro <amastro@fb.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Ankit Agrawal <ankita@nvidia.com>
Link: https://lore.kernel.org/r/20251120-dmabuf-vfio-v9-8-d7f71607f371@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/vfio_pci_core.c