]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
pci: rename virPCIDeviceGetVFIOGroupDev to virPCIDeviceGetIOMMUGroupDev
authorLaine Stump <laine@laine.org>
Fri, 14 Jun 2013 20:18:44 +0000 (16:18 -0400)
committerLaine Stump <laine@laine.org>
Tue, 25 Jun 2013 22:07:38 +0000 (18:07 -0400)
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
src/qemu/qemu_cgroup.c
src/security/security_apparmor.c
src/security/security_dac.c
src/security/security_selinux.c
src/util/virpci.c
src/util/virpci.h

index 967f15a2a6ef7d28bb3ebfa37f5213431b9a72c1..bad3947445a8595b7ec52f2433924f1ecccba163 100644 (file)
@@ -1698,6 +1698,7 @@ virPCIDeviceCopy;
 virPCIDeviceDetach;
 virPCIDeviceFileIterate;
 virPCIDeviceFree;
+virPCIDeviceGetIOMMUGroupDev;
 virPCIDeviceGetManaged;
 virPCIDeviceGetName;
 virPCIDeviceGetRemoveSlot;
@@ -1705,7 +1706,6 @@ virPCIDeviceGetReprobe;
 virPCIDeviceGetStubDriver;
 virPCIDeviceGetUnbindFromStub;
 virPCIDeviceGetUsedBy;
-virPCIDeviceGetVFIOGroupDev;
 virPCIDeviceIsAssignable;
 virPCIDeviceListAdd;
 virPCIDeviceListCount;
index cf46993b2c72d81ad69f845755a8ea7b0e2baca2..5f54ca650fd59a33e81f3852326d64ad86a2355e 100644 (file)
@@ -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);
index 87c27771d5f5da0fb60b3516d86e7b7a72c33d2b..50b0e7413825f788848b321410f1c71a37e783ce 100644 (file)
@@ -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);
index b8d1a9209edfdc43f2cb6250a9b56757282ee19e..0d6defc357bcefcccbcb95234586ed848034836d 100644 (file)
@@ -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);
index 6fe063eb03986060a1fedc6f6473a367293d6b6e..7802ddaa25b75324ec4320becee74ddc6d446405 100644 (file)
@@ -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);
index 2980e22d3ee57deb7d068ace7b642f725ec3638e..51fad784fd6870074e779c492675e94b54b6d6e0 100644 (file)
@@ -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;
index 944aa09db4615a34431f73a729a75fb9676ad1d8..89717b828d7442afdea8cbca7f0da2e036662f27 100644 (file)
@@ -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);