The MSR infrastructure is already present in our cpu driver, but no
features were introduced yet since we needed additional support from
QEMU. This is now pushed upstream and we can finally enable MSR features
for QEMU.
However, one more bit is missing here: we need to make sure to not use
any MSR bits with QEMU which lack support for "unavailable-features" CPU
property, otherwise migration, snapshots and save/restore would be
broken. I'll send patches for this later to give more time for reviewing
the core of this series.
Jiri Denemark (24):
qemu: Drop qemuFeatureNoEffect
qemu_process: Drop cleanup label from qemuProcessUpdateGuestCPU
cpu_conf: Introduce virCPUDefFilterFeatures
qemu: Filter CPU features in active XML
qemuxml2argvtest: Switch some tests to DO_TEST_CAPS_*
qemu_command: Use consistent syntax for CPU features
tests: Add QEMU caps data for future 4.1.0
tests: Add domain capabilities case for QEMU 4.1.0
qemuxml2argvtest: Add 4.0.0 cases for kvm features tests
qemuxml2argvtest: Add test for CPU features translation
qemu: Add APIs for translating CPU features
qemu: Probe for max-x86_64-cpu type
qemu: Probe for "unavailable-features" CPU property
qemu: Probe host CPU after capabilities
qemu_command: Use canonical names of CPU features
qemu: Translate feature names from query-cpu-model-expansion
qemu: Don't use full CPU model expansion
qemu: Make qemuMonitorGetGuestCPU usable on x86 only
cpu: Introduce virCPUDataAddFeature
qemu: Add type filter to qemuMonitorJSONParsePropsList
qemu: Introduce generic qemuMonitorGetGuestCPU
qemu_process: Prefer generic qemuMonitorGetGuestCPU
cpu_x86: Read CPU features from IA32_ARCH_CAPABILITIES MSR
cpu_map: Introduce IA32_ARCH_CAPABILITIES MSR features
src/conf/cpu_conf.c | 22 +
src/conf/cpu_conf.h | 5 +
src/cpu/cpu.c | 33 +
src/cpu/cpu.h | 9 +
src/cpu/cpu_x86.c | 25 +-
src/cpu/cpu_x86.h | 3 -
src/cpu_map/x86_features.xml | 20 +
src/libvirt_private.syms | 3 +-
src/qemu/qemu_capabilities.c | 125 +-
src/qemu/qemu_capabilities.h | 11 +
src/qemu/qemu_capspriv.h | 3 +-
src/qemu/qemu_command.c | 65 +-
src/qemu/qemu_monitor.c | 51 +-
src/qemu/qemu_monitor.h | 11 +-
src/qemu/qemu_monitor_json.c | 272 +-
src/qemu/qemu_monitor_json.h | 8 +-
src/qemu/qemu_process.c | 70 +-
tests/cputest.c | 2 +-
.../x86_64-cpuid-Core-i7-7600U-enabled.xml | 1 +
.../x86_64-cpuid-Core-i7-7600U-json.xml | 1 +
...86_64-cpuid-Xeon-Platinum-8268-enabled.xml | 1 +
.../x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 4 +
.../x86_64-cpuid-Xeon-Platinum-8268-host.xml | 4 +
.../x86_64-cpuid-Xeon-Platinum-8268-json.xml | 3 +
.../qemu_3.1.0.x86_64.xml | 1 +
.../qemu_4.0.0.x86_64.xml | 1 +
.../qemu_4.1.0.x86_64.xml | 161 +
tests/domaincapstest.c | 5 +
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.x86_64.replies | 1104 +-
.../caps_2.12.0.x86_64.xml | 1 +
.../caps_2.9.0.x86_64.xml | 1 +
.../caps_3.0.0.x86_64.replies | 1132 +-
.../caps_3.0.0.x86_64.xml | 1 +
.../caps_3.1.0.x86_64.replies | 1180 +-
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.x86_64.replies | 1196 +-
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.replies | 22716 ++++++++++++++++
.../caps_4.1.0.x86_64.xml | 1267 +
tests/qemumonitorjsontest.c | 10 +-
.../cpu-host-model-cmt.x86_64-4.0.0.args | 37 +
.../cpu-translation.x86_64-4.0.0.args | 36 +
.../cpu-translation.x86_64-latest.args | 36 +
tests/qemuxml2argvdata/cpu-translation.xml | 34 +
.../cpu-tsc-frequency.x86_64-4.0.0.args | 36 +
...ed.args => eoi-disabled.x86_64-2.7.0.args} | 12 +-
.../eoi-disabled.x86_64-4.0.0.args | 33 +
.../eoi-disabled.x86_64-latest.args | 33 +
...led.args => eoi-enabled.x86_64-2.7.0.args} | 12 +-
.../eoi-enabled.x86_64-4.0.0.args | 33 +
.../eoi-enabled.x86_64-latest.args | 33 +
...> kvmclock+eoi-disabled.x86_64-2.7.0.args} | 12 +-
.../kvmclock+eoi-disabled.x86_64-4.0.0.args | 33 +
.../kvmclock+eoi-disabled.x86_64-latest.args | 33 +
...=> pv-spinlock-disabled.x86_64-2.7.0.args} | 12 +-
.../pv-spinlock-disabled.x86_64-4.0.0.args | 33 +
.../pv-spinlock-disabled.x86_64-latest.args | 33 +
... => pv-spinlock-enabled.x86_64-2.7.0.args} | 12 +-
.../pv-spinlock-enabled.x86_64-4.0.0.args | 33 +
.../pv-spinlock-enabled.x86_64-latest.args | 33 +
tests/qemuxml2argvtest.c | 22 +-
63 files changed, 29815 insertions(+), 308 deletions(-)
create mode 100644 tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_4.1.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
create mode 100644 tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/cpu-translation.xml
create mode 100644 tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args
rename tests/qemuxml2argvdata/{eoi-disabled.args => eoi-disabled.x86_64-2.7.0.args}
(65%)
create mode 100644 tests/qemuxml2argvdata/eoi-disabled.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{eoi-enabled.args => eoi-enabled.x86_64-2.7.0.args}
(65%)
create mode 100644 tests/qemuxml2argvdata/eoi-enabled.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{kvmclock+eoi-disabled.args =>
kvmclock+eoi-disabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{pv-spinlock-disabled.args =>
pv-spinlock-disabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{pv-spinlock-enabled.args =>
pv-spinlock-enabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-4.0.0.args
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args
--
2.22.0