]> xenbits.xensource.com Git - libvirt.git/commit
s390: qemu-capabilities: Avoid error message when missing non-kvm host cpu info
authorJason J. Herne <jjherne@linux.vnet.ibm.com>
Fri, 24 Nov 2017 08:02:02 +0000 (09:02 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 24 Nov 2017 15:53:56 +0000 (16:53 +0100)
commit74fc32a955e12c40aba3be902f857d832a1deb9a
tree4a72efee598e84a0e698b62bc90428ef626d2971
parent6caf67f83451aef002ba3167904d2e987906e25e
s390: qemu-capabilities: Avoid error message when missing non-kvm host cpu info

Libvirt prints an error on startup when it is missing host cpu model
information for any queried qemu binary. On s390 we only have host cpu model
information for kvm enabled qemu instances. So when virt type is not kvm, this
is actually not an error on s390.

This patch adds virt type as a parameter to virQEMUCapsInitCPUModelS390, and a
new return code 2 for virQEMUCapsInitCPUModel and virQEMUCapsInitCPUModelS390.
If the virt type is not kvm then we skip printing the scary error message
and return 2 because this case is actually expected behavior. The new return
code is meant to differentiate between the failure case and the case where we
simply expect the cpu model information to be unattainable.

Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c