qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 04/10] replay: save/load initial state


From: Pavel Dovgalyuk
Subject: Re: [Qemu-devel] [PATCH v2 04/10] replay: save/load initial state
Date: Fri, 16 Sep 2016 10:56:10 +0300

> From: Paolo Bonzini [mailto:address@hidden
> On 15/09/2016 11:01, Pavel Dovgalyuk wrote:
> > +{
> > +    if (replay_mode == REPLAY_MODE_RECORD) {
> > +        QDict *opts = qdict_new();
> > +        qdict_put(opts, "name", qstring_from_str("replay_init"));
> > +        hmp_savevm(cur_mon, opts);
> > +        QDECREF(opts);
> > +    } else if (replay_mode == REPLAY_MODE_PLAY) {
> > +        load_vmstate("replay_init");
> 
> See my other message about a suggestion to remove the hardcoded snapshot
> name.
> 
> Also, I think the return value of load_vmstate and hmp_savevm should be
> checked.

Load may be unsuccessful when the system is started with temporary overlay file.
This is ok.

> > +    }
> > +}
> > diff --git a/vl.c b/vl.c
> > index 1c68779..6698d88 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -4593,6 +4593,8 @@ int main(int argc, char **argv, char **envp)
> >          if (load_vmstate(loadvm) < 0) {
> >              autostart = 0;
> >          }
> > +    } else {
> > +        replay_vmstate_init();
> >      }
> 
> Should -loadvm be incompatible with -rr?

User either loads some initial state or relies on replay which uses 
'replay_init'.

Pavel Dovgalyuk




reply via email to

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