All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: [kvm-unit-test PATCH] kvmclock: serialize RDTSC
Date: Mon, 17 Jun 2013 17:43:37 +0200	[thread overview]
Message-ID: <51BF2EA9.3090903@redhat.com> (raw)
In-Reply-To: <20130614213004.GA2250@amt.cnet>

Il 14/06/2013 23:30, Marcelo Tosatti ha scritto:
> 
> Serialize RDTSC so its executed inside kvmclock_read 
> section.
> 
> Fixes https://bugzilla.redhat.com/show_bug.cgi?id=922285
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> diff --git a/x86/kvmclock.c b/x86/kvmclock.c
> index 0624da3..5b831c5 100644
> --- a/x86/kvmclock.c
> +++ b/x86/kvmclock.c
> @@ -177,10 +177,10 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
>  
>  	do {
>  		version = pvclock_get_time_values(&shadow, src);
> -		barrier();
> +		mb();
>  		offset = pvclock_get_nsec_offset(&shadow);
>  		ret = shadow.system_timestamp + offset;
> -		barrier();
> +		mb();
>  	} while (version != src->version);
>  
>  	if ((valid_flags & PVCLOCK_RAW_CYCLE_BIT) ||
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Applied, thanks.

Paolo

      reply	other threads:[~2013-06-17 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 21:30 [kvm-unit-test PATCH] kvmclock: serialize RDTSC Marcelo Tosatti
2013-06-17 15:43 ` Paolo Bonzini [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=51BF2EA9.3090903@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.