• L
    pci: new iommu_group functions · 72c029d8
    Laine Stump 提交于
    Any device which belongs to an "IOMMU group" (used by vfio) will
    have links to all devices of its group listed in
    /sys/bus/pci/$device/iommu_group/devices;
    /sys/bus/pci/$device/iommu_group is actually a link to
    /sys/kernel/iommu_groups/$n, where $n is the group number (there
    will be a corresponding device node at /dev/vfio/$n once the
    devices are bound to the vfio-pci driver)
    
    The following functions are added:
    
    virPCIDeviceGetIOMMUGroupList
    
      Gets a virPCIDeviceList with one virPCIDeviceList for each device
      in the same IOMMU group as the provided virPCIDevice (a copy of the
      original device object is included in the list.
    
    virPCIDeviceAddressIOMMUGroupIterate
    
      Calls the function @actor once for each device in the group that
      contains the given virPCIDeviceAddress.
    
    virPCIDeviceAddressGetIOMMUGroupAddresses
    
      Fills in a virPCIDeviceAddressPtr * with an array of
      virPCIDeviceAddress, one for each device in the iommu group of the
      provided virPCIDeviceAddress (including a copy of the original).
    
    virPCIDeviceAddressGetIOMMUGroupNum
    
      Returns the group number as an int (a valid group number will always
      be 0 or greater).  If there is no iommu_group link in the device's
      directory (usually indicating that vfio isn't loaded), -2 will be
      returned. On any real error, -1 will be returned.
    72c029d8
libvirt_private.syms 46.4 KB