[PATCH v3 42/52] qemu: Probe machine types for both KVM and TCG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Almost all TCG query-machines replies match KVM. The only exceptions are
4.2.0 replies on s390x which differ in the reported default CPU type.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---

Notes:
    Version 3:
    - new patch

 src/qemu/qemu_capabilities.c                  |   3 +-
 .../caps_1.5.3.x86_64.replies                 |  78 +++
 .../caps_1.6.0.x86_64.replies                 |  86 +++
 .../caps_1.7.0.x86_64.replies                 |  94 +++
 .../caps_2.1.1.x86_64.replies                 | 110 ++++
 .../caps_2.10.0.aarch64.replies               | 272 +++++++++
 .../caps_2.10.0.ppc64.replies                 | 123 ++++
 .../caps_2.10.0.s390x.replies                 |  53 ++
 .../caps_2.10.0.x86_64.replies                | 194 ++++++
 .../caps_2.11.0.s390x.replies                 |  58 ++
 .../caps_2.11.0.x86_64.replies                | 194 ++++++
 .../caps_2.12.0.aarch64.replies               | 302 ++++++++++
 .../caps_2.12.0.ppc64.replies                 | 143 +++++
 .../caps_2.12.0.s390x.replies                 |  63 ++
 .../caps_2.12.0.x86_64.replies                | 204 +++++++
 .../caps_2.4.0.x86_64.replies                 | 134 +++++
 .../caps_2.5.0.x86_64.replies                 | 142 +++++
 .../caps_2.6.0.aarch64.replies                | 180 ++++++
 .../caps_2.6.0.ppc64.replies                  |  77 +++
 .../caps_2.6.0.x86_64.replies                 | 118 ++++
 .../caps_2.7.0.s390x.replies                  |  38 ++
 .../caps_2.7.0.x86_64.replies                 | 154 +++++
 .../caps_2.8.0.s390x.replies                  |  43 ++
 .../caps_2.8.0.x86_64.replies                 | 174 ++++++
 .../caps_2.9.0.ppc64.replies                  | 118 ++++
 .../caps_2.9.0.s390x.replies                  |  48 ++
 .../caps_2.9.0.x86_64.replies                 | 184 ++++++
 .../caps_3.0.0.ppc64.replies                  | 148 +++++
 .../caps_3.0.0.riscv32.replies                |  42 ++
 .../caps_3.0.0.riscv64.replies                |  42 ++
 .../caps_3.0.0.s390x.replies                  |  68 +++
 .../caps_3.0.0.x86_64.replies                 | 214 +++++++
 .../caps_3.1.0.ppc64.replies                  | 153 +++++
 .../caps_3.1.0.x86_64.replies                 | 224 +++++++
 .../caps_4.0.0.aarch64.replies                | 347 +++++++++++
 .../caps_4.0.0.ppc64.replies                  | 158 +++++
 .../caps_4.0.0.riscv32.replies                |  42 ++
 .../caps_4.0.0.riscv64.replies                |  42 ++
 .../caps_4.0.0.s390x.replies                  |  78 +++
 .../caps_4.0.0.x86_64.replies                 | 224 +++++++
 .../caps_4.1.0.x86_64.replies                 | 329 +++++++++++
 .../caps_4.2.0.aarch64.replies                | 556 ++++++++++++++++++
 .../caps_4.2.0.ppc64.replies                  | 267 +++++++++
 .../caps_4.2.0.s390x.replies                  | 132 +++++
 .../caps_4.2.0.x86_64.replies                 | 389 ++++++++++++
 45 files changed, 6841 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index d2f307f6a9..1dedcbe5ad 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4724,7 +4724,8 @@ virQEMUCapsInitQMPMonitorTCG(virQEMUCapsPtr qemuCaps,
     if (virQEMUCapsProbeQMPHostCPU(qemuCaps, accel, mon, VIR_DOMAIN_VIRT_QEMU) < 0)
         return -1;
 
-    virQEMUCapsAccelCopyMachineTypes(&qemuCaps->tcg, &qemuCaps->kvm);
+    if (virQEMUCapsProbeQMPMachineTypes(qemuCaps, accel, mon) < 0)
+        return -1;
 
     return 0;
 }
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies
index a62b4e98f4..e74273e0d3 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies
@@ -3145,3 +3145,81 @@
   ],
   "id": "libvirt-2"
 }
+
+{
+  "execute": "query-machines",
+  "id": "libvirt-3"
+}
+
+{
+  "return": [
+    {
+      "name": "pc-q35-1.4",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-q35-1.5",
+      "cpu-max": 255,
+      "alias": "q35"
+    },
+    {
+      "name": "isapc",
+      "cpu-max": 1
+    },
+    {
+      "name": "pc-0.10",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-0.11",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-0.12",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-0.13",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-0.14",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-0.15",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-1.0",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-1.1",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-1.2",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-1.3",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-i440fx-1.4",
+      "cpu-max": 255
+    },
+    {
+      "name": "pc-i440fx-1.5",
+      "is-default": true,
+      "cpu-max": 255,
+      "alias": "pc"
+    },
+    {
+      "name": "none",
+      "cpu-max": 1
+    }
+  ],
+  "id": "libvirt-3"
+}
...

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux