]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't duplicate binary name in capabilities
authorAndrea Bolognani <abologna@redhat.com>
Fri, 14 Sep 2018 11:10:27 +0000 (13:10 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 21 Sep 2018 13:53:42 +0000 (15:53 +0200)
virCapabilitiesAddGuestDomain() takes an optional binary
name: this is intended for cases where a certain domain
type can't use the default one registered for the guest
architecture, but has to use a special binary instead.

The current code, however, will pass 'binary' again when
'kvmbin' is not defined, which is unnecessary as 'binary'
has been registered as default earlier, and will result
in capabilities output such as

  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <domain type='qemu'/>
  <domain type='kvm'>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
  </domain>

with the second <emulator> element providing no additional
information.

Change it so that, when 'kvmbin' is not defined, NULL is
passed and so the default emulator will be used instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
29 files changed:
src/qemu/qemu_capabilities.c
tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml
tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml
tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml
tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml
tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml
tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml
tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml
tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml
tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml
tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml
tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml
tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml

index 2bfd94995f00a0a4c89427d1ecd8b4c75f6ec9b8..ed92e99b90e7f0ddfcad061051a32d816ad8dd4f 100644 (file)
@@ -885,7 +885,7 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
 
         if ((dom = virCapabilitiesAddGuestDomain(guest,
                                                  VIR_DOMAIN_VIRT_KVM,
-                                                 kvmbin ? kvmbin : binary,
+                                                 kvmbin ? kvmbin : NULL,
                                                  NULL,
                                                  nmachines,
                                                  machines)) == NULL) {
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index a879d67df32bedfcbff4609617cc44732aa44a93..f6572c8ecd4b5a30f7df3c15f366c1dfb4981eeb 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-aarch64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-aarch64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 74eaf3ba0eebf9efeb9fc15722fcb91e61f8ffc9..85623f39804cda36cdeb2be8c888984424068ef6 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-ppc64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-ppc64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index a879d67df32bedfcbff4609617cc44732aa44a93..f6572c8ecd4b5a30f7df3c15f366c1dfb4981eeb 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-aarch64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-aarch64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 74eaf3ba0eebf9efeb9fc15722fcb91e61f8ffc9..85623f39804cda36cdeb2be8c888984424068ef6 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-ppc64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-ppc64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index a879d67df32bedfcbff4609617cc44732aa44a93..f6572c8ecd4b5a30f7df3c15f366c1dfb4981eeb 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-aarch64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-aarch64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 74eaf3ba0eebf9efeb9fc15722fcb91e61f8ffc9..85623f39804cda36cdeb2be8c888984424068ef6 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-ppc64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-ppc64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 74eaf3ba0eebf9efeb9fc15722fcb91e61f8ffc9..85623f39804cda36cdeb2be8c888984424068ef6 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-ppc64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-ppc64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 20ef995d62d4baac59ab9f624871d46bfb148556..bb82a150409ef3970ce160e29930f85febd546c4 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-s390x</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-s390x</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index 74eaf3ba0eebf9efeb9fc15722fcb91e61f8ffc9..85623f39804cda36cdeb2be8c888984424068ef6 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-ppc64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-ppc64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>
index b58f54fefda7ede7c2c08f06eee2e58e3fc10bc4..d41693a00173fe2dc17c27569da817ce7343ebc7 100644 (file)
@@ -14,9 +14,7 @@
       <wordsize>64</wordsize>
       <emulator>/usr/bin/qemu-system-x86_64</emulator>
       <domain type='qemu'/>
-      <domain type='kvm'>
-        <emulator>/usr/bin/qemu-system-x86_64</emulator>
-      </domain>
+      <domain type='kvm'/>
     </arch>
     <features>
       <cpuselection/>