mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
pci: rename virPCIDeviceGetVFIOGroupDev to virPCIDeviceGetIOMMUGroupDev
I realized after the fact that it's probably better in the long run to give this function a name that matches the name of the link used in sysfs to hold the group (iommu_group). I'm changing it now because I'm about to add several more functions that deal with iommu groups.
This commit is contained in:
parent
ee1d1f3b54
commit
1d829e1306
@ -1698,6 +1698,7 @@ virPCIDeviceCopy;
|
|||||||
virPCIDeviceDetach;
|
virPCIDeviceDetach;
|
||||||
virPCIDeviceFileIterate;
|
virPCIDeviceFileIterate;
|
||||||
virPCIDeviceFree;
|
virPCIDeviceFree;
|
||||||
|
virPCIDeviceGetIOMMUGroupDev;
|
||||||
virPCIDeviceGetManaged;
|
virPCIDeviceGetManaged;
|
||||||
virPCIDeviceGetName;
|
virPCIDeviceGetName;
|
||||||
virPCIDeviceGetRemoveSlot;
|
virPCIDeviceGetRemoveSlot;
|
||||||
@ -1705,7 +1706,6 @@ virPCIDeviceGetReprobe;
|
|||||||
virPCIDeviceGetStubDriver;
|
virPCIDeviceGetStubDriver;
|
||||||
virPCIDeviceGetUnbindFromStub;
|
virPCIDeviceGetUnbindFromStub;
|
||||||
virPCIDeviceGetUsedBy;
|
virPCIDeviceGetUsedBy;
|
||||||
virPCIDeviceGetVFIOGroupDev;
|
|
||||||
virPCIDeviceIsAssignable;
|
virPCIDeviceIsAssignable;
|
||||||
virPCIDeviceListAdd;
|
virPCIDeviceListAdd;
|
||||||
virPCIDeviceListCount;
|
virPCIDeviceListCount;
|
||||||
|
@ -277,7 +277,7 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm,
|
|||||||
if (!pci)
|
if (!pci)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(path = virPCIDeviceGetVFIOGroupDev(pci)))
|
if (!(path = virPCIDeviceGetIOMMUGroupDev(pci)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
VIR_DEBUG("Cgroup allow %s for PCI device assignment", path);
|
VIR_DEBUG("Cgroup allow %s for PCI device assignment", path);
|
||||||
@ -376,7 +376,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
|
|||||||
if (!pci)
|
if (!pci)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(path = virPCIDeviceGetVFIOGroupDev(pci)))
|
if (!(path = virPCIDeviceGetIOMMUGroupDev(pci)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
VIR_DEBUG("Cgroup deny %s for PCI device assignment", path);
|
VIR_DEBUG("Cgroup deny %s for PCI device assignment", path);
|
||||||
|
@ -823,7 +823,7 @@ AppArmorSetSecurityHostdevLabel(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
if (dev->source.subsys.u.pci.backend
|
if (dev->source.subsys.u.pci.backend
|
||||||
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||||
char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci);
|
char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci);
|
||||||
|
|
||||||
if (!vfioGroupDev) {
|
if (!vfioGroupDev) {
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
|
@ -529,7 +529,7 @@ virSecurityDACSetSecurityHostdevLabel(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
if (dev->source.subsys.u.pci.backend
|
if (dev->source.subsys.u.pci.backend
|
||||||
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||||
char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci);
|
char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci);
|
||||||
|
|
||||||
if (!vfioGroupDev) {
|
if (!vfioGroupDev) {
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
@ -648,7 +648,7 @@ virSecurityDACRestoreSecurityHostdevLabel(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
if (dev->source.subsys.u.pci.backend
|
if (dev->source.subsys.u.pci.backend
|
||||||
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||||
char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci);
|
char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci);
|
||||||
|
|
||||||
if (!vfioGroupDev) {
|
if (!vfioGroupDev) {
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
|
@ -1333,7 +1333,7 @@ virSecuritySELinuxSetSecurityHostdevSubsysLabel(virDomainDefPtr def,
|
|||||||
|
|
||||||
if (dev->source.subsys.u.pci.backend
|
if (dev->source.subsys.u.pci.backend
|
||||||
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||||
char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci);
|
char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci);
|
||||||
|
|
||||||
if (!vfioGroupDev) {
|
if (!vfioGroupDev) {
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
@ -1528,7 +1528,7 @@ virSecuritySELinuxRestoreSecurityHostdevSubsysLabel(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
if (dev->source.subsys.u.pci.backend
|
if (dev->source.subsys.u.pci.backend
|
||||||
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
== VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||||
char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci);
|
char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci);
|
||||||
|
|
||||||
if (!vfioGroupDev) {
|
if (!vfioGroupDev) {
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
|
@ -1852,11 +1852,11 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virPCIDeviceGetVFIOGroupDev - return the name of the device used to
|
/* virPCIDeviceGetIOMMUGroupDev - return the name of the device used
|
||||||
* control this PCI device's group (e.g. "/dev/vfio/15")
|
* to control this PCI device's group (e.g. "/dev/vfio/15")
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
virPCIDeviceGetVFIOGroupDev(virPCIDevicePtr dev)
|
virPCIDeviceGetIOMMUGroupDev(virPCIDevicePtr dev)
|
||||||
{
|
{
|
||||||
char *devPath = NULL;
|
char *devPath = NULL;
|
||||||
char *groupPath = NULL;
|
char *groupPath = NULL;
|
||||||
|
@ -117,7 +117,7 @@ int virPCIDeviceFileIterate(virPCIDevicePtr dev,
|
|||||||
virPCIDeviceFileActor actor,
|
virPCIDeviceFileActor actor,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
char *
|
char *
|
||||||
virPCIDeviceGetVFIOGroupDev(virPCIDevicePtr dev);
|
virPCIDeviceGetIOMMUGroupDev(virPCIDevicePtr dev);
|
||||||
|
|
||||||
int virPCIDeviceIsAssignable(virPCIDevicePtr dev,
|
int virPCIDeviceIsAssignable(virPCIDevicePtr dev,
|
||||||
int strict_acs_check);
|
int strict_acs_check);
|
||||||
|
Loading…
Reference in New Issue
Block a user