qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Antoine Damhet <antoine.damhet@blade-group.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH] target/i386: always create kvmclock device
Date: Fri, 18 Sep 2020 16:26:56 +0100	[thread overview]
Message-ID: <20200918152656.GN2816@work-vm> (raw)
In-Reply-To: <20200918151213.x2dntgytybh7dkmx@tartarus>

* Antoine Damhet (antoine.damhet@blade-group.com) wrote:
> On Thu, Sep 17, 2020 at 06:44:10PM +0100, Dr. David Alan Gilbert wrote:
> 
> [...]
> 
> > > >> >
> > > >> > Shouldn't the old check used when machine type <= 5.1 in order to avoid
> > > >> > migration incompatibility ?
> > > >> 
> > > >> Hm, when the check fails we just don't create the device and no error is
> > > >> reported, so even if we have kvmclock data in the migration stream but
> > > >> fail to create it migration will still succeed, right? (not a migration
> > > >> expert here :-)
> > > >
> > > > When the migration stream is parsed, it'll try and find a "kvmclock"
> > > > device to pass the data it's reading to; if one doesn't exist it'll
> > > > fail.
> > > 
> > > This may happen with an older machine type when the destination is
> > > running an unfixed QEMU and the source has the fix, right?
> > 
> > Yes I think so.
> > 
> > > The solution
> > > would be to introduce a flag for older machine types (or for new ones)
> > > like 'kvmclock_always'.
> > 
> > Yep sounds the normal answer.
> > (You might want to try it first to trigger the bug)
> 
> So, I tried the patch and:
> 
> # patched -> patched
> 
> Everything working as expected
> 
> # patched -> unpatched
> 
> Migration failure with:
> 
> ```
> Unknown savevm section or instance 'kvmclock' 0. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices
> load of migration failed: Invalid argument
> ```

Right, that's what I expected and said we need to wire this fix to the
machine type.

Dave

> 
> # unpatched -> patched
> 
> The guest hangs upon arrival, I don't know which value is restored but
> something is restored (and far enough from 0 to confuse Windows).
> 
> > 
> > > > The other question is in the incoming direction from an older VM;
> > > > you'll have a kvm clock created here, but you won't load the kvm clock
> > > > state from the migration stream - what is this clock going to do?
> > > 
> > > This is not really a problem I believe: the clock was absent on the
> > > source and things somehow worked for the guest so even if we don't
> > > initialize kvmclock properly on the destination nothing bad is expected.
> > 
> > OK.
> > 
> > Dave
> 
> [...]
> 
> -- 
> Antoine 'xdbob' Damhet


-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2020-09-18 15:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 11:13 [PATCH] target/i386: always create kvmclock device Vitaly Kuznetsov
2020-09-17 11:18 ` no-reply
2020-09-17 11:41   ` Vitaly Kuznetsov
2020-09-17 12:25 ` Antoine Damhet
2020-09-17 13:34   ` Vitaly Kuznetsov
2020-09-17 14:42     ` Dr. David Alan Gilbert
2020-09-17 14:58       ` Vitaly Kuznetsov
2020-09-17 17:44         ` Dr. David Alan Gilbert
2020-09-18  8:39           ` Paolo Bonzini
2020-09-18 15:12           ` Antoine Damhet
2020-09-18 15:26             ` Dr. David Alan Gilbert [this message]
2020-09-22 15:19               ` Vitaly Kuznetsov
2020-09-17 15:00       ` Antoine Damhet
2020-09-18  8:38 ` Paolo Bonzini

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=20200918152656.GN2816@work-vm \
    --to=dgilbert@redhat.com \
    --cc=antoine.damhet@blade-group.com \
    --cc=ehabkost@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vkuznets@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).