ppc: Check the availability of transactional memory
commit2e68f28854f0120c9a938a61b64aaf1eaecb162b
authorThomas Huth <thuth@redhat.com>
Wed, 28 Sep 2016 11:16:30 +0000 (28 13:16 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 13 Oct 2016 01:58:06 +0000 (13 12:58 +1100)
tree7cf67971f3172ae234c2bb353daed2c93189eee5
parent45a4f18e2ec40b96893c780c28ab18c246906355
ppc: Check the availability of transactional memory

KVM-PR currently does not support transactional memory, and the
implementation in TCG is just a fake. We should not announce TM
support in the ibm,pa-features property when running on such a
system, so disable it by default and only enable it if the KVM
implementation supports it (i.e. recent versions of KVM-HV).
These changes are based on some earlier work from Anton Blanchard
(thanks!).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit bac3bf287ab60e264b636f5f00c116a19b655762)
hw/ppc/spapr.c
target-ppc/kvm.c
target-ppc/kvm_ppc.h