diff options
author | Brett Creeley <brett.creeley@amd.com> | 2023-08-07 22:57:49 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-08-16 18:53:00 +0200 |
commit | 38fe3975b4c2c5eeefb543e09f9620da18b0d069 (patch) | |
tree | ce29ddb93284a18922fe100b29c88e2ed540d628 /drivers/vfio/pci/pds/vfio_dev.h | |
parent | vfio: Commonize combine_ranges for use in other VFIO drivers (diff) | |
download | linux-38fe3975b4c2c5eeefb543e09f9620da18b0d069.tar.xz linux-38fe3975b4c2c5eeefb543e09f9620da18b0d069.zip |
vfio/pds: Initial support for pds VFIO driver
This is the initial framework for the new pds-vfio-pci device driver.
This does the very basics of registering the PDS PCI device and
configuring it as a VFIO PCI device.
With this change, the VF device can be bound to the pds-vfio-pci driver
on the host and presented to the VM as an ethernet VF.
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-3-brett.creeley@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/vfio/pci/pds/vfio_dev.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/vfio/pci/pds/vfio_dev.h b/drivers/vfio/pci/pds/vfio_dev.h new file mode 100644 index 000000000000..a4d4b65778d1 --- /dev/null +++ b/drivers/vfio/pci/pds/vfio_dev.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright(c) 2023 Advanced Micro Devices, Inc. */ + +#ifndef _VFIO_DEV_H_ +#define _VFIO_DEV_H_ + +#include <linux/pci.h> +#include <linux/vfio_pci_core.h> + +struct pds_vfio_pci_device { + struct vfio_pci_core_device vfio_coredev; + + int vf_id; +}; + +const struct vfio_device_ops *pds_vfio_ops_info(void); +struct pds_vfio_pci_device *pds_vfio_pci_drvdata(struct pci_dev *pdev); + +#endif /* _VFIO_DEV_H_ */ |