libvirt/tests/qemucapabilitiesdata
Jiri Denemark df13c0b477 qemu: Add support for guest CPU cache
This patch maps /domain/cpu/cache element into -cpu parameters:

- <cache mode='passthrough'/> is translated to host-cache-info=on
- <cache level='3' mode='emulate'/> is transformed into l3-cache=on
- <cache mode='disable'/> is turned in host-cache-info=off,l3-cache=off

Any other <cache> element is forbidden.

The tricky part is detecting whether QEMU supports the CPU properties.

The 'host-cache-info' property is introduced in v2.4.0-1389-ge265e3e480,
earlier QEMU releases enabled host-cache-info by default and had no way
to disable it. If the property is present, it defaults to 'off' for any
QEMU until at least 2.9.0.

The 'l3-cache' property was introduced later by v2.7.0-200-g14c985cffa.
Earlier versions worked as if l3-cache=off was passed. For any QEMU
until at least 2.9.0 l3-cache is 'off' by default.

QEMU 2.9.0 was the first release which supports probing both properties
by running device-list-properties with typename=host-x86_64-cpu. Older
QEMU releases did not support device-list-properties command for CPU
devices. Thus we can't really rely on probing them and we can just use
query-cpu-model-expansion QMP command as a witness.

Because the cache property probing is only reliable for QEMU >= 2.9.0
when both are already supported for quite a few releases, we let QEMU
report an error if a specific cache mode is explicitly requested. The
other mode (or both if a user requested CPU cache to be disabled) is
explicitly turned off for QEMU >= 2.9.0 to avoid any surprises in case
the QEMU defaults change. Any older QEMU already turns them off so not
doing so explicitly does not make any harm.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-04-27 22:41:10 +02:00
..
caps_1.2.2.x86_64.replies tests: Update capabilities for QEMU 1.2.2 2016-11-25 20:34:27 +01:00
caps_1.2.2.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_1.3.1.x86_64.replies tests: Update capabilities for QEMU 1.3.1 2016-11-25 20:34:27 +01:00
caps_1.3.1.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_1.4.2.x86_64.replies tests: Update capabilities for QEMU 1.4.2 2016-11-25 20:34:27 +01:00
caps_1.4.2.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_1.5.3.x86_64.replies tests: Update capabilities for QEMU 1.5.3 2016-11-25 20:34:27 +01:00
caps_1.5.3.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_1.6.0.x86_64.replies tests: Update capabilities for QEMU 1.6.0 2016-11-25 20:34:27 +01:00
caps_1.6.0.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_1.7.0.x86_64.replies tests: Update capabilities for QEMU 1.7.0 2016-11-25 20:34:27 +01:00
caps_1.7.0.x86_64.xml qemu: skip QMP probing of CPU definitions when missing 2017-03-17 10:51:49 +01:00
caps_2.1.1.x86_64.replies tests: Update capabilities for QEMU 2.1.1 2016-11-25 20:34:27 +01:00
caps_2.1.1.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.4.0.x86_64.replies tests: Update capabilities for QEMU 2.4.0 2016-11-25 20:34:27 +01:00
caps_2.4.0.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.5.0.x86_64.replies tests: Update capabilities for QEMU 2.5.0 2016-11-25 20:34:27 +01:00
caps_2.5.0.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.6.0-gicv2.aarch64.replies tests: Update capabilities for QEMU 2.6.0 (aarch64, GICv2) 2016-11-25 20:34:27 +01:00
caps_2.6.0-gicv2.aarch64.xml qemu: Advertise ACPI support for aarch64 guests 2017-04-03 10:58:00 +02:00
caps_2.6.0-gicv3.aarch64.replies tests: Update capabilities for QEMU 2.6.0 (aarch64, GICv3) 2016-11-25 20:59:34 +01:00
caps_2.6.0-gicv3.aarch64.xml qemu: Advertise ACPI support for aarch64 guests 2017-04-03 10:58:00 +02:00
caps_2.6.0.ppc64le.replies tests: Update capabilities for QEMU 2.6.0 (ppc64le) 2016-11-25 20:59:57 +01:00
caps_2.6.0.ppc64le.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.6.0.x86_64.replies tests: Update capabilities for QEMU 2.6.0 2016-11-25 20:34:27 +01:00
caps_2.6.0.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.7.0.s390x.replies test-data: Qemu caps replies and xml for s390x qemu 2.7 and 2.8 2017-01-06 12:24:56 +01:00
caps_2.7.0.s390x.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.7.0.x86_64.replies tests: Update capabilities for QEMU 2.7.0 2016-11-25 21:00:19 +01:00
caps_2.7.0.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.8.0.s390x.replies qemu: Check migratable host CPU features 2017-03-30 09:59:42 +02:00
caps_2.8.0.s390x.xml qemuMonitorCPUModelInfo: Add support for non-migratable features 2017-03-30 09:59:42 +02:00
caps_2.8.0.x86_64.replies tests: update QEMU 2.8.0 caps data 2017-02-20 12:46:15 +01:00
caps_2.8.0.x86_64.xml qemu: capabilities: add capability for query-named-block-nodes qmp cmd 2017-03-27 10:35:19 +02:00
caps_2.9.0.x86_64.replies tests: update QEMU 2.9.0 caps data to final version 2017-04-26 19:34:25 +02:00
caps_2.9.0.x86_64.xml qemu: Add support for guest CPU cache 2017-04-27 22:41:10 +02:00