kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>, kvm@vger.kernel.org
Subject: Re: [patch 2/3] x86: kvmclock: set scheduler clock stable
Date: Thu, 28 May 2015 10:39:59 +0200	[thread overview]
Message-ID: <5566D45F.5090801@redhat.com> (raw)
In-Reply-To: <20150528014929.457223842@redhat.com>



On 28/05/2015 03:46, Marcelo Tosatti wrote:
> +	flags = PVCLOCK_COUNTS_FROM_ZERO;

If the KVM_FEATURE_CLOCKSOURCE_STABLE_BIT bit is not set, we cannot
trust flags at all.  So let's just do...

>  	if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE_STABLE_BIT))
> -		pvclock_set_flags(PVCLOCK_TSC_STABLE_BIT);
> +		flags |= PVCLOCK_TSC_STABLE_BIT;

-		pvclock_set_flags(PVCLOCK_TSC_STABLE_BIT);
+		pvclock_set_flags(~0);

Otherwise looks good.  Shall I do the above change and apply?

Paolo

> +	pvclock_set_flags(flags);
> +
> +	cpu = get_cpu();
> +	vcpu_time = &hv_clock[cpu].pvti;
> +	flags = pvclock_read_flags(vcpu_time);
> +	if (flags & PVCLOCK_COUNTS_FROM_ZERO)
> +		set_sched_clock_stable();
> +	put_cpu();
>  }

  reply	other threads:[~2015-05-28  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  1:46 [patch 0/3] kvmclock: allow stable sched clock Marcelo Tosatti
2015-05-28  1:46 ` [patch 1/3] x86: kvmclock: add flag to indicate pvclock counts from zero Marcelo Tosatti
2015-05-28  1:46 ` [patch 2/3] x86: kvmclock: set scheduler clock stable Marcelo Tosatti
2015-05-28  8:39   ` Paolo Bonzini [this message]
2015-05-28  1:47 ` [patch 3/3] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR Marcelo Tosatti
2015-05-28  8:52   ` 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=5566D45F.5090801@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --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 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).