* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Fri, 13 Mar 2020 at 13:57, Dr. David Alan Gilbert > <dgilb...@redhat.com> wrote: > > Ah yes, I think you're right, so something like: > > > > if (runstate_check(RUN_STATE_INMIGRATE) && rom->data && rom->isrom) { > > I think you would see the difference here for images > loaded into RAM, rather than ROM -- they need to be > reinstated on reset, because the guest can scribble > on them. So we retain the data and don't free it.
Hmm, that's true; so I'm failing to skip a copy in the !isrom case, whch the original patch needed. So what I think we'll need is: if (runstate_check(RUN_STATE_INMIGRATE)) { if (rom->data && rom->isrom) { rom_free_data(rom); } continue; } > thanks > -- PMM > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK