qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Yan Vugenfirer" <yvugenfi@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	catherine.hecx@gmail.com
Subject: Re: [PATCH] exec/rom_reset: Free rom data during inmigrate skip
Date: Fri, 13 Mar 2020 15:43:30 +0000	[thread overview]
Message-ID: <20200313154330.GF3581@work-vm> (raw)
In-Reply-To: <CAFEAcA_FBNB6o-mXMB_GzXtisCrPtYS8YLCLta53swpUA8cshQ@mail.gmail.com>

* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Fri, 13 Mar 2020 at 13:57, Dr. David Alan Gilbert
> <dgilbert@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 / dgilbert@redhat.com / Manchester, UK



      reply	other threads:[~2020-03-13 15:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 12:30 [PATCH] exec/rom_reset: Free rom data during inmigrate skip Dr. David Alan Gilbert (git)
2020-03-13 13:21 ` Peter Maydell
2020-03-13 13:22   ` Peter Maydell
2020-03-13 13:34     ` Dr. David Alan Gilbert
2020-03-13 13:39       ` Peter Maydell
2020-03-13 13:57         ` Dr. David Alan Gilbert
2020-03-13 14:23           ` Peter Maydell
2020-03-13 15:43             ` Dr. David Alan Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200313154330.GF3581@work-vm \
    --to=dgilbert@redhat.com \
    --cc=catherine.hecx@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yvugenfi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).