int
qemuAssignDeviceControllerAlias(virDomainDef *domainDef,
- virQEMUCaps *qemuCaps,
+ virQEMUCaps *qemuCaps G_GNUC_UNUSED,
virDomainControllerDef *controller)
{
const char *prefix = virDomainControllerTypeToString(controller->type);
return 0;
if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
- if (!virQEMUCapsHasPCIMultiBus(qemuCaps, domainDef)) {
+ if (!virQEMUCapsHasPCIMultiBus(domainDef)) {
/* qemus that don't support multiple PCI buses have
* hardcoded the name of their single PCI controller as
* "pci".
}
-bool virQEMUCapsHasPCIMultiBus(virQEMUCaps *qemuCaps,
- const virDomainDef *def)
+bool virQEMUCapsHasPCIMultiBus(const virDomainDef *def)
{
/* x86_64 and i686 support PCI-multibus on all machine types
* since forever */
if (ARCH_IS_X86(def->os.arch))
return true;
+ /* PPC supports multibus on all machine types which have pci since qemu-2.0.0 */
if (def->os.arch == VIR_ARCH_PPC ||
ARCH_IS_PPC64(def->os.arch)) {
- /*
- * Usage of pci.0 naming:
- *
- * ref405ep: no pci
- * taihu: no pci
- * bamboo: 1.1.0 (<= 1.5.0, so basically forever)
- * mac99: 2.0.0
- * g3beige: 2.0.0
- * prep: 1.4.0 (<= 1.5.0, so basically forever)
- * pseries: 2.0.0
- * mpc8544ds: forever
- * virtex-m507: no pci
- * ppce500: 1.6.0
- */
-
- /* We do not store the qemu version in domain status XML.
- * Hope the user is using a QEMU new enough to use 'pci.0',
- * otherwise the results of this function will be wrong
- * for domains already running at the time of daemon
- * restart */
- if (qemuCaps->version == 0)
- return true;
-
- if (qemuCaps->version >= 2000000)
- return true;
-
- if (qemuCaps->version >= 1006000 &&
- STREQ(def->os.machine, "ppce500"))
- return true;
-
- if (STREQ(def->os.machine, "bamboo") ||
- STREQ(def->os.machine, "mpc8544ds") ||
- STREQ(def->os.machine, "prep")) {
- return true;
- }
-
- return false;
+ return true;
}
/* S390 supports PCI-multibus. */
void virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *qemuCaps);
-bool virQEMUCapsHasPCIMultiBus(virQEMUCaps *qemuCaps,
- const virDomainDef *def);
+bool virQEMUCapsHasPCIMultiBus(const virDomainDef *def);
bool virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps,
const virDomainDef *def);
qemuBuildDeviceAddressStr(virBuffer *buf,
const virDomainDef *domainDef,
virDomainDeviceInfo *info,
- virQEMUCaps *qemuCaps)
+ virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
g_autofree char *devStr = NULL;
const char *contAlias = NULL;
* case, use the default one. */
if (!qemuDomainIsPSeries(domainDef) &&
cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
- if (virQEMUCapsHasPCIMultiBus(qemuCaps, domainDef))
+ if (virQEMUCapsHasPCIMultiBus(domainDef))
contAlias = "pci.0";
else
contAlias = "pci";