diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3da3a0cad5..29714855b0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2436,6 +2436,14 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps, * 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; @@ -2487,14 +2495,6 @@ virArch virQEMUCapsGetArch(virQEMUCapsPtr qemuCaps) } -void -virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps, - unsigned int version) -{ - qemuCaps->version = version; -} - - unsigned int virQEMUCapsGetVersion(virQEMUCapsPtr qemuCaps) { return qemuCaps->version; diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index f23995ec6e..219daa3629 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -55,10 +55,6 @@ void virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps, virArch arch); -void -virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps, - unsigned int version); - void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, virArch hostArch, diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d3ac569e27..385a54615f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -384,11 +384,6 @@ testUpdateQEMUCaps(const struct testInfo *info, virQEMUCapsInitQMPBasicArch(info->qemuCaps); - /* We need to pretend QEMU 2.0.0 is in use so that pSeries guests - * will get the correct alias assigned to their buses. - * See virQEMUCapsHasPCIMultiBus() */ - virQEMUCapsSetVersion(info->qemuCaps, 2000000); - if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0) goto cleanup;