]> 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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Feb 2018 00:53:46 +0000 (18:53 -0600)
commitff6f7e10c6991c676b9a4058e15db5262a6c38f3
treed019477efee79de0db495f11e0be7756a44c6069
parent7c578cbc37bb4fdb54408dc565895b23020341ee
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>
(cherry picked from commit 2938664286499c0c30d6e455a7e2e5d3e6c3f63d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_caps.c
include/hw/ppc/spapr.h