qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] exec/rom_reset: Free rom data during inmigrate skip


From: Dr. David Alan Gilbert
Subject: Re: [PATCH] exec/rom_reset: Free rom data during inmigrate skip
Date: Fri, 13 Mar 2020 15:43:30 +0000
User-agent: Mutt/1.13.3 (2020-01-12)

* Peter Maydell (address@hidden) wrote:
> On Fri, 13 Mar 2020 at 13:57, Dr. David Alan Gilbert
> <address@hidden> 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 / address@hidden / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]