]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Check non-migratable host CPU features v3.2.0-rc2
authorJiri Denemark <jdenemar@redhat.com>
Wed, 29 Mar 2017 09:00:32 +0000 (11:00 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 30 Mar 2017 07:59:42 +0000 (09:59 +0200)
commit385c1cc96c54c88fad3e371ab6966f5c5a098441
tree529850d3e45076658e7e6b650cd4ff13385965c8
parent91927c62d8753bbf71154d96daec1d42fcfe35b7
qemu: Check non-migratable host CPU features

CPU features which change their value from disabled to enabled between
two calls to query-cpu-model-expansion (the first with no extra
properties set and the second with 'migratable' property set to false)
can be marked as enabled and non-migratable in qemuMonitorCPUModelInfo.

Since the code consuming qemuMonitorCPUModelInfo currently ignores the
migratable flag, this change is effectively changing the CPU model
advertised in domain capabilities to contain all features (even those
which block migration). And this matches what we do for QEMU older than
2.9.0, when we detect all CPUID bits ourselves without asking QEMU.

As a result of this change

    <cpu mode='host-model'>
      <feature name='invtsc' policy='require'/>
    </cpu>

will work with all QEMU versions. Such CPU definition would be forbidden
with QEMU >= 2.9.0 without this patch.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c
tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml