]> www.infradead.org Git - users/dwmw2/qemu.git/commit
spapr: Capabilities infrastructure
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Dec 2017 23:35:35 +0000 (10:35 +1100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Feb 2018 00:52:49 +0000 (18:52 -0600)
commit78a38cd47e1083e67f007743c5f2448f10ff6110
tree22d56277d6e512734b46c513b27b8a2a8e4c7a99
parent0fac4aa93074c9966bafb6c8787e2c336f014aa7
spapr: Capabilities infrastructure

Because PAPR is a paravirtual environment access to certain CPU (or other)
facilities can be blocked by the hypervisor.  PAPR provides ways to
advertise in the device tree whether or not those features are available to
the guest.

In some places we automatically determine whether to make a feature
available based on whether our host can support it, in most cases this is
based on limitations in the available KVM implementation.

Although we correctly advertise this to the guest, it means that host
factors might make changes to the guest visible environment which is bad:
as well as generaly reducing reproducibility, it means that a migration
between different host environments can easily go bad.

We've mostly gotten away with it because the environments considered mature
enough to be well supported (basically, KVM on POWER8) have had consistent
feature availability.  But, it's still not right and some limitations on
POWER9 is going to make it more of an issue in future.

This introduces an infrastructure for defining "sPAPR capabilities".  These
are set by default based on the machine version, masked by the capabilities
of the chosen cpu, but can be overriden with machine properties.

The intention is at reset time we verify that the requested capabilities
can be supported on the host (considering TCG, KVM and/or host cpu
limitations).  If not we simply fail, rather than silently modifying the
advertised featureset to the guest.

This does mean that certain configurations that "worked" may now fail, but
such configurations were already more subtly broken.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 33face6b8981add8eba1f7cdaf4cf6cede415d2e)
 Conflicts:
include/hw/ppc/spapr.h
*drop context dep on 60c6823b9bc
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/Makefile.objs
hw/ppc/spapr.c
hw/ppc/spapr_caps.c [new file with mode: 0644]
include/hw/ppc/spapr.h