]> git.proxmox.com Git - mirror_qemu.git/commit
spapr: Handle VMX/VSX presence as an spapr capability flag
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Dec 2017 06:08:47 +0000 (17:08 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 16 Jan 2018 22:35:24 +0000 (09:35 +1100)
commit2938664286499c0c30d6e455a7e2e5d3e6c3f63d
treec91ebdad207bc49c8b83b412f6c66f750b5dbd0b
parent3f2ca480eb872b4946baf77f756236b637a5b15a
spapr: Handle VMX/VSX presence as an spapr capability flag

We currently have some conditionals in the spapr device tree code to decide
whether or not to advertise the availability of the VMX (aka Altivec) and
VSX vector extensions to the guest, based on whether the guest cpu has
those features.

This can lead to confusion and subtle failures on migration, since it makes
a guest visible change based only on host capabilities.  We now have a
better mechanism for this, in spapr capabilities flags, which explicitly
depend on user options rather than host capabilities.

Rework the advertisement of VSX and VMX based on a new VSX capability.  We
no longer bother with a conditional for VMX support, because every CPU
that's ever been supported by the pseries machine type supports VMX.

NOTE: Some userspace distributions (e.g. RHEL7.4) already rely on
availability of VSX in libc, so using cap-vsx=off may lead to a fatal
SIGILL in init.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
hw/ppc/spapr.c
hw/ppc/spapr_caps.c
include/hw/ppc/spapr.h