]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuhotplugtest: Use real 'latest' capabilities for hotplug testing
authorPeter Krempa <pkrempa@redhat.com>
Thu, 9 Mar 2023 15:47:32 +0000 (16:47 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:07 +0000 (09:19 +0200)
Rather than test with synthetic capabilities which might get outdated
reuse testQemuGetRealCaps to fetch latest capabilities and use those.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
38 files changed:
tests/qemuhotplugtest.c
tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+cdrom-scsi.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+cdrom-usb.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-multipath.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+guestfwd.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live+hostdev-pci.xml
tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live.xml

index 186958cd5734da398752f25daf090b42a4c21db6..9c8407c5ef1e863dc715293558c66632e1d8a003 100644 (file)
@@ -53,12 +53,22 @@ struct qemuHotplugTestData {
     bool keep;
     virDomainObj *vm;
     bool deviceDeletedEvent;
+    const char *arch;
+    GHashTable *capsLatestFiles;
+    GHashTable *capsCache;
+    GHashTable *schemaCache;
 };
 
 static int
 qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
                          virDomainObj **vm,
-                         const char *domxml)
+                         const char *domxml,
+                         const char *arch,
+                         GHashTable *capsLatestFiles,
+                         GHashTable *capsCache,
+                         GHashTable *schemaCache,
+                         GHashTable **schema)
+
 {
     qemuDomainObjPrivate *priv = NULL;
     const unsigned int parseFlags = 0;
@@ -68,28 +78,10 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
 
     priv = (*vm)->privateData;
 
-    priv->qemuCaps = virQEMUCapsNew();
-
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_LSI);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_QXL);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_VGA);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S3);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S4);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VNC);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PR_MANAGER_HELPER);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_BLOCK);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_KBD);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_NETDEV_VHOST_VDPA);
-    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SET_ACTION);
+    if (!(priv->qemuCaps = testQemuGetRealCaps(arch, "latest", "",
+                                               capsLatestFiles, capsCache,
+                                               schemaCache, schema)))
+        return -1;
 
     if (qemuTestCapsCacheInsert(driver.qemuCapsCache, priv->qemuCaps) < 0)
         return -1;
@@ -347,7 +339,10 @@ testQemuHotplug(const void *data)
             goto cleanup;
         }
     } else {
-        if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml) < 0)
+        if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml,
+                                     test->arch, test->capsLatestFiles,
+                                     test->capsCache, test->schemaCache,
+                                     NULL) < 0)
             goto cleanup;
     }
 
@@ -478,7 +473,10 @@ struct testQemuHotplugCpuParams {
     bool state;
     bool modern;
     bool fail;
-    GHashTable *schema;
+    const char *arch;
+    GHashTable *capsLatestFiles;
+    GHashTable *capsCache;
+    GHashTable *schemaCache;
 };
 
 
@@ -488,6 +486,7 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugCpuParams *params)
     qemuDomainObjPrivate *priv = NULL;
     g_autofree char *prefix = NULL;
     struct testQemuHotplugCpuData *data = NULL;
+    GHashTable *schema = NULL;
 
     prefix = g_strdup_printf("%s/qemuhotplugtestcpus/%s", abs_srcdir, params->test);
 
@@ -503,7 +502,9 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugCpuParams *params)
     if (virTestLoadFile(data->file_xml_dom, &data->xml_dom) < 0)
         goto error;
 
-    if (qemuHotplugCreateObjects(driver.xmlopt, &data->vm, data->xml_dom) < 0)
+    if (qemuHotplugCreateObjects(driver.xmlopt, &data->vm, data->xml_dom,
+                                 params->arch, params->capsLatestFiles,
+                                 params->capsCache, params->schemaCache, &schema) < 0)
         goto error;
 
     /* create vm->newDef */
@@ -517,7 +518,7 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugCpuParams *params)
         virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
 
     if (!(data->mon = qemuMonitorTestNewFromFileFull(data->file_json_monitor,
-                                                     &driver, data->vm, params->schema)))
+                                                     &driver, data->vm, schema)))
         goto error;
 
     if (params->fail)
@@ -645,11 +646,17 @@ testQemuHotplugCpuIndividual(const void *opaque)
 static int
 mymain(void)
 {
-    g_autoptr(GHashTable) qmpschema = NULL;
     int ret = 0;
-    struct qemuHotplugTestData data = {0};
-    struct testQemuHotplugCpuParams cpudata;
     g_autoptr(virQEMUDriverConfig) cfg = NULL;
+    g_autoptr(GHashTable) capsLatestFiles = testQemuGetLatestCaps();
+    g_autoptr(GHashTable) capsCache = virHashNew(virObjectUnref);
+    g_autoptr(GHashTable) schemaCache = virHashNew((GDestroyNotify) g_hash_table_unref);
+    struct qemuHotplugTestData data = { .capsLatestFiles = capsLatestFiles,
+                                        .capsCache = capsCache,
+                                        .schemaCache = schemaCache };
+    struct testQemuHotplugCpuParams cpudata = { .capsLatestFiles = capsLatestFiles,
+                                                .capsCache = capsCache,
+                                                .schemaCache = schemaCache };
 
     if (qemuTestDriverInit(&driver) < 0)
         return EXIT_FAILURE;
@@ -661,13 +668,6 @@ mymain(void)
     if (!(driver.domainEventState = virObjectEventStateNew()))
         return EXIT_FAILURE;
 
-    if (!(qmpschema = testQEMUSchemaLoadLatest("x86_64"))) {
-        VIR_TEST_VERBOSE("failed to load qapi schema\n");
-        return EXIT_FAILURE;
-    }
-
-    cpudata.schema = qmpschema;
-
     driver.lockManager = virLockManagerPluginNew("nop", "qemu",
                                                  driver.config->configBaseDir,
                                                  0);
@@ -682,10 +682,11 @@ mymain(void)
     }
 
 
-#define DO_TEST(file, ACTION, dev, fail_, keep_, ...) \
+#define DO_TEST(archname, file, ACTION, dev, fail_, keep_, ...) \
     do { \
         const char *my_mon[] = { __VA_ARGS__, NULL}; \
         const char *name = file " " #ACTION " " dev; \
+        data.arch = archname; \
         data.action = ACTION; \
         data.domain_filename = file; \
         data.device_filename = dev; \
@@ -696,14 +697,14 @@ mymain(void)
             ret = -1; \
     } while (0)
 
-#define DO_TEST_ATTACH(file, dev, fail, keep, ...) \
-    DO_TEST(file, ATTACH, dev, fail, keep, __VA_ARGS__)
+#define DO_TEST_ATTACH(arch, file, dev, fail, keep, ...) \
+    DO_TEST(arch, file, ATTACH, dev, fail, keep, __VA_ARGS__)
 
-#define DO_TEST_DETACH(file, dev, fail, keep, ...) \
-    DO_TEST(file, DETACH, dev, fail, keep, __VA_ARGS__)
+#define DO_TEST_DETACH(arch, file, dev, fail, keep, ...) \
+    DO_TEST(arch, file, DETACH, dev, fail, keep, __VA_ARGS__)
 
-#define DO_TEST_UPDATE(file, dev, fail, keep, ...) \
-    DO_TEST(file, UPDATE, dev, fail, keep, __VA_ARGS__)
+#define DO_TEST_UPDATE(arch, file, dev, fail, keep, ...) \
+    DO_TEST(arch, file, UPDATE, dev, fail, keep, __VA_ARGS__)
 
 
 #define QMP_OK      "{\"return\": {}}"
@@ -722,60 +723,60 @@ mymain(void)
     "}\r\n"
 
     cfg->spiceTLS = true;
-    DO_TEST_UPDATE("graphics-spice", "graphics-spice-nochange", false, false, NULL);
-    DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-nochange", false, false,
+    DO_TEST_UPDATE("x86_64", "graphics-spice", "graphics-spice-nochange", false, false, NULL);
+    DO_TEST_UPDATE("x86_64", "graphics-spice-timeout", "graphics-spice-timeout-nochange", false, false,
                    "set_password", QMP_OK, "expire_password", QMP_OK);
-    DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false,
+    DO_TEST_UPDATE("x86_64", "graphics-spice-timeout", "graphics-spice-timeout-password", false, false,
                    "set_password", QMP_OK, "expire_password", QMP_OK);
-    DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false, NULL);
-    DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen-network-password", false, false,
+    DO_TEST_UPDATE("x86_64", "graphics-spice", "graphics-spice-listen", true, false, NULL);
+    DO_TEST_UPDATE("x86_64", "graphics-spice-listen-network", "graphics-spice-listen-network-password", false, false,
                    "set_password", QMP_OK, "expire_password", QMP_OK);
     cfg->spiceTLS = false;
     /* Strange huh? Currently, only graphics can be updated :-P */
-    DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL);
+    DO_TEST_UPDATE("x86_64", "disk-cdrom", "disk-cdrom-nochange", true, false, NULL);
 
-    DO_TEST_ATTACH("console-compat-2-live", "console-virtio", false, true,
+    DO_TEST_ATTACH("x86_64", "console-compat-2-live", "console-virtio", false, true,
                    "chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}}",
                    "device_add", QMP_OK);
 
-    DO_TEST_DETACH("console-compat-2-live", "console-virtio", false, false,
+    DO_TEST_DETACH("x86_64", "console-compat-2-live", "console-virtio", false, false,
                    "device_del", QMP_DEVICE_DELETED("console1") QMP_OK,
                    "chardev-remove", QMP_OK, "query-fdsets", "{\"return\": []}");
 
-    DO_TEST_ATTACH("base-live", "disk-virtio", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "disk-virtio", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-virtio", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-virtio", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-virtio", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-virtio", false, false,
                    "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "disk-usb", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "disk-usb", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-usb", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-usb", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-usb", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-usb", false, false,
                    "device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "disk-scsi", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "disk-scsi", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-scsi", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-scsi", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-scsi", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-scsi", false, false,
                    "device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-without-scsi-controller-live", "disk-scsi-2", false, true,
+    DO_TEST_ATTACH("x86_64", "base-without-scsi-controller-live", "disk-scsi-2", false, true,
                    /* Four controllers added */
                    "device_add", QMP_OK,
                    "device_add", QMP_OK,
@@ -784,109 +785,109 @@ mymain(void)
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", true, true,
+    DO_TEST_DETACH("x86_64", "base-with-scsi-controller-live", "disk-scsi-2", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false,
+    DO_TEST_DETACH("x86_64", "base-with-scsi-controller-live", "disk-scsi-2", false, false,
                    "device_del", QMP_DEVICE_DELETED("scsi3-0-6") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "disk-scsi-multipath", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "disk-scsi-multipath", false, true,
                    "object-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-scsi-multipath", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-scsi-multipath", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "disk-scsi-multipath", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "disk-scsi-multipath", false, false,
                    "device_del", QMP_DEVICE_DELETED("scsi0-0-0-0") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK,
                    "object-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "qemu-agent", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "qemu-agent", false, true,
                    "getfd", QMP_OK,
                    "chardev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "qemu-agent-detach", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "qemu-agent-detach", false, false,
                    "device_del", QMP_DEVICE_DELETED("channel0") QMP_OK,
                    "chardev-remove", QMP_OK, "query-fdsets", "{\"return\": []}");
 
-    DO_TEST_ATTACH("base-ccw-live", "ccw-virtio", false, true,
+    DO_TEST_ATTACH("s390x", "base-ccw-live", "ccw-virtio", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-ccw-live", "ccw-virtio", false, false,
+    DO_TEST_DETACH("s390x", "base-ccw-live", "ccw-virtio", false, false,
                    "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, true,
+    DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
 
-    DO_TEST_DETACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, false,
+    DO_TEST_DETACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, false,
                    "device_del", QMP_DEVICE_DELETED("virtio-disk0") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
+    DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
 
-    DO_TEST_DETACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, false,
+    DO_TEST_DETACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, false,
                    "device_del", QMP_DEVICE_DELETED("virtio-disk0") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
     /* Attach a second device, then detach the first one. Then attach the first one again. */
-    DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
+    DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
 
-    DO_TEST_DETACH("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-explicit", false, true,
+    DO_TEST_DETACH("s390x", "base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-explicit", false, true,
                    "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK);
 
-    DO_TEST_ATTACH("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-reverse", false, false,
+    DO_TEST_ATTACH("s390x", "base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-reverse", false, false,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "ivshmem-plain", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "ivshmem-plain", false, true,
                    "object-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_ATTACH("base-live", "ivshmem-doorbell", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "ivshmem-doorbell", false, true,
                    "chardev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live+ivshmem-plain", "ivshmem-doorbell-detach", false, true,
+    DO_TEST_DETACH("x86_64", "base-live+ivshmem-plain", "ivshmem-doorbell-detach", false, true,
                    "device_del", QMP_DEVICE_DELETED("shmem1") QMP_OK,
                    "chardev-remove", QMP_OK);
-    DO_TEST_DETACH("base-live", "ivshmem-plain-detach", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "ivshmem-plain-detach", false, false,
                    "device_del", QMP_DEVICE_DELETED("shmem0") QMP_OK,
                    "object-del", QMP_OK);
-    DO_TEST_ATTACH("base-live+disk-scsi-wwn",
+    DO_TEST_ATTACH("x86_64", "base-live+disk-scsi-wwn",
                    "disk-scsi-duplicate-wwn", false, false,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "hostdev-pci", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "hostdev-pci", false, true,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "hostdev-pci", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "hostdev-pci", false, false,
                    "device_del", QMP_DEVICE_DELETED("hostdev0") QMP_OK);
-    DO_TEST_ATTACH("pseries-base-live", "hostdev-pci", false, true,
+    DO_TEST_ATTACH("ppc64", "pseries-base-live", "hostdev-pci", false, true,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("pseries-base-live", "hostdev-pci", false, false,
+    DO_TEST_DETACH("ppc64", "pseries-base-live", "hostdev-pci", false, false,
                    "device_del", QMP_DEVICE_DELETED("hostdev0") QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "interface-vdpa", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "interface-vdpa", false, true,
                    "query-fdsets", "{\"return\":[{\"fdset-id\":99999}]}",
                    "add-fd", "{ \"return\": { \"fdset-id\": 1, \"fd\": 95 }}",
                    "netdev_add", QMP_OK, "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "interface-vdpa", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "interface-vdpa", false, false,
                    "device_del", QMP_DEVICE_DELETED("net0") QMP_OK,
                    "netdev_del", QMP_OK,
                    "query-fdsets",
@@ -894,50 +895,51 @@ mymain(void)
                    "remove-fd", QMP_OK
                    );
 
-    DO_TEST_ATTACH("base-live", "watchdog", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "watchdog", false, true,
                    "set-action", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "watchdog-full", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "watchdog-full", false, false,
                    "device_del", QMP_DEVICE_DELETED("watchdog0") QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "watchdog-user-alias", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "watchdog-user-alias", false, true,
                    "set-action", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "watchdog-user-alias-full", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "watchdog-user-alias-full", false, false,
                    "device_del", QMP_DEVICE_DELETED("ua-UserWatchdog") QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "guestfwd", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "guestfwd", false, true,
                    "getfd", QMP_OK,
                    "chardev-add", QMP_OK,
                    "netdev_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "guestfwd", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "guestfwd", false, false,
                    "netdev_del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "cdrom-usb", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "cdrom-usb", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "cdrom-usb", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "cdrom-usb", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "cdrom-usb", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "cdrom-usb", false, false,
                    "device_del", QMP_DEVICE_DELETED("usb-disk4") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-    DO_TEST_ATTACH("base-live", "cdrom-scsi", false, true,
+    DO_TEST_ATTACH("x86_64", "base-live", "cdrom-scsi", false, true,
                    "blockdev-add", QMP_OK,
                    "blockdev-add", QMP_OK,
                    "device_add", QMP_OK);
-    DO_TEST_DETACH("base-live", "cdrom-scsi", true, true,
+    DO_TEST_DETACH("x86_64", "base-live", "cdrom-scsi", true, true,
                    "device_del", QMP_OK);
-    DO_TEST_DETACH("base-live", "cdrom-scsi", false, false,
+    DO_TEST_DETACH("x86_64", "base-live", "cdrom-scsi", false, false,
                    "device_del", QMP_DEVICE_DELETED("scsi0-0-0-4") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
-#define DO_TEST_CPU_GROUP(prefix, vcpus, modernhp, expectfail) \
+#define DO_TEST_CPU_GROUP(archname, prefix, vcpus, modernhp, expectfail) \
     do { \
         cpudata.test = prefix; \
+        cpudata.arch = archname; \
         cpudata.newcpus = vcpus; \
         cpudata.modern = modernhp; \
         cpudata.fail = expectfail; \
@@ -946,15 +948,16 @@ mymain(void)
             ret = -1; \
     } while (0)
 
-    DO_TEST_CPU_GROUP("x86-modern-bulk", 7, true, false);
-    DO_TEST_CPU_GROUP("ppc64-modern-bulk", 24, true, false);
-    DO_TEST_CPU_GROUP("ppc64-modern-bulk", 15, true, true);
-    DO_TEST_CPU_GROUP("ppc64-modern-bulk", 23, true, true);
-    DO_TEST_CPU_GROUP("ppc64-modern-bulk", 25, true, true);
+    DO_TEST_CPU_GROUP("x86_64", "x86-modern-bulk", 7, true, false);
+    DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 24, true, false);
+    DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 15, true, true);
+    DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 23, true, true);
+    DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 25, true, true);
 
-#define DO_TEST_CPU_INDIVIDUAL(prefix, mapstr, statefl, modernhp, expectfail) \
+#define DO_TEST_CPU_INDIVIDUAL(archname, prefix, mapstr, statefl, modernhp, expectfail) \
     do { \
         cpudata.test = prefix; \
+        cpudata.arch = archname; \
         cpudata.cpumap = mapstr; \
         cpudata.state = statefl; \
         cpudata.modern = modernhp; \
@@ -964,13 +967,13 @@ mymain(void)
             ret = -1; \
     } while (0)
 
-    DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "7", true, true, false);
-    DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "6,7", true, true, true);
-    DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "7", false, true, true);
+    DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", true, true, false);
+    DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "6,7", true, true, true);
+    DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", false, true, true);
 
-    DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "16-23", true, true, false);
-    DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "16-22", true, true, true);
-    DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "17", true, true, true);
+    DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-23", true, true, false);
+    DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-22", true, true, true);
+    DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "17", true, true, true);
 
     qemuTestDriverFree(&driver);
     virObjectUnref(data.vm);
index a7ada18bf3e22c07c3ca5e8f77339ac6e571aac2..afb2c85bc21476b6ac468c5fd2c41bcc468de6c0 100644 (file)
@@ -42,7 +42,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='1' dies='1' cores='4' threads='8'/>
   </cpu>
   <clock offset='utc'/>
@@ -51,7 +52,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
index 3932fd9b55ce74711164769f98321be6465ec283..d86247d70c6c2a17cd0dff4558b3ae886894b7dd 100644 (file)
@@ -42,7 +42,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='1' dies='1' cores='4' threads='8'/>
   </cpu>
   <clock offset='utc'/>
@@ -51,7 +52,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index f3a1efeede1e755525c03c610e7fae1ff7bac002..e8d30f7ddd63679f55f5dc2e2623cd22becb4a0e 100644 (file)
@@ -42,7 +42,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='1' dies='1' cores='4' threads='8'/>
   </cpu>
   <clock offset='utc'/>
@@ -51,7 +52,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
index 6d64ead3d0aab2748102689b71bfd98b5d8d09b0..afc500657c532f5a82e11cbadf35b6f0de09caca 100644 (file)
@@ -42,7 +42,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='1' dies='1' cores='4' threads='8'/>
   </cpu>
   <clock offset='utc'/>
@@ -51,7 +52,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 87eb19ebd8c749af5d270a6379e9f19e899fe467..8d52ffedb4b109fcfe6aee7ea4d3f35cee2a0733 100644 (file)
@@ -18,7 +18,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='4' dies='1' cores='2' threads='1'/>
   </cpu>
   <clock offset='utc'/>
@@ -27,7 +28,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
index 251634e26642b6f6e028c5b892a95feec6852824..f416397e33cd4d9b079dbeedd67e1bfd119db224 100644 (file)
@@ -18,7 +18,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='4' dies='1' cores='2' threads='1'/>
   </cpu>
   <clock offset='utc'/>
@@ -27,7 +28,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 140892aaf8f29ad565744bab3b86a920a448faff..0bd2af8e43c2e6df2018036c6175b71eb990d507 100644 (file)
@@ -18,7 +18,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='4' dies='1' cores='2' threads='1'/>
   </cpu>
   <clock offset='utc'/>
@@ -27,7 +28,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
index 45196ba1d1e59d4c90949de1ef0f91afc5a69f5a..b31e6ebe5521c066bbc2df78b224fa0e889e525c 100644 (file)
@@ -18,7 +18,8 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='network'/>
   </os>
-  <cpu>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
     <topology sockets='4' dies='1' cores='2' threads='1'/>
   </cpu>
   <clock offset='utc'/>
@@ -27,7 +28,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 4036adde89e3a29d5c41424351512ee178fd540c..798a7ab7328cc3002b1c620a03a93b9c5711a204 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 2eb7f9eb0ebc6a358f2919f57820e539f44bc3dc..5d2769c4204b6b3ed8b994032e935d2d04cb03ae 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 935925bdbafb78f8eb8e1b7567ee6b82558987f0..845c0e1c98f6e65c8639dd55ddbcf1d92cb4849f 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 51fe4b461a0fca2b40475b60721a8226b52b4296..29b8fdd6c8c36832d5e80bf8f4d9c2c29c4a7ec5 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 51fe4b461a0fca2b40475b60721a8226b52b4296..29b8fdd6c8c36832d5e80bf8f4d9c2c29c4a7ec5 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index adec14151225559246174b72f08c7f2f0b5014cc..82402ffe1b96e6f037e30322a4a7b5c93d1cf489 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 2267fe39df5f6246e4f8255719d4376518ec3b4c..6eb60b13a97b909f8fc3b4b718cbfb784aa4ba3c 100644 (file)
@@ -13,6 +13,7 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='host-model' check='partial'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     <emulator>/usr/bin/qemu-system-s390x</emulator>
     <controller type='usb' index='0'>
       <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'>
+        <zpci uid='0x0001' fid='0x00000000'/>
+      </address>
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'>
+        <zpci uid='0x0002' fid='0x00000001'/>
+      </address>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'>
+        <zpci uid='0x0003' fid='0x00000002'/>
+      </address>
     </controller>
     <audio id='1' type='none'/>
     <memballoon model='none'/>
index 922e9c1b4ee8be37dcc7b7e470942edabaa2201e..435319119726c1deeb0e2c3b2be808b091c971b2 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -28,7 +31,7 @@
       <alias name='scsi0-0-0-4'/>
       <address type='drive' controller='0' bus='0' target='0' unit='4'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index ba8ce3b2c8f8a439e21a52dd57db855f81d09d86..d31136dbc89e92075561966c19be6e509261e529 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -28,7 +31,7 @@
       <alias name='usb-disk4'/>
       <address type='usb' bus='0' port='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index bea59403bed0d9fbbbaa0a4e686595b26de5f161..0a0fbc1c95832c200f92f0fb861743a0ecc89a8b 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -31,7 +34,7 @@
       <alias name='scsi0-0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index b3089b2006bcadc41317b2d70781fb43d9a6cfec..732a27be43887ea052baac43191095ce8aaf24b6 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -41,7 +44,7 @@
       <alias name='scsi0-0-0-6'/>
       <address type='drive' controller='0' bus='0' target='0' unit='6'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 4241b3b71a2367cafc68c80e3681a9e3d5cec16b..8bff04a4b6def8db217a3d2e35aee0ffcd73d953 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -29,7 +32,7 @@
       <alias name='scsi0-0-0-5'/>
       <address type='drive' controller='0' bus='0' target='0' unit='5'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 4202ded5b346254ecd758681b912286021726060..5964c23ba0dbf0a9f054b541c8ebac2d213ecd5b 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -29,7 +32,7 @@
       <alias name='usb-disk16'/>
       <address type='usb' bus='0' port='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 02851d4ca1b1ed1a73ae2b89411a4b3b57832b84..684b3c26de3858ba9d699eb704987d923607d602 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -29,7 +32,7 @@
       <alias name='virtio-disk4'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 3bf64326c546a4a29fefa076f24b89a6e7c878c8..da5e446cf6cc37304c198e061fa4f83e58d6ec1e 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index d8b0c80febb2e845b8679bb03b262da58da1b831..e49e21c53eb5bd9e740377a32395d4866bd7cc9f 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index f80dc42ac51c33034f8927f47dafac48105ec944..d1459d5c75f9643770ebce373dcc7359a8782e83 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index b0898a968bbcb621faddfe83b364005979ed992b..84a1286eb52e9a547c784f40338e9ff30d952e64 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index db21d2b5ba6816081b8621f78a61b7d4affd5d82..ac50d6bdfc18e0b143399d7d34ebe1736a406ce4 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index c288b502aaec546b38db2b241c2a335b586e20ee..0e4c3907bfbc7de27fe8f43f3f376db203dbf843 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index f54c7a4599c25a78f6201bd5701b373c99108a84..86c8a8bb260dbec04a8640c55e9e5c86221876a0 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index bd85c56ce69938ceee105e5217d511f3983421c6..11f7987964bc9177f28e1592ecd3ae69177ca0af 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index a02bc396636961c26df3badec569b061f7a3362b..82dfef6dd0bb98041c75d932d17e7381bdb091a2 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 939cea4cbe954dc8d0ac6745bf83b609bf72ac28..29e4008070ce6048cd12e6a58a50c73e58c4ab86 100644 (file)
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 97f651374d42d00ad623ced59120b173dae471c3..6044179cbbd7a9d8bdb14515129142100e8ddea9 100644 (file)
@@ -13,6 +13,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -29,7 +32,7 @@
       <alias name='scsi3-0-6'/>
       <address type='drive' controller='3' bus='0' target='0' unit='6'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 72516555a0befc874ba5e9c5137081d5adac6e20..24d061ea7b0b06204357edd76efd080ff275c3c0 100644 (file)
@@ -16,6 +16,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -45,7 +48,7 @@
       <alias name='ide'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 6197a2bfe319d3ac50e607b56aeea4fea5941343..1665a9e3ea6766048a4036daac85eb9209307b79 100644 (file)
@@ -16,6 +16,9 @@
     <apic/>
     <pae/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -45,7 +48,7 @@
       <alias name='ide'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index 6a60a388a9c858039b4221701c934a040a1f3709..13d10e57aa194e1444c9f67c3fa04facf454644d 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='ppc64' machine='pseries'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER9</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -24,7 +27,7 @@
       <target index='1'/>
       <alias name='pci.1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='pci-ohci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
     </controller>
index e9b89a7acc9738ab835e41cedd19e6900c49729d..f31ae0013ef99a9aa09c4ff01c00e683620d961a 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='ppc64' machine='pseries'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER9</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -24,7 +27,7 @@
       <target index='1'/>
       <alias name='pci.1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='pci-ohci'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
     </controller>