All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: "'Dr. David Alan Gilbert'" <dgilbert@redhat.com>
Cc: 'Pavel Dovgalyuk' <Pavel.Dovgaluk@ispras.ru>,
	qemu-devel@nongnu.org, quintela@redhat.com, mst@redhat.com,
	maria.klimushenkova@ispras.ru, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [ PATCH  ] hpet: recover timer offset correctly
Date: Wed, 20 Dec 2017 13:02:46 +0300	[thread overview]
Message-ID: <000a01d37979$af4f2640$0ded72c0$@ru> (raw)
In-Reply-To: <20171220094036.GB2348@work-vm>



> * Pavel Dovgalyuk (dovgaluk@ispras.ru) wrote:
> > > From: Dr. David Alan Gilbert [mailto:dgilbert@redhat.com]
> > > * Pavel Dovgalyuk (Pavel.Dovgaluk@ispras.ru) wrote:
> > > > HPET saves its state by calculating the current time and recovers timer
> > > > offset using this calculated value. But these calculations include
> > > > divisions and multiplications. Therefore the timer state cannot be recovered
> > > > precise enough.
> > > > This patch introduces saving of the original value of the offset to
> > > > preserve the determinism of the timer.
> > >
> > > Please put the extra data in a subsection and tie the subsection to a
> > > property enabled by the machine type.  That avoids breaking backwards
> > > migration compatibility.
> >
> > I thought about it and haven't found how to preserve the backward migration compatibility
> > without breaking everything else.
> > Loading old (or compatible) snapshot without changing the version will corrupt the offset in
> > post_load.
> 
> There are lots of ways; for example you could initialise hpet_offset to
> a dummy value in a pre-load and spot that in the post-load instead of
> the version_id, or set a flag in a post-load on the subsection.

Thanks. Please check the second version.

Pavel Dovgalyuk

      reply	other threads:[~2017-12-20 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  7:58 [Qemu-devel] [ PATCH ] hpet: recover timer offset correctly Pavel Dovgalyuk
2017-12-20  9:03 ` Paolo Bonzini
2017-12-20  9:17 ` Dr. David Alan Gilbert
2017-12-20  9:21   ` Pavel Dovgalyuk
2017-12-20  9:40     ` Dr. David Alan Gilbert
2017-12-20 10:02       ` Pavel Dovgalyuk [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='000a01d37979$af4f2640$0ded72c0$@ru' \
    --to=dovgaluk@ispras.ru \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=dgilbert@redhat.com \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.