spapr: Clean up RMA size calculation
commit425f0b7adb8773d6989abcf3cb19bf0bcab9e07e
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 29 Nov 2019 00:49:04 +0000 (29 11:49 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 17 Mar 2020 04:08:47 +0000 (17 15:08 +1100)
treecb370626d19baaf8ea9d3bbd6ee03a92ee893ddd
parent1052ab67f4c10ea8961bf1a523b764b19bff1997
spapr: Clean up RMA size calculation

Move the calculation of the Real Mode Area (RMA) size into a helper
function.  While we're there clean it up and correct it in a few ways:
  * Add comments making it clearer where the various constraints come from
  * Remove a pointless check that the RMA fits within Node 0 (we've just
    clamped it so that it does)

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/ppc/spapr.c