mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
df13c0b477
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> |
||
---|---|---|
.. | ||
caps_1.2.2.x86_64.replies | ||
caps_1.2.2.x86_64.xml | ||
caps_1.3.1.x86_64.replies | ||
caps_1.3.1.x86_64.xml | ||
caps_1.4.2.x86_64.replies | ||
caps_1.4.2.x86_64.xml | ||
caps_1.5.3.x86_64.replies | ||
caps_1.5.3.x86_64.xml | ||
caps_1.6.0.x86_64.replies | ||
caps_1.6.0.x86_64.xml | ||
caps_1.7.0.x86_64.replies | ||
caps_1.7.0.x86_64.xml | ||
caps_2.1.1.x86_64.replies | ||
caps_2.1.1.x86_64.xml | ||
caps_2.4.0.x86_64.replies | ||
caps_2.4.0.x86_64.xml | ||
caps_2.5.0.x86_64.replies | ||
caps_2.5.0.x86_64.xml | ||
caps_2.6.0-gicv2.aarch64.replies | ||
caps_2.6.0-gicv2.aarch64.xml | ||
caps_2.6.0-gicv3.aarch64.replies | ||
caps_2.6.0-gicv3.aarch64.xml | ||
caps_2.6.0.ppc64le.replies | ||
caps_2.6.0.ppc64le.xml | ||
caps_2.6.0.x86_64.replies | ||
caps_2.6.0.x86_64.xml | ||
caps_2.7.0.s390x.replies | ||
caps_2.7.0.s390x.xml | ||
caps_2.7.0.x86_64.replies | ||
caps_2.7.0.x86_64.xml | ||
caps_2.8.0.s390x.replies | ||
caps_2.8.0.s390x.xml | ||
caps_2.8.0.x86_64.replies | ||
caps_2.8.0.x86_64.xml | ||
caps_2.9.0.x86_64.replies | ||
caps_2.9.0.x86_64.xml |