qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty
Date: Tue, 16 Sep 2014 18:22:15 +0200	[thread overview]
Message-ID: <541863B7.5060705@redhat.com> (raw)
In-Reply-To: <20140916160735.GB30753@amt.cnet>

Il 16/09/2014 18:07, Marcelo Tosatti ha scritto:
>> > The cpu_synchronize_all_states() call in kvmclock_vm_state_change() is
>> > needed to make env->tsc up to date with the value on the source, right?
> Its there to make sure the pair
> 
> env->tsc, s->clock = data.clock
> 
> are relative to point close in time.

Ok.  But why are they not close in time?

Could we have the opposite situation where env->tsc is loaded a long
time _after_ s->clock, and something breaks?

Also, there is no reason to do kvmclock_current_nsec() during normal
execution of the VM.  Is the s->clock sent by the source ever good
across migration, and could the source send kvmclock_current_nsec()
instead of whatever KVM_GET_CLOCK returns?

I don't understand this code very well, but it seems to me that the
migration handling and VM state change handler are mixed up...

Paolo

>> > But if the synchronize_all_states+clean_all_dirty pair runs on the
>> > source, why is the cpu_synchronize_all_states() call in
>> > qemu_savevm_state_complete() not enough?  It runs even later than
>> > kvmclock_vm_state_change.
> Because of the "pair of time values" explanation above.

  reply	other threads:[~2014-09-16 16:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 15:14 [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty Marcelo Tosatti
2014-09-16 15:42 ` Paolo Bonzini
2014-09-16 15:55   ` Marcelo Tosatti
2014-09-16 16:03     ` Paolo Bonzini
2014-09-16 16:07       ` Marcelo Tosatti
2014-09-16 16:22         ` Paolo Bonzini [this message]
2014-09-16 16:48           ` Marcelo Tosatti
2014-09-16 16:54             ` Marcelo Tosatti
2014-09-16 18:10           ` Marcelo Tosatti
2014-09-16 16:03   ` Marcelo Tosatti

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=541863B7.5060705@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).