From 3cfa19da2233c5a91e82dffc453527f10d65ae99 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 13 Mar 2014 11:59:32 +0000 Subject: [PATCH] Replace Pci with PCI throughout Since it is an abbreviation, PCI should always be fully capitalized or full lower case, never Pci. Signed-off-by: Daniel P. Berrange --- src/conf/device_conf.c | 4 ++-- src/conf/device_conf.h | 6 +++--- src/conf/domain_conf.c | 22 +++++++++++----------- src/conf/domain_conf.h | 20 ++++++++++---------- src/conf/node_device_conf.c | 8 ++++---- src/libvirt_private.syms | 10 +++++----- src/libxl/libxl_conf.c | 8 ++++---- src/libxl/libxl_conf.h | 2 +- src/libxl/libxl_driver.c | 4 ++-- src/network/bridge_driver.c | 2 +- src/qemu/qemu_capabilities.c | 28 ++++++++++++++-------------- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_hostdev.c | 2 +- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_monitor_text.c | 10 +++++----- src/security/virt-aa-helper.c | 2 +- src/util/virhostdev.c | 2 +- src/xen/xen_driver.c | 10 +++++----- tests/virpcimock.c | 16 ++++++++-------- 19 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index de7aa55706..317fdf2a58 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -32,7 +32,7 @@ #define VIR_FROM_THIS VIR_FROM_DEVICE -VIR_ENUM_IMPL(virDeviceAddressPciMulti, +VIR_ENUM_IMPL(virDeviceAddressPCIMulti, VIR_DEVICE_ADDRESS_PCI_MULTI_LAST, "default", "on", @@ -91,7 +91,7 @@ virDevicePCIAddressParseXML(xmlNodePtr node, } if (multi && - ((addr->multi = virDeviceAddressPciMultiTypeFromString(multi)) <= 0)) { + ((addr->multi = virDeviceAddressPCIMultiTypeFromString(multi)) <= 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown value '%s' for
'multifunction' attribute"), multi); diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index 52e4ac5157..7986ca6e2c 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -32,7 +32,7 @@ # include "virthread.h" # include "virbuffer.h" -enum virDeviceAddressPciMulti { +enum virDeviceAddressPCIMulti { VIR_DEVICE_ADDRESS_PCI_MULTI_DEFAULT = 0, VIR_DEVICE_ADDRESS_PCI_MULTI_ON, VIR_DEVICE_ADDRESS_PCI_MULTI_OFF, @@ -47,7 +47,7 @@ struct _virDevicePCIAddress { unsigned int bus; unsigned int slot; unsigned int function; - int multi; /* enum virDomainDeviceAddressPciMulti */ + int multi; /* enum virDomainDeviceAddressPCIMulti */ }; int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr); @@ -63,6 +63,6 @@ bool virDevicePCIAddressEqual(virDevicePCIAddress *addr1, virDevicePCIAddress *addr2); -VIR_ENUM_DECL(virDeviceAddressPciMulti) +VIR_ENUM_DECL(virDeviceAddressPCIMulti) #endif /* __DEVICE_CONF_H__ */ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3a1481f918..52bbf87157 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -597,7 +597,7 @@ VIR_ENUM_IMPL(virDomainHostdevSubsys, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST, "pci", "scsi") -VIR_ENUM_IMPL(virDomainHostdevSubsysPciBackend, +VIR_ENUM_IMPL(virDomainHostdevSubsysPCIBackend, VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST, "default", "kvm", @@ -609,7 +609,7 @@ VIR_ENUM_IMPL(virDomainHostdevCaps, VIR_DOMAIN_HOSTDEV_CAPS_TYPE_LAST, "misc", "net") -VIR_ENUM_IMPL(virDomainPciRombarMode, +VIR_ENUM_IMPL(virDomainPCIRombarMode, VIR_DOMAIN_PCI_ROMBAR_LAST, "default", "on", @@ -3164,7 +3164,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, virBufferAddLit(buf, "rombar) { - const char *rombar = virDomainPciRombarModeTypeToString(info->rombar); + const char *rombar = virDomainPCIRombarModeTypeToString(info->rombar); if (!rombar) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -3196,7 +3196,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, info->addr.pci.function); if (info->addr.pci.multi) { virBufferAsprintf(buf, " multifunction='%s'", - virDeviceAddressPciMultiTypeToString(info->addr.pci.multi)); + virDeviceAddressPCIMultiTypeToString(info->addr.pci.multi)); } break; @@ -3681,7 +3681,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node, if (rom) { char *rombar = virXMLPropString(rom, "bar"); if (rombar && - ((info->rombar = virDomainPciRombarModeTypeFromString(rombar)) <= 0)) { + ((info->rombar = virDomainPCIRombarModeTypeFromString(rombar)) <= 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown rom bar value '%s'"), rombar); VIR_FREE(rombar); @@ -3939,7 +3939,7 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node, * */ static int -virDomainHostdevSubsysPciOrigStatesDefParseXML(xmlNodePtr node, +virDomainHostdevSubsysPCIOrigStatesDefParseXML(xmlNodePtr node, virDomainHostdevOrigStatesPtr def) { xmlNodePtr cur; @@ -3967,7 +3967,7 @@ virDomainHostdevSubsysPciOrigStatesDefParseXML(xmlNodePtr node, } static int -virDomainHostdevSubsysPciDefParseXML(xmlNodePtr node, +virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node, virDomainHostdevDefPtr def, unsigned int flags) { @@ -4000,7 +4000,7 @@ virDomainHostdevSubsysPciDefParseXML(xmlNodePtr node, } else if ((flags & VIR_DOMAIN_XML_INTERNAL_PCI_ORIG_STATES) && xmlStrEqual(cur->name, BAD_CAST "origstates")) { virDomainHostdevOrigStatesPtr states = &def->origstates; - if (virDomainHostdevSubsysPciOrigStatesDefParseXML(cur, states) < 0) + if (virDomainHostdevSubsysPCIOrigStatesDefParseXML(cur, states) < 0) goto out; } else { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -4320,12 +4320,12 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, switch (def->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: - if (virDomainHostdevSubsysPciDefParseXML(sourcenode, def, flags) < 0) + if (virDomainHostdevSubsysPCIDefParseXML(sourcenode, def, flags) < 0) goto error; backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT; if ((backendStr = virXPathString("string(./driver/@name)", ctxt)) && - (((backend = virDomainHostdevSubsysPciBackendTypeFromString(backendStr)) < 0) || + (((backend = virDomainHostdevSubsysPCIBackendTypeFromString(backendStr)) < 0) || backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unknown PCI device " @@ -15327,7 +15327,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, { if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI && def->source.subsys.u.pci.backend != VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT) { - const char *backend = virDomainHostdevSubsysPciBackendTypeToString(def->source.subsys.u.pci.backend); + const char *backend = virDomainHostdevSubsysPCIBackendTypeToString(def->source.subsys.u.pci.backend); if (!backend) { virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3dfab5884e..addf65415c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -218,7 +218,7 @@ enum virDomainDeviceAddressType { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST }; -enum virDomainPciRombarMode { +enum virDomainPCIRombarMode { VIR_DOMAIN_PCI_ROMBAR_DEFAULT = 0, VIR_DOMAIN_PCI_ROMBAR_ON, VIR_DOMAIN_PCI_ROMBAR_OFF, @@ -322,7 +322,7 @@ struct _virDomainDeviceInfo { } master; /* rombar and romfile are only used for pci hostdev and network * devices. */ - int rombar; /* enum virDomainPciRombarMode */ + int rombar; /* enum virDomainPCIRombarMode */ char *romfile; /* bootIndex is only used for disk, network interface, hostdev * and redirdev devices */ @@ -386,9 +386,9 @@ typedef enum { VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN, /* force legacy xen style, use pciback */ VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST -} virDomainHostdevSubsysPciBackendType; +} virDomainHostdevSubsysPCIBackendType; -VIR_ENUM_DECL(virDomainHostdevSubsysPciBackend) +VIR_ENUM_DECL(virDomainHostdevSubsysPCIBackend) typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys; typedef virDomainHostdevSubsys *virDomainHostdevSubsysPtr; @@ -406,7 +406,7 @@ struct _virDomainHostdevSubsys { } usb; struct { virDevicePCIAddress addr; /* host address */ - int backend; /* enum virDomainHostdevSubsysPciBackendType */ + int backend; /* enum virDomainHostdevSubsysPCIBackendType */ } pci; struct { char *adapter; @@ -708,9 +708,9 @@ struct _virDomainVirtioSerialOpts { int vectors; /* -1 == undef */ }; -typedef struct _virDomainPciControllerOpts virDomainPciControllerOpts; -typedef virDomainPciControllerOpts *virDomainPciControllerOptsPtr; -struct _virDomainPciControllerOpts { +typedef struct _virDomainPCIControllerOpts virDomainPCIControllerOpts; +typedef virDomainPCIControllerOpts *virDomainPCIControllerOptsPtr; +struct _virDomainPCIControllerOpts { bool pcihole64; unsigned long pcihole64size; }; @@ -723,7 +723,7 @@ struct _virDomainControllerDef { unsigned int queues; union { virDomainVirtioSerialOpts vioserial; - virDomainPciControllerOpts pciopts; + virDomainPCIControllerOpts pciopts; } opts; virDomainDeviceInfo info; }; @@ -2582,7 +2582,7 @@ VIR_ENUM_DECL(virDomainVideo) VIR_ENUM_DECL(virDomainHostdevMode) VIR_ENUM_DECL(virDomainHostdevSubsys) VIR_ENUM_DECL(virDomainHostdevCaps) -VIR_ENUM_DECL(virDomainPciRombarMode) +VIR_ENUM_DECL(virDomainPCIRombarMode) VIR_ENUM_DECL(virDomainHub) VIR_ENUM_DECL(virDomainRedirdevBus) VIR_ENUM_DECL(virDomainInput) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 9a781f1926..e65b5e4578 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -988,7 +988,7 @@ virNodeDevCapUSBDevParseXML(xmlXPathContextPtr ctxt, } static int -virNodeDevCapPciDevIommuGroupParseXML(xmlXPathContextPtr ctxt, +virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr ctxt, xmlNodePtr iommuGroupNode, union _virNodeDevCapData *data) { @@ -1045,7 +1045,7 @@ virNodeDevCapPciDevIommuGroupParseXML(xmlXPathContextPtr ctxt, static int -virNodeDevCapPciDevParseXML(xmlXPathContextPtr ctxt, +virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt, virNodeDeviceDefPtr def, xmlNodePtr node, union _virNodeDevCapData *data) @@ -1096,7 +1096,7 @@ virNodeDevCapPciDevParseXML(xmlXPathContextPtr ctxt, data->pci_dev.product_name = virXPathString("string(./product[1])", ctxt); if ((iommuGroupNode = virXPathNode("./iommuGroup[1]", ctxt))) { - if (virNodeDevCapPciDevIommuGroupParseXML(ctxt, iommuGroupNode, + if (virNodeDevCapPCIDevIommuGroupParseXML(ctxt, iommuGroupNode, data) < 0) { goto out; } @@ -1186,7 +1186,7 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, ret = virNodeDevCapSystemParseXML(ctxt, def, node, &caps->data); break; case VIR_NODE_DEV_CAP_PCI_DEV: - ret = virNodeDevCapPciDevParseXML(ctxt, def, node, &caps->data); + ret = virNodeDevCapPCIDevParseXML(ctxt, def, node, &caps->data); break; case VIR_NODE_DEV_CAP_USB_DEV: ret = virNodeDevCapUSBDevParseXML(ctxt, def, node, &caps->data); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 6b68a4395b..55aa586642 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -77,8 +77,8 @@ virCPUModeTypeToString; # conf/device_conf.h -virDeviceAddressPciMultiTypeFromString; -virDeviceAddressPciMultiTypeToString; +virDeviceAddressPCIMultiTypeFromString; +virDeviceAddressPCIMultiTypeToString; virDevicePCIAddressEqual; virDevicePCIAddressFormat; virDevicePCIAddressIsValid; @@ -270,7 +270,7 @@ virDomainHostdevFind; virDomainHostdevInsert; virDomainHostdevModeTypeToString; virDomainHostdevRemove; -virDomainHostdevSubsysPciBackendTypeToString; +virDomainHostdevSubsysPCIBackendTypeToString; virDomainHostdevSubsysTypeToString; virDomainHubTypeFromString; virDomainHubTypeToString; @@ -342,8 +342,8 @@ virDomainObjSetState; virDomainObjTaint; virDomainPausedReasonTypeFromString; virDomainPausedReasonTypeToString; -virDomainPciRombarModeTypeFromString; -virDomainPciRombarModeTypeToString; +virDomainPCIRombarModeTypeFromString; +virDomainPCIRombarModeTypeToString; virDomainPMStateTypeFromString; virDomainPMStateTypeToString; virDomainPMSuspendedReasonTypeFromString; diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index b8de72a7c7..298c8a1333 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1179,7 +1179,7 @@ libxlDriverConfigGet(libxlDriverPrivatePtr driver) } int -libxlMakePci(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev) +libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev) { if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) return -1; @@ -1195,7 +1195,7 @@ libxlMakePci(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev) } static int -libxlMakePciList(virDomainDefPtr def, libxl_domain_config *d_config) +libxlMakePCIList(virDomainDefPtr def, libxl_domain_config *d_config) { virDomainHostdevDefPtr *l_hostdevs = def->hostdevs; size_t nhostdevs = def->nhostdevs; @@ -1217,7 +1217,7 @@ libxlMakePciList(virDomainDefPtr def, libxl_domain_config *d_config) libxl_device_pci_init(&x_pcidevs[j]); - if (libxlMakePci(l_hostdevs[i], &x_pcidevs[j]) < 0) + if (libxlMakePCI(l_hostdevs[i], &x_pcidevs[j]) < 0) goto error; npcidevs++; @@ -1322,7 +1322,7 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver, if (libxlMakeVfbList(driver, def, d_config) < 0) return -1; - if (libxlMakePciList(def, d_config) < 0) + if (libxlMakePCIList(def, d_config) < 0) return -1; d_config->on_reboot = def->onReboot; diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 5a340b91dc..24e172067b 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -156,7 +156,7 @@ libxlMakeVfb(libxlDriverPrivatePtr driver, virDomainGraphicsDefPtr l_vfb, libxl_device_vfb *x_vfb); int -libxlMakePci(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev); +libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev); int libxlBuildDomainConfig(libxlDriverPrivatePtr driver, diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index b5061dfc6c..b3f8df655f 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2610,7 +2610,7 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivatePtr driver, &hostdev, 1, 0) < 0) return -1; - if (libxlMakePci(hostdev, &pcidev) < 0) + if (libxlMakePCI(hostdev, &pcidev) < 0) goto error; if (libxl_device_pci_add(priv->ctx, vm->def->id, &pcidev, 0) < 0) { @@ -2860,7 +2860,7 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivatePtr driver, libxl_device_pci_init(&pcidev); - if (libxlMakePci(detach, &pcidev) < 0) + if (libxlMakePCI(detach, &pcidev) < 0) goto error; if (libxl_device_pci_remove(priv->ctx, vm->def->id, &pcidev, 0) < 0) { diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index fbcc8244db..eb276cdf0b 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3480,7 +3480,7 @@ networkAllocateActualDevice(virDomainDefPtr dom, } else if (netdef->forward.type == VIR_NETWORK_FORWARD_HOSTDEV) { - virDomainHostdevSubsysPciBackendType backend; + virDomainHostdevSubsysPCIBackendType backend; iface->data.network.actual->type = actualType = VIR_DOMAIN_NET_TYPE_HOSTDEV; if (netdef->forward.npfs > 0 && netdef->forward.nifs <= 0 && diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 62b66c40de..381b3ec618 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1456,13 +1456,13 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioNet[] = { { "event_idx", QEMU_CAPS_VIRTIO_NET_EVENT_IDX }, }; -static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPciAssign[] = { +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPCIAssign[] = { { "rombar", QEMU_CAPS_PCI_ROMBAR }, { "configfd", QEMU_CAPS_PCI_CONFIGFD }, { "bootindex", QEMU_CAPS_PCI_BOOTINDEX }, }; -static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVfioPci[] = { +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVfioPCI[] = { { "bootindex", QEMU_CAPS_VFIO_PCI_BOOTINDEX }, }; @@ -1493,11 +1493,11 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSCSIGeneric[] = { { "bootindex", QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX }, }; -static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsI440FXPciHost[] = { +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsI440FXPCIHost[] = { { "pci-hole64-size", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE }, }; -static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQ35PciHost[] = { +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQ35PCIHost[] = { { "pci-hole64-size", QEMU_CAPS_Q35_PCI_HOLE64_SIZE }, }; @@ -1528,12 +1528,12 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk) }, { "virtio-net-s390", virQEMUCapsObjectPropsVirtioNet, ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet) }, - { "pci-assign", virQEMUCapsObjectPropsPciAssign, - ARRAY_CARDINALITY(virQEMUCapsObjectPropsPciAssign) }, - { "kvm-pci-assign", virQEMUCapsObjectPropsPciAssign, - ARRAY_CARDINALITY(virQEMUCapsObjectPropsPciAssign) }, - { "vfio-pci", virQEMUCapsObjectPropsVfioPci, - ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPci) }, + { "pci-assign", virQEMUCapsObjectPropsPCIAssign, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign) }, + { "kvm-pci-assign", virQEMUCapsObjectPropsPCIAssign, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign) }, + { "vfio-pci", virQEMUCapsObjectPropsVfioPCI, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPCI) }, { "scsi-disk", virQEMUCapsObjectPropsSCSIDisk, ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIDisk) }, { "ide-drive", virQEMUCapsObjectPropsIDEDrive, @@ -1546,10 +1546,10 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBHost) }, { "scsi-generic", virQEMUCapsObjectPropsSCSIGeneric, ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric) }, - { "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPciHost, - ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPciHost) }, - { "q35-pcihost", virQEMUCapsObjectPropsQ35PciHost, - ARRAY_CARDINALITY(virQEMUCapsObjectPropsQ35PciHost) }, + { "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPCIHost, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPCIHost) }, + { "q35-pcihost", virQEMUCapsObjectPropsQ35PCIHost, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsQ35PCIHost) }, { "usb-storage", virQEMUCapsObjectPropsUSBStorage, ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBStorage) }, { "kvm-pit", virQEMUCapsObjectPropsKVMPit, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fab39aa395..379c0940b4 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5532,7 +5532,7 @@ qemuBuildPCIHostdevDevStr(virDomainDefPtr def, int backend = dev->source.subsys.u.pci.backend; /* caller has to assign proper passthrough backend type */ - switch ((virDomainHostdevSubsysPciBackendType) backend) { + switch ((virDomainHostdevSubsysPCIBackendType) backend) { case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM: virBufferAddLit(&buf, "pci-assign"); if (configfd && *configfd) @@ -5546,7 +5546,7 @@ qemuBuildPCIHostdevDevStr(virDomainDefPtr def, default: virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid PCI passthrough type '%s'"), - virDomainHostdevSubsysPciBackendTypeToString(backend)); + virDomainHostdevSubsysPCIBackendTypeToString(backend)); break; } diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index c5ba003ae0..e9879c4010 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -173,7 +173,7 @@ qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs, if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) continue; - switch ((virDomainHostdevSubsysPciBackendType) *backend) { + switch ((virDomainHostdevSubsysPCIBackendType) *backend) { case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT: if (supportsPassthroughVFIO && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index bf92aec542..233b183917 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1191,7 +1191,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver, /* this could have been changed by qemuPrepareHostdevPCIDevices */ backend = hostdev->source.subsys.u.pci.backend; - switch ((virDomainHostdevSubsysPciBackendType) backend) { + switch ((virDomainHostdevSubsysPCIBackendType) backend) { case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO: if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index ad63140d15..bd604f0b53 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -1753,7 +1753,7 @@ int qemuMonitorTextAddUSBDeviceMatch(qemuMonitorPtr mon, static int -qemuMonitorTextParsePciAddReply(qemuMonitorPtr mon ATTRIBUTE_UNUSED, +qemuMonitorTextParsePCIAddReply(qemuMonitorPtr mon ATTRIBUTE_UNUSED, const char *reply, virDevicePCIAddress *addr) { @@ -1840,7 +1840,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon, goto cleanup; } - if (qemuMonitorTextParsePciAddReply(mon, reply, guestAddr) < 0) { + if (qemuMonitorTextParsePCIAddReply(mon, reply, guestAddr) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, _("parsing pci_add reply failed: %s"), reply); goto cleanup; @@ -1878,7 +1878,7 @@ int qemuMonitorTextAddPCIDisk(qemuMonitorPtr mon, if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) goto cleanup; - if (qemuMonitorTextParsePciAddReply(mon, reply, guestAddr) < 0) { + if (qemuMonitorTextParsePCIAddReply(mon, reply, guestAddr) < 0) { if (!tryOldSyntax && strstr(reply, "invalid char in expression")) { VIR_FREE(reply); VIR_FREE(cmd); @@ -1915,7 +1915,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon, if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) goto cleanup; - if (qemuMonitorTextParsePciAddReply(mon, reply, guestAddr) < 0) { + if (qemuMonitorTextParsePCIAddReply(mon, reply, guestAddr) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, _("parsing pci_add reply failed: %s"), reply); goto cleanup; @@ -2252,7 +2252,7 @@ int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon, if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) goto cleanup; - if (qemuMonitorTextParsePciAddReply(mon, reply, guestAddr) < 0) { + if (qemuMonitorTextParsePCIAddReply(mon, reply, guestAddr) < 0) { if (!tryOldSyntax && strstr(reply, "invalid char in expression")) { VIR_FREE(reply); VIR_FREE(cmd); diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 7bddb2cd53..da66583ea1 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1072,7 +1072,7 @@ get_files(vahControl * ctl) dev->source.subsys.u.pci.addr.slot, dev->source.subsys.u.pci.addr.function); - virDomainHostdevSubsysPciBackendType backend = dev->source.subsys.u.pci.backend; + virDomainHostdevSubsysPCIBackendType backend = dev->source.subsys.u.pci.backend; if (backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO || backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT) { needsVfio = true; diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 7936289968..9dd1df23d7 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -1571,7 +1571,7 @@ virHostdevPrepareDomainDevices(virHostdevManagerPtr mgr, } /* @oldStateDir - * For upgrade purpose: see virHostdevReAttachPciHostdevs + * For upgrade purpose: see virHostdevReAttachPCIHostdevs */ void virHostdevReAttachDomainDevices(virHostdevManagerPtr mgr, diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 0fca7bef7c..2ffb06be39 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -2424,7 +2424,7 @@ xenUnifiedConnectDomainEventDeregisterAny(virConnectPtr conn, static int -xenUnifiedNodeDeviceGetPciInfo(virNodeDevicePtr dev, +xenUnifiedNodeDeviceGetPCIInfo(virNodeDevicePtr dev, unsigned *domain, unsigned *bus, unsigned *slot, @@ -2480,7 +2480,7 @@ xenUnifiedNodeDeviceDetachFlags(virNodeDevicePtr dev, virCheckFlags(0, -1); - if (xenUnifiedNodeDeviceGetPciInfo(dev, &domain, &bus, &slot, &function) < 0) + if (xenUnifiedNodeDeviceGetPCIInfo(dev, &domain, &bus, &slot, &function) < 0) return -1; pci = virPCIDeviceNew(domain, bus, slot, function); @@ -2538,7 +2538,7 @@ xenUnifiedNodeDeviceAssignedDomainId(virNodeDevicePtr dev) } /* Get pci bdf */ - if (xenUnifiedNodeDeviceGetPciInfo(dev, &domain, &bus, &slot, &function) < 0) + if (xenUnifiedNodeDeviceGetPCIInfo(dev, &domain, &bus, &slot, &function) < 0) goto out; if (virAsprintf(&bdf, "%04x:%02x:%02x.%0x", @@ -2574,7 +2574,7 @@ xenUnifiedNodeDeviceReAttach(virNodeDevicePtr dev) int ret = -1; int domid; - if (xenUnifiedNodeDeviceGetPciInfo(dev, &domain, &bus, &slot, &function) < 0) + if (xenUnifiedNodeDeviceGetPCIInfo(dev, &domain, &bus, &slot, &function) < 0) return -1; pci = virPCIDeviceNew(domain, bus, slot, function); @@ -2605,7 +2605,7 @@ xenUnifiedNodeDeviceReset(virNodeDevicePtr dev) unsigned domain, bus, slot, function; int ret = -1; - if (xenUnifiedNodeDeviceGetPciInfo(dev, &domain, &bus, &slot, &function) < 0) + if (xenUnifiedNodeDeviceGetPCIInfo(dev, &domain, &bus, &slot, &function) < 0) return -1; pci = virPCIDeviceNew(domain, bus, slot, function); diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 033b7e9ade..0b49290737 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -136,10 +136,10 @@ struct fdCallback { }; struct pciDevice **pciDevices = NULL; -size_t nPciDevices = 0; +size_t nPCIDevices = 0; struct pciDriver **pciDrivers = NULL; -size_t nPciDrivers = 0; +size_t nPCIDrivers = 0; struct fdCallback *callbacks = NULL; size_t nCallbacks = 0; @@ -390,7 +390,7 @@ pci_device_new_from_stub(const struct pciDevice *data) if (pci_device_autobind(dev) < 0) ABORT("Unable to bind: %s", data->id); - if (VIR_APPEND_ELEMENT_QUIET(pciDevices, nPciDevices, dev) < 0) + if (VIR_APPEND_ELEMENT_QUIET(pciDevices, nPCIDevices, dev) < 0) ABORT_OOM(); VIR_FREE(devpath); @@ -401,7 +401,7 @@ static struct pciDevice * pci_device_find_by_id(const char *id) { size_t i; - for (i = 0; i < nPciDevices; i++) { + for (i = 0; i < nPCIDevices; i++) { struct pciDevice *dev = pciDevices[i]; if (STREQ(dev->id, id)) @@ -479,7 +479,7 @@ pci_driver_new(const char *name, int fail, ...) make_file(driverpath, "new_id", NULL, -1); make_file(driverpath, "remove_id", NULL, -1); - if (VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPciDrivers, driver) < 0) + if (VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPCIDrivers, driver) < 0) ABORT_OOM(); } @@ -488,7 +488,7 @@ pci_driver_find_by_dev(struct pciDevice *dev) { size_t i; - for (i = 0; i < nPciDrivers; i++) { + for (i = 0; i < nPCIDrivers; i++) { struct pciDriver *driver = pciDrivers[i]; size_t j; @@ -507,7 +507,7 @@ pci_driver_find_by_path(const char *path) { size_t i; - for (i = 0; i < nPciDrivers; i++) { + for (i = 0; i < nPCIDrivers; i++) { struct pciDriver *driver = pciDrivers[i]; if (strstr(path, driver->name)) @@ -709,7 +709,7 @@ pci_driver_handle_new_id(const char *path) driver->len++; } - for (i = 0; i < nPciDevices; i++) { + for (i = 0; i < nPCIDevices; i++) { struct pciDevice *dev = pciDevices[i]; if (!dev->driver &&