]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Add capability for CFPC pSeries feature
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 27 Apr 2020 12:14:26 +0000 (09:14 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 27 Apr 2020 12:42:55 +0000 (14:42 +0200)
commita0a2c8ab7329e0e1e8639243fe8d669943a10193
tree56df1dde3c6ac545b85dfc0ba8222a06e4627769
parent606fb3979ab4eee0fe121cdca952f18dbeb61faf
qemu: Add capability for CFPC pSeries feature

CFPC (Cache Flush on Privilege Change) is one of the capabilities
added to QEMU to mitigate Spectre vulnerabilities in Power chips.
It was implemented in QEMU 2.12 by commit 6898aed77f46.

This capability is still used today due to differences in how
the host setup (hardware and firmware/kernel) can handle this
mitigation. Its default value also varies with the pseries machine
version of the time. There's also certain OSes, like AIX, that
might not support the default value of the pseries machine the
guest uses.

Exposing this in the Libvirt XML as a feature will allow users to tune
CFPC values in a cleaner way, instead of hacking parameters in
<qemu:commandline> elements.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml