On Tue, 31 Mar 2020 08:02:38 -0400 Christian Borntraeger <borntrae...@de.ibm.com> wrote:
> compat machines did fixup the ram size to match what can be reported via > sclp. We need to mimic those for machines 4.2 and older to not fail on > inbound migration. > > Fixes: 3a12fc61af5c ("390x/s390-virtio-ccw: use memdev for RAM") > Reported-by: Lukáš Doktor <ldok...@redhat.com> > Cc: Igor Mammedov <imamm...@redhat.com> > Cc: Dr. David Alan Gilbert <dgilb...@redhat.com> > Signed-off-by: David Hildenbrand <da...@redhat.com> > Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> > --- > hw/s390x/s390-virtio-ccw.c | 12 ++++++++++++ > hw/s390x/sclp.c | 10 ---------- > include/hw/boards.h | 1 + > softmmu/vl.c | 3 +++ > 4 files changed, 16 insertions(+), 10 deletions(-) (...) > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 236d239c19..e3574f4b5f 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -218,6 +218,7 @@ struct MachineClass { > unsigned cpu_index); > const CPUArchIdList *(*possible_cpu_arch_ids)(MachineState *machine); > int64_t (*get_default_cpu_node_id)(const MachineState *ms, int idx); > + ram_addr_t (*machine_align_ram)(ram_addr_t size); Maybe add a comment: /* For compat machine usage only. Don't use this in new machines. */ ? > }; > > /** (...) (Didn't really read the patch yet.)