[libvirt] [PATCH 0/2] VFIO bugfix and naming tweak

Laine Stump (2): network: support <driver name='vfio'/> in network definitions conf: remove extraneous _TYPE from driver backend enums src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 6 +++--- src/conf/network_conf.c | 39 +++++++++++++++++++++++++++++++++- src/conf/network_conf.h | 17 ++++++++++++++- src/network/bridge_driver.c | 23 ++++++++++++++++++++ src/qemu/qemu_command.c | 8 +++---- src/qemu/qemu_hostdev.c | 4 ++-- src/qemu/qemu_hotplug.c | 4 ++-- src/security/security_apparmor.c | 2 +- src/security/security_dac.c | 4 ++-- src/security/security_selinux.c | 4 ++-- tests/networkxml2xmlin/hostdev-pf.xml | 1 + tests/networkxml2xmlout/hostdev-pf.xml | 1 + 13 files changed, 98 insertions(+), 21 deletions(-) -- 1.7.11.7

I remembered to document this bit, but somehow forgot to implement it. This adds <driver name='kvm|vfio'/> as a subelement to the <forward> element of a network (this puts it parallel to the match between mode='hostdev' attribute in a network and type='hostdev' in an <interface>). Since it's already documented, only the parser, formatter, backend driver recognition (it just translates/moves the flag into the <interface> at the appropriate time), and a test case were needed. (I used a separate enum for the values both because the original is defined in domain_conf.h, which is unavailable from network_conf.h, and because in the future it's possible that we may want to support other non-hostdev oriented driver names in the network parser; this makes sure that one can be expanded without the other). --- src/conf/network_conf.c | 39 +++++++++++++++++++++++++++++++++- src/conf/network_conf.h | 17 ++++++++++++++- src/network/bridge_driver.c | 23 ++++++++++++++++++++ tests/networkxml2xmlin/hostdev-pf.xml | 1 + tests/networkxml2xmlout/hostdev-pf.xml | 1 + 5 files changed, 79 insertions(+), 2 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 1c88547..d910a27 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -60,6 +60,12 @@ VIR_ENUM_IMPL(virNetworkForwardHostdevDevice, VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_LAST, "none", "pci", "netdev") +VIR_ENUM_IMPL(virNetworkForwardDriverName, + VIR_NETWORK_FORWARD_DRIVER_NAME_LAST, + "default", + "kvm", + "vfio") + virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets, const unsigned char *uuid) { @@ -1443,6 +1449,7 @@ virNetworkForwardDefParseXML(const char *networkName, int nForwardIfs, nForwardAddrs, nForwardPfs, nForwardNats; char *forwardDev = NULL; char *forwardManaged = NULL; + char *forwardDriverName = NULL; char *type = NULL; xmlNodePtr save = ctxt->node; @@ -1465,6 +1472,21 @@ virNetworkForwardDefParseXML(const char *networkName, def->managed = true; } + forwardDriverName = virXPathString("string(./driver/@name)", ctxt); + if (forwardDriverName) { + int driverName + = virNetworkForwardDriverNameTypeFromString(forwardDriverName); + + if (driverName <= 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unknown forward <driver name='%s'/> " + "in network %s"), + forwardDriverName, networkName); + goto cleanup; + } + def->driverName = driverName; + } + /* bridge and hostdev modes can use a pool of physical interfaces */ nForwardIfs = virXPathNodeSet("./interface", ctxt, &forwardIfNodes); if (nForwardIfs < 0) { @@ -1646,6 +1668,7 @@ cleanup: VIR_FREE(type); VIR_FREE(forwardDev); VIR_FREE(forwardManaged); + VIR_FREE(forwardDriverName); VIR_FREE(forwardPfNodes); VIR_FREE(forwardIfNodes); VIR_FREE(forwardAddrNodes); @@ -2230,10 +2253,24 @@ virNetworkDefFormatInternal(virBufferPtr buf, || VIR_SOCKET_ADDR_VALID(&def->forward.addr.start) || VIR_SOCKET_ADDR_VALID(&def->forward.addr.end) || def->forward.port.start - || def->forward.port.end); + || def->forward.port.end + || (def->forward.driverName + != VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT)); virBufferAsprintf(buf, "%s>\n", shortforward ? "/" : ""); virBufferAdjustIndent(buf, 2); + if (def->forward.driverName + != VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT) { + const char *driverName + = virNetworkForwardDriverNameTypeToString(def->forward.driverName); + if (!driverName) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unexpected hostdev driver name type %d "), + def->forward.driverName); + goto error; + } + virBufferAsprintf(buf, "<driver name='%s'/>\n", driverName); + } if (def->forward.type == VIR_NETWORK_FORWARD_NAT) { if (virNetworkForwardNatDefFormat(buf, &def->forward) < 0) goto error; diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index 163478c..e187f05 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -1,7 +1,7 @@ /* * network_conf.h: network XML handling * - * Copyright (C) 2006-2008, 2012 Red Hat, Inc. + * Copyright (C) 2006-2013 Red Hat, Inc. * Copyright (C) 2006-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -62,6 +62,20 @@ enum virNetworkForwardHostdevDeviceType { VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_LAST, }; +/* The backend driver used for devices from the pool. Currently used + * only for PCI devices (vfio vs. kvm), but could be used for other + * device types in the future. + */ +typedef enum { + VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT, /* kvm now, could change */ + VIR_NETWORK_FORWARD_DRIVER_NAME_KVM, /* force legacy kvm style */ + VIR_NETWORK_FORWARD_DRIVER_NAME_VFIO, /* force vfio */ + + VIR_NETWORK_FORWARD_DRIVER_NAME_LAST +} virNetworkForwardDriverNameType; + +VIR_ENUM_DECL(virNetworkForwardDriverName) + typedef struct _virNetworkDHCPHostDef virNetworkDHCPHostDef; typedef virNetworkDHCPHostDef *virNetworkDHCPHostDefPtr; struct _virNetworkDHCPHostDef { @@ -159,6 +173,7 @@ typedef virNetworkForwardDef *virNetworkForwardDefPtr; struct _virNetworkForwardDef { int type; /* One of virNetworkForwardType constants */ bool managed; /* managed attribute for hostdev mode */ + int driverName; /* enum virNetworkForwardDriverNameType */ /* If there are multiple forward devices (i.e. a pool of * interfaces), they will be listed here. diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 20d1cb0..0c0b356 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3859,6 +3859,8 @@ networkAllocateActualDevice(virDomainNetDefPtr iface) } else if (netdef->forward.type == VIR_NETWORK_FORWARD_HOSTDEV) { + virDomainHostdevSubsysPciBackendType backend; + if (!iface->data.network.actual && (VIR_ALLOC(iface->data.network.actual) < 0)) { virReportOOMError(); @@ -3893,6 +3895,27 @@ networkAllocateActualDevice(virDomainNetDefPtr iface) iface->data.network.actual->data.hostdev.def.source.subsys.type = dev->type; iface->data.network.actual->data.hostdev.def.source.subsys.u.pci.addr = dev->device.pci; + switch (netdef->forward.driverName) + { + case VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT: + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT; + break; + case VIR_NETWORK_FORWARD_DRIVER_NAME_KVM: + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_KVM; + break; + case VIR_NETWORK_FORWARD_DRIVER_NAME_VFIO: + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO; + break; + default: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unrecognized driver name value %d " + " in network '%s'"), + netdef->forward.driverName, netdef->name); + goto error; + } + iface->data.network.actual->data.hostdev.def.source.subsys.u.pci.backend + = backend; + /* merge virtualports from interface, network, and portgroup to * arrive at actual virtualport to use */ diff --git a/tests/networkxml2xmlin/hostdev-pf.xml b/tests/networkxml2xmlin/hostdev-pf.xml index 7bf857d..5b8f598 100644 --- a/tests/networkxml2xmlin/hostdev-pf.xml +++ b/tests/networkxml2xmlin/hostdev-pf.xml @@ -2,6 +2,7 @@ <name>hostdev</name> <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid> <forward mode='hostdev' managed='yes'> + <driver name='vfio'/> <pf dev='eth2'/> </forward> </network> diff --git a/tests/networkxml2xmlout/hostdev-pf.xml b/tests/networkxml2xmlout/hostdev-pf.xml index 7bf857d..5b8f598 100644 --- a/tests/networkxml2xmlout/hostdev-pf.xml +++ b/tests/networkxml2xmlout/hostdev-pf.xml @@ -2,6 +2,7 @@ <name>hostdev</name> <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid> <forward mode='hostdev' managed='yes'> + <driver name='vfio'/> <pf dev='eth2'/> </forward> </network> -- 1.7.11.7

On 04/26/2013 04:35 PM, Laine Stump wrote:
I remembered to document this bit, but somehow forgot to implement it.
Worth including on 1.0.5, to avoid an incomplete feature introduction.
This adds <driver name='kvm|vfio'/> as a subelement to the <forward> element of a network (this puts it parallel to the match between mode='hostdev' attribute in a network and type='hostdev' in an <interface>).
Since it's already documented, only the parser, formatter, backend driver recognition (it just translates/moves the flag into the <interface> at the appropriate time), and a test case were needed.
(I used a separate enum for the values both because the original is defined in domain_conf.h, which is unavailable from network_conf.h, and because in the future it's possible that we may want to support other non-hostdev oriented driver names in the network parser; this makes sure that one can be expanded without the other). --- src/conf/network_conf.c | 39 +++++++++++++++++++++++++++++++++- src/conf/network_conf.h | 17 ++++++++++++++- src/network/bridge_driver.c | 23 ++++++++++++++++++++ tests/networkxml2xmlin/hostdev-pf.xml | 1 + tests/networkxml2xmlout/hostdev-pf.xml | 1 + 5 files changed, 79 insertions(+), 2 deletions(-)
ACK.
+typedef enum { + VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT, /* kvm now, could change */ + VIR_NETWORK_FORWARD_DRIVER_NAME_KVM, /* force legacy kvm style */ + VIR_NETWORK_FORWARD_DRIVER_NAME_VFIO, /* force vfio */
Were you trying to line up comments, or use one space after comma? It ended up not being either. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

This isn't strictly speaking a bugfix, but I realized I'd gotten a bit too verbose when I chose the names for VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_*. This shortens them all a bit. --- src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 6 +++--- src/network/bridge_driver.c | 6 +++--- src/qemu/qemu_command.c | 8 ++++---- src/qemu/qemu_hostdev.c | 4 ++-- src/qemu/qemu_hotplug.c | 4 ++-- src/security/security_apparmor.c | 2 +- src/security/security_dac.c | 4 ++-- src/security/security_selinux.c | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3c6d260..28ae7c3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3744,10 +3744,10 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, if (virDomainHostdevSubsysPciDefParseXML(sourcenode, def, flags) < 0) goto error; - backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT; + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT; if ((backendStr = virXPathString("string(./driver/@name)", ctxt)) && (((backend = virDomainHostdevSubsysPciBackendTypeFromString(backendStr)) < 0) || - backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT)) { + backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown PCI device <driver name='%s'/> " "has been specified"), backendStr); @@ -13846,7 +13846,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, bool includeTypeInAddr) { if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI && - def->source.subsys.u.pci.backend != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT) { + def->source.subsys.u.pci.backend != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT) { const char *backend = virDomainHostdevSubsysPciBackendTypeToString(def->source.subsys.u.pci.backend); if (!backend) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index b2f2815..3a0f23a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -391,9 +391,9 @@ enum virDomainHostdevSubsysType { /* the backend driver used for PCI hostdev devices */ typedef enum { - VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT, /* currently kvm, could change */ - VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_KVM, /* force legacy kvm style */ - VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO, /* force vfio */ + VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT, /* currently kvm, could change */ + VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM, /* force legacy kvm style */ + VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO, /* force vfio */ VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST } virDomainHostdevSubsysPciBackendType; diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 0c0b356..1a81ae3 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3898,13 +3898,13 @@ networkAllocateActualDevice(virDomainNetDefPtr iface) switch (netdef->forward.driverName) { case VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT: - backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_DEFAULT; + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT; break; case VIR_NETWORK_FORWARD_DRIVER_NAME_KVM: - backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_KVM; + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM; break; case VIR_NETWORK_FORWARD_DRIVER_NAME_VFIO: - backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO; + backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO; break; default: virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2ce0672..6390e16 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4346,7 +4346,7 @@ qemuBuildPCIHostdevDevStr(virDomainHostdevDefPtr dev, const char *configfd, virBuffer buf = VIR_BUFFER_INITIALIZER; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { virBufferAddLit(&buf, "vfio-pci"); } else { virBufferAddLit(&buf, "pci-assign"); @@ -7857,7 +7857,7 @@ qemuBuildCommandLine(virConnectPtr conn, } else { if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { if (hostdev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_PCI_BOOTINDEX)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("booting from PCI devices assigned with VFIO " @@ -7907,7 +7907,7 @@ qemuBuildCommandLine(virConnectPtr conn, hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { if (hostdev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { unsigned long long memKB; if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { @@ -7929,7 +7929,7 @@ qemuBuildCommandLine(virConnectPtr conn, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) { char *configfd_name = NULL; if ((hostdev->source.subsys.u.pci.backend - != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) && + != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_CONFIGFD)) { int configfd = qemuOpenPCIConfig(hostdev); diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 036e922..4d1f39d 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -68,7 +68,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs) virPCIDeviceSetManaged(dev, hostdev->managed); if (hostdev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { virPCIDeviceSetStubDriver(dev, "vfio-pci"); } else { virPCIDeviceSetStubDriver(dev, "pci-stub"); @@ -157,7 +157,7 @@ int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver, virPCIDeviceSetManaged(dev, hostdev->managed); if (hostdev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { virPCIDeviceSetStubDriver(dev, "vfio-pci"); } else { virPCIDeviceSetStubDriver(dev, "pci-stub"); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 15cca08..91c03ce 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1001,7 +1001,7 @@ int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver, return -1; if (hostdev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { unsigned long long memKB; if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { @@ -1028,7 +1028,7 @@ int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver, goto error; releaseaddr = true; if ((hostdev->source.subsys.u.pci.backend - != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) && + != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_PCI_CONFIGFD)) { configfd = qemuOpenPCIConfig(hostdev); if (configfd >= 0) { diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 0aff794..4fa0384 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -832,7 +832,7 @@ AppArmorSetSecurityHostdevLabel(virSecurityManagerPtr mgr, goto done; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); if (!vfioGroupDev) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 5e00112..0366c17 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -517,7 +517,7 @@ virSecurityDACSetSecurityHostdevLabel(virSecurityManagerPtr mgr, goto done; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); if (!vfioGroupDev) @@ -608,7 +608,7 @@ virSecurityDACRestoreSecurityHostdevLabel(virSecurityManagerPtr mgr, goto done; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); if (!vfioGroupDev) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index a5b54cb..87a09c7 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1343,7 +1343,7 @@ virSecuritySELinuxSetSecurityHostdevSubsysLabel(virDomainDefPtr def, goto done; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); if (!vfioGroupDev) @@ -1515,7 +1515,7 @@ virSecuritySELinuxRestoreSecurityHostdevSubsysLabel(virSecurityManagerPtr mgr, goto done; if (dev->source.subsys.u.pci.backend - == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) { + == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { char *vfioGroupDev = virPCIDeviceGetVFIOGroupDev(pci); if (!vfioGroupDev) -- 1.7.11.7

On 04/26/2013 04:35 PM, Laine Stump wrote:
This isn't strictly speaking a bugfix, but I realized I'd gotten a bit too verbose when I chose the names for VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_*. This shortens them all a bit. --- src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 6 +++--- src/network/bridge_driver.c | 6 +++--- src/qemu/qemu_command.c | 8 ++++---- src/qemu/qemu_hostdev.c | 4 ++-- src/qemu/qemu_hotplug.c | 4 ++-- src/security/security_apparmor.c | 2 +- src/security/security_dac.c | 4 ++-- src/security/security_selinux.c | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-)
ACK; mechanical, and safe for 1.0.5. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Laine Stump