提交 b37b41f8 编写于 作者: A Andrea Bolognani

qemu: Don't duplicate binary name in capabilities

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: NAndrea Bolognani <abologna@redhat.com>
上级 99d5a516
......@@ -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) {
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
......@@ -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/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册