Commit Graph

8 Commits

Author SHA1 Message Date
Christopher Desiniotis
066d8f30bc Allow options to be passed when creating an instance of the nvpci interface
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2023-06-09 17:27:31 -07:00
Evan Lezar
e96d9c58f1 Add GetGPUByPciBusID to nvpci.Interface
This change adds a GetGPUByPciBusID method to the nvpci Interface.
The exising NewDevice function is moved to nvmdev where it is used.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-15 17:42:22 +01:00
Christopher Desiniotis
bccac280ca nvmdev: Add GetPhysicalFunction() for both Device and ParentDevice
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-08-25 09:35:11 -07:00
Christopher Desiniotis
f52cd402a1 Detect iommu_group for PCI and mdev devices 2022-07-25 23:20:03 +00:00
Christopher Desiniotis
8209652159 Detect driver bound to mdev devices
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 13:11:01 -07:00
Christopher Desiniotis
805db5afa8 Refactor how mdev's are represented internally in nvmdev.
The 'mdev' string now represents the absolute path to an
mdev device (/sys/bus/pci/devices/<addr>/<uuid>) instead
of the  mdev_type directory for the mdev device
(/sys/bus/pci/devices/<addr>/mdev_supported_types/<mdev-type>).
This is more intuitive and will make it easier to get
more information about a particular mdev device -
like the driver or iommu_group it belongs to - which can
be found at /sys/bus/pci/devices/<addr>/<uuid>.

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 13:00:06 -07:00
Christopher Desiniotis
e2d858daed Use 'os' instead of 'ioutil' which is recommended starting with Go 1.16
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-07 13:43:11 -07:00
Christopher Desiniotis
505f83b943 Add nvmdev package for mdev (vGPU) devices 2022-05-25 16:34:29 +00:00