diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3c6d260ed8186181892a9b5133fea9d56c5cf3ef..28ae7c394d9fe9518600407394cd1fca172ea1c8 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 " "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 b2f281580d57436c4a1bb553b0fc2a1bd22c2516..3a0f23ae7eaa634cb5d16bd616ae5ec4def9c8a9 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 0c0b35688c009ee65747594f93ca9849e3885d0f..1a81ae38d577065844ccdfc8834101b9113da2b9 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 69ea83fd0dd7da70c3ab3bed4f27e2965cf3c598..67e2614a1679c3fc7c4df97f87c826839117eb16 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4423,7 +4423,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"); @@ -7925,7 +7925,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 " @@ -7975,7 +7975,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)) { @@ -7997,7 +7997,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 036e92250eb375bf1471429689b8d7fe7450f577..4d1f39d2ed41c23ddbd00f3d1e20700f1b51d765 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 9fa2ca4a2fb1a1acb3e483c024f648bcbadf2ed5..f5fa1c4cf0658ff23d436e1e911266fb39276a75 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -992,7 +992,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)) { @@ -1019,7 +1019,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 0aff794a9a917e37a7b850326c18183a2a9a0f24..4fa0384c4e06320a6187658922fa97073587e7a8 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 5e00112d1026f8e093cdd696769fce239afe951c..0366c1723b1d5149d49184232ed2a44293d0ba62 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 a5b54cb8211f0c9cbe05241a38709cd4849841b3..87a09c7b148e4a320bddc9daa59ca8741c20f7ad 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)