From 1d829e13068e7ff189ac99a702b71cf9e5836aa3 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Fri, 14 Jun 2013 16:18:44 -0400 Subject: [PATCH] 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. --- src/libvirt_private.syms | 2 +- src/qemu/qemu_cgroup.c | 4 ++-- src/security/security_apparmor.c | 2 +- src/security/security_dac.c | 4 ++-- src/security/security_selinux.c | 4 ++-- src/util/virpci.c | 6 +++--- src/util/virpci.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 967f15a2a6..bad3947445 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1698,6 +1698,7 @@ virPCIDeviceCopy; virPCIDeviceDetach; virPCIDeviceFileIterate; virPCIDeviceFree; +virPCIDeviceGetIOMMUGroupDev; virPCIDeviceGetManaged; virPCIDeviceGetName; virPCIDeviceGetRemoveSlot; @@ -1705,7 +1706,6 @@ virPCIDeviceGetReprobe; virPCIDeviceGetStubDriver; virPCIDeviceGetUnbindFromStub; virPCIDeviceGetUsedBy; -virPCIDeviceGetVFIOGroupDev; virPCIDeviceIsAssignable; virPCIDeviceListAdd; virPCIDeviceListCount; diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index cf46993b2c..5f54ca650f 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -277,7 +277,7 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm, if (!pci) goto cleanup; - if (!(path = virPCIDeviceGetVFIOGroupDev(pci))) + if (!(path = virPCIDeviceGetIOMMUGroupDev(pci))) goto cleanup; VIR_DEBUG("Cgroup allow %s for PCI device assignment", path); @@ -376,7 +376,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm, if (!pci) goto cleanup; - if (!(path = virPCIDeviceGetVFIOGroupDev(pci))) + if (!(path = virPCIDeviceGetIOMMUGroupDev(pci))) goto cleanup; VIR_DEBUG("Cgroup deny %s for PCI device assignment", path); diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 87c27771d5..50b0e74138 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -823,7 +823,7 @@ AppArmorSetSecurityHostdevLabel(virSecurityManagerPtr mgr, if (dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { - char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); + char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci); if (!vfioGroupDev) { virPCIDeviceFree(pci); diff --git a/src/security/security_dac.c b/src/security/security_dac.c index b8d1a9209e..0d6defc357 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -529,7 +529,7 @@ virSecurityDACSetSecurityHostdevLabel(virSecurityManagerPtr mgr, if (dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { - char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); + char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci); if (!vfioGroupDev) { virPCIDeviceFree(pci); @@ -648,7 +648,7 @@ virSecurityDACRestoreSecurityHostdevLabel(virSecurityManagerPtr mgr, if (dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { - char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); + char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci); if (!vfioGroupDev) { virPCIDeviceFree(pci); diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 6fe063eb03..7802ddaa25 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1333,7 +1333,7 @@ virSecuritySELinuxSetSecurityHostdevSubsysLabel(virDomainDefPtr def, if (dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { - char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); + char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci); if (!vfioGroupDev) { virPCIDeviceFree(pci); @@ -1528,7 +1528,7 @@ virSecuritySELinuxRestoreSecurityHostdevSubsysLabel(virSecurityManagerPtr mgr, if (dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { - char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); + char *vfioGroupDev = virPCIDeviceGetIOMMUGroupDev(pci); if (!vfioGroupDev) { virPCIDeviceFree(pci); diff --git a/src/util/virpci.c b/src/util/virpci.c index 2980e22d3e..51fad784fd 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1852,11 +1852,11 @@ cleanup: return ret; } -/* virPCIDeviceGetVFIOGroupDev - return the name of the device used to - * control this PCI device's group (e.g. "/dev/vfio/15") +/* virPCIDeviceGetIOMMUGroupDev - return the name of the device used + * to control this PCI device's group (e.g. "/dev/vfio/15") */ char * -virPCIDeviceGetVFIOGroupDev(virPCIDevicePtr dev) +virPCIDeviceGetIOMMUGroupDev(virPCIDevicePtr dev) { char *devPath = NULL; char *groupPath = NULL; diff --git a/src/util/virpci.h b/src/util/virpci.h index 944aa09db4..89717b828d 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -117,7 +117,7 @@ int virPCIDeviceFileIterate(virPCIDevicePtr dev, virPCIDeviceFileActor actor, void *opaque); char * -virPCIDeviceGetVFIOGroupDev(virPCIDevicePtr dev); +virPCIDeviceGetIOMMUGroupDev(virPCIDevicePtr dev); int virPCIDeviceIsAssignable(virPCIDevicePtr dev, int strict_acs_check); -- GitLab