> -----Original Message----- > From: David Hildenbrand [mailto:da...@redhat.com] > Sent: 28 February 2020 18:00 > To: Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com>; > Igor Mammedov <imamm...@redhat.com> > Cc: peter.mayd...@linaro.org; xiaoguangrong.e...@gmail.com; > m...@redhat.com; shannon.zha...@gmail.com; qemu-devel@nongnu.org; > xuwei (O) <xuw...@huawei.com>; Linuxarm <linux...@huawei.com>; > eric.au...@redhat.com; qemu-...@nongnu.org; ler...@redhat.com; > dgilb...@redhat.com; Juan Jose Quintela Carreira <quint...@redhat.com> > Subject: Re: [PATCH v2 1/7] exec: Fix for qemu_ram_resize() callback >
[...] > > We should instead think about > > 1. Migrating the actual size of the 3 memory regions separately and setting > them via > memory_region_ram_resize() when loading the vmstate. This will trigger > another FW cfg > fixup and should be fine (with the same qemu_ram_resize() above). > > 2. Introduce a new RAM_SAVE_FLAG_MEM_SIZE_2, that e.g., stores the > number of ramblocks, > not the total amount of memory of the ram blocks. But it's hacky, because we > migrate > something for RAM blocks, that is not a RAM block concept (sub-block sizes). > > I think you should look into 1. Shouldn't be too hard I think. I have send out v3 of this series ([PATCH v3 00/10] ARM virt: Add NVDIMM support) with an attempt to migrate the memory regions separately. It also includes your patch for qemu_ram_resize() callback fix. Please take a look and let me know. Thanks, Shameer