]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Make non-KVM machines work with QMP probing
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 31 Oct 2012 07:31:49 +0000 (08:31 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 31 Oct 2012 07:31:49 +0000 (08:31 +0100)
commit037a49dc6613c8785b6925936623200bad812a82
tree012af3906bb526b37c3bbccf8c50af177df81db0
parentadaa7ab653b0f841aa549e9f47f9e63ee1d15b37
Make non-KVM machines work with QMP probing

When there is no 'qemu-kvm' binary and the emulator used for a machine
is, for example, 'qemu-system-x86_64' that, by default, runs without
kvm enabled, libvirt still supplies '-no-kvm' option to this process,
even though it does not recognize such option (making the start of a
domain fail in that case).

This patch fixes building a command-line for QEMU machines without KVM
acceleration and is based on following assumptions:

 - QEMU_CAPS_KVM flag means that QEMU is running KVM accelerated
   machines by default (without explicitly requesting that using a
   command-line option).  It is the closest to the truth according to
   the code with the only exception being the comment next to the
   flag, so it's fixed in this patch as well.

 - QEMU_CAPS_ENABLE_KVM flag means that QEMU is, by default, running
   without KVM acceleration and in case we need KVM acceleration it
   needs to be explicitly instructed to do so.  This is partially
   true for the past (this option essentially means that QEMU
   recognizes the '-enable-kvm' option, even though it's almost the
   same).
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h