[libvirt] [PATCH v2 05/31] qemu: Enable KVM when probing capabilities

Pavel Hrdina phrdina at redhat.com
Thu Nov 24 14:42:36 UTC 2016


On Mon, Nov 21, 2016 at 12:21:01AM +0100, Jiri Denemark wrote:
> CPU related capabilities may differ depending on accelerator used when
> probing. Let's use KVM if available when probing QEMU and fall back to
> TCG. The created capabilities already contain all we need to distinguish
> whether KVM or TCG was used:
> 
>     - KVM was used when probing capabilities:
>         QEMU_CAPS_KVM is set
>         QEMU_CAPS_ENABLE_KVM is not set
> 
>     - TCG was used and QEMU supports KVM, but it failed (e.g., missing
>       kernel module or wrong /dev/kvm permissions)
>         QEMU_CAPS_KVM is not set
>         QEMU_CAPS_ENABLE_KVM is set
> 
>     - KVM was not used and QEMU does not support it
>         QEMU_CAPS_KVM is not set
>         QEMU_CAPS_ENABLE_KVM is not set
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c | 45 +++++++++++++++++++++++++++++++++++++++++---
>  src/qemu/qemu_capabilities.h |  3 ---
>  src/qemu/qemu_capspriv.h     |  8 ++++++++
>  tests/qemucapabilitiestest.c |  5 +++++
>  4 files changed, 55 insertions(+), 6 deletions(-)

ACK

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161124/b6ac23e5/attachment-0001.sig>


More information about the libvir-list mailing list