spapr/cas: Separate CAS handling from rebuilding the FDT
commit91067db1abcdc6caf951494b8d7e4bfaaa0cb61d
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 25 Mar 2020 15:25:42 +0000 (25 16:25 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 May 2020 01:10:50 +0000 (7 11:10 +1000)
tree468ad6624f9c0366f9158563ff83a4abb1092140
parentb4b83312e72461540ee155006f0d49e33bf0c58d
spapr/cas: Separate CAS handling from rebuilding the FDT

At the moment "ibm,client-architecture-support" ("CAS") is implemented
in SLOF and QEMU assists via the custom H_CAS hypercall which copies
an updated flatten device tree (FDT) blob to the SLOF memory which
it then uses to update its internal tree.

When we enable the OpenFirmware client interface in QEMU, we won't need
to copy the FDT to the guest as the client is expected to fetch
the device tree using the client interface.

This moves FDT rebuild out to a separate helper which is going to be
called from the "ibm,client-architecture-support" handler and leaves
writing FDT to the guest in the H_CAS handler.

This should not cause any behavioral change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20200310050733.29805-3-aik@ozlabs.ru>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158514994229.478799.2178881312094922324.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h