vfio/pds: register with the pds_core PF
authorBrett Creeley <brett.creeley@amd.com>
Mon, 7 Aug 2023 20:57:51 +0000 (13:57 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 16 Aug 2023 16:53:20 +0000 (10:53 -0600)
commit63f77a7161a2df9924eea9be3b6c63be10151252
tree399103fd5310a959d3121564f2cacb93d984c8fc
parentb021d05e106e14b603a584b38ce62720e7d0f363
vfio/pds: register with the pds_core PF

The pds_core driver will supply adminq services, so find the PF
and register with the DSC services.

Use the following commands to enable a VF:
echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230807205755.29579-5-brett.creeley@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/pds/Makefile
drivers/vfio/pci/pds/cmds.c [new file with mode: 0644]
drivers/vfio/pci/pds/cmds.h [new file with mode: 0644]
drivers/vfio/pci/pds/pci_drv.c
drivers/vfio/pci/pds/pci_drv.h [new file with mode: 0644]
drivers/vfio/pci/pds/vfio_dev.c
drivers/vfio/pci/pds/vfio_dev.h
include/linux/pds/pds_common.h