On 30/5/23 13:38, David Hildenbrand wrote:
Let's use our new helper and stop always allocating ms->device_memory.
There is no difference in common memory-device code anymore between
ms->device_memory being NULL or the size being 0. So we only have to
teach spapr code that ms->device_memory isn't always around.
We can now modify two maxram_size checks to rely on ms->device_memory
for detecting whether we have memory devices.
Cc: Daniel Henrique Barboza <[email protected]>
Cc: "Cédric Le Goater" <[email protected]>
Cc: David Gibson <[email protected]>
Cc: Greg Kurz <[email protected]>
Cc: Harsh Prateek Bora <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
---
hw/ppc/spapr.c | 37 +++++++++++++++++++------------------
hw/ppc/spapr_hcall.c | 2 +-
2 files changed, 20 insertions(+), 19 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>