spapr: Handle Decimal Floating Point (DFP) as an optional capability
commit2d1fb9bc8e6e78931d8e1bfeb0ed7a4d223b0480
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 11 Dec 2017 06:34:30 +0000 (11 17:34 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 16 Jan 2018 22:35:24 +0000 (17 09:35 +1100)
tree7bef5e81ef5c6581bbfc9009c1ed3d47aeecc6cb
parent2938664286499c0c30d6e455a7e2e5d3e6c3f63d
spapr: Handle Decimal Floating Point (DFP) as an optional capability

Decimal Floating Point has been available on POWER7 and later (server)
cpus.  However, it can be disabled on the hypervisor, meaning that it's
not available to guests.

We currently handle this by conditionally advertising DFP support in the
device tree depending on whether the guest CPU model supports it - which
can also depend on what's allowed in the host for -cpu host.  That can lead
to confusion on migration, since host properties are silently affecting
guest visible properties.

This patch handles it by treating it as an optional capability for the
pseries machine type.

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