All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>
Subject: Re: KVM: x86: update masterclock when kvmclock_offset is calculated
Date: Tue, 27 Aug 2013 23:55:57 -0300	[thread overview]
Message-ID: <20130828025557.GC13653@amt.cnet> (raw)
In-Reply-To: <521732CE.9070309@redhat.com>

On Fri, Aug 23, 2013 at 12:00:46PM +0200, Paolo Bonzini wrote:
> Il 22/08/2013 19:05, Paolo Bonzini ha scritto:
> > Il 20/08/2013 20:20, Marcelo Tosatti ha scritto:
> >>
> >> The offset to add to the hosts monotonic time, kvmclock_offset, is
> >> calculated against the monotonic time at KVM_SET_CLOCK ioctl time.
> >>
> >> Request a master clock update at this time, to reduce a potentially
> >> unbounded difference between the values of the masterclock and
> >> the clock value used to calculate kvmclock_offset.
> >>
> >> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >>
> >> Index: linux-2.6-kvmclock-fixes/arch/x86/kvm/x86.c
> >> ===================================================================
> >> --- linux-2.6-kvmclock-fixes.orig/arch/x86/kvm/x86.c
> >> +++ linux-2.6-kvmclock-fixes/arch/x86/kvm/x86.c
> >> @@ -3806,6 +3806,7 @@ long kvm_arch_vm_ioctl(struct file *filp
> >>  		delta = user_ns.clock - now_ns;
> >>  		local_irq_enable();
> >>  		kvm->arch.kvmclock_offset = delta;
> >> +		kvm_gen_update_masterclock(kvm);
> >>  		break;
> >>  	}
> >>  	case KVM_GET_CLOCK: {
> > 
> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Actually, what commit is this patch based on?  You are calling the 
> function at line 3799, but it is only declared at line 5786, and this 
> causes:
> 
> /root/kvm-kmod/x86/x86.c: In function ‘kvm_arch_vm_ioctl’:
> /root/kvm-kmod/x86/x86.c:3799:3: error: implicit declaration of function ‘kvm_gen_update_masterclock’
> /root/kvm-kmod/x86/x86.c: At top level:
> /root/kvm-kmod/x86/x86.c:5786:13: warning: conflicting types for ‘kvm_gen_update_masterclock’
> /root/kvm-kmod/x86/x86.c:5786:13: error: static declaration of ‘kvm_gen_update_masterclock’ follows non-static declaration
> /root/kvm-kmod/x86/x86.c:3799:3: note: previous implicit declaration of ‘kvm_gen_update_masterclock’ was here
> 
> Paolo

Wrong tree, my bad, sorry Paolo (sent v2).


  parent reply	other threads:[~2013-08-28  3:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 18:20 KVM: x86: update masterclock when kvmclock_offset is calculated Marcelo Tosatti
2013-08-22 17:05 ` Paolo Bonzini
2013-08-23 10:00   ` Paolo Bonzini
2013-08-28  2:55     ` KVM: x86: update masterclock when kvmclock_offset is calculated (v2) Marcelo Tosatti
2013-08-28 14:47       ` Gleb Natapov
2013-08-28  2:55     ` Marcelo Tosatti [this message]
2013-08-28  2:52   ` KVM: x86: update masterclock when kvmclock_offset is calculated Marcelo Tosatti
2013-08-28 12:37     ` Paolo Bonzini
2013-09-03  3:03       ` Marcelo Tosatti
2013-09-03 10:42         ` Paolo Bonzini
2013-09-03 13:56           ` Marcelo Tosatti
2013-09-03 14:20             ` 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=20130828025557.GC13653@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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.