]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 11 May 2022 19:19:07 +0000 (13:19 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:42:01 +0000 (14:42 +0200)
commit2ae854537a93cf6c6797e9762eab4184f7d79324
tree3b8344d1710af25059d858ee32b0d926aeec1deb
parent8bfde97fb1fe2f1893014de526c34cf406377c22
vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata

[ Upstream commit 91be0bd6c6cf21328017e990d3ceeb00f03821fd ]

Having a consistent pointer in the drvdata will allow the next patch to
make use of the drvdata from some of the core code helpers.

Use a WARN_ON inside vfio_pci_core_register_device() to detect drivers
that miss this.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v4-c841817a0349+8f-vfio_get_from_dev_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
drivers/vfio/pci/mlx5/main.c
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_core.c