Commit Graph

10 Commits

Author SHA1 Message Date
Ján Tomko
a7424faff0 Force QMP capability probing
Remove the qmpOnly argument of virQEMUCapsNewForBinaryInternal
and instead always assume it's true.

This effectively sets the minimum QEMU version to 1.2.0.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-04-10 15:16:23 +02:00
Jiri Denemark
52b7d910b6 qemu: Refresh caps cache after booting a different kernel
Whenever a different kernel is booted, some capabilities related to KVM
(such as CPUID bits) may change. We need to refresh the cache to see the
changes.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-22 14:11:58 +01:00
Paolo Bonzini
b527589d1f qemu: capabilities: force update if the microcode version does not match
A microcode update can cause the CPUID bits to change; an example
from the past was the update that disabled TSX on several Haswell
and Broadwell machines.

Therefore, place microcode version in the virQEMUCaps struct and
XML, and rebuild the cache if the versions do not match.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-01-04 16:52:03 +01:00
Pavel Hrdina
f366cfed62 qemu: pass only host arch instead of the whole virCaps
This is a preparation for following patches where we switch to
virFileCache for QEMU capabilities cache

The host arch will always remain the same but virCaps may change.  Now
the host arch is stored while creating new qemu capabilities cache.
It removes the need to pass virCaps into virQEMUCapsCache*() functions.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2017-07-26 15:35:24 +02:00
Pavel Hrdina
7fb4c471d1 qemu: separate virQEMUCapsInitCached out of virQEMUCapsNewForBinaryInternal
Preparation for switching to virFileCache where there are two callbacks,
one to get a new data and second one to load a cached data.

This also removes virQEMUCapsReset which is no longer required.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2017-07-20 14:02:53 +02:00
Andrea Bolognani
4ceac4bf29 tests: Rename VIRT_TEST_* macros to VIR_TEST_*
We use the "vir" prefix pretty consistently in our
APIs, both external and internal, which made these
macros stood out.
2017-04-04 17:30:03 +02:00
Andrea Bolognani
26026810ea qemu: Fix typo in __QEMU_CAPSPRIV_H_ALLOW__ 2017-03-23 10:24:34 +01:00
Jiri Denemark
b27adaed37 qemu: Propagate virCapsPtr to virQEMUCapsNewForBinaryInternal
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-09-22 15:40:08 +02:00
Jovanka Gulicoska
c66150eca1 tests: More usage of virGetLastErrorMessage()
Use virGetLastErrorMessage() instead of virGetLastError() in tests
2016-05-19 15:17:03 -04:00
Jiri Denemark
f943a28ca8 tests: Add qemucapsprobe helper
Adding new *.replies files for qemucapabilitiestest or updating the
files when libvirt adds an additional QMP command into the probing
process is quite painful. The goal of the new qemucapsprobe command is
to make this process as easy as

    tests/qemucapsprobe /path/to/qemu/binary >caps.replies

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-05-05 10:01:55 +02:00