Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, zamsden@redhat.com, mtosatti@redhat.com
Subject: Re: [PATCH 2/2] turn off kvmclock when resetting cpu
Date: Wed, 5 May 2010 15:21:27 -0300	[thread overview]
Message-ID: <20100505182127.GC3443@mothafucka.localdomain> (raw)
In-Reply-To: <4BE18FFE.6040201@redhat.com>

On Wed, May 05, 2010 at 06:34:22PM +0300, Avi Kivity wrote:
> On 05/05/2010 06:24 PM, Glauber Costa wrote:
> >On Wed, May 05, 2010 at 10:26:43AM +0300, Avi Kivity wrote:
> >
> >>>+    msr_data.info.nmsrs = n;
> >>>+
> >>>+    return kvm_vcpu_ioctl(env, KVM_SET_MSRS,&msr_data);
> >>>+}
> >>>+
> >>>+
> >>How about a different approach?  Query the supported MSRs
> >>(KVM_GET_MSR_LIST or thereabout) and reset them (with special cases
> >>for the TSC, and the old clock MSRs when the new ones are present)?
> >I didn't went that route because I was unsure that every one of them
> >would be resetable by writing 0 on it.
> 
> There are probably others.  We should reset them correctly anyway.
> 
> It's probably done by generic qemu code so it works.
> 
> >And if we are going to special case the most part of it, then there
> >is no point in doing it.
> >
> >If you think it is doable to special case just the tsc, then I am fine.
> 
> I think if we have the following sequence
> 
>   clear all msrs
>   qemu reset
>   kvm specific msr reset
> 
> Then we'd be fine.
> 
> Oh, and tsc needs to be reset to 0 as well - it isn't a special case.
This means a guest running on a perfectly synchronized tsc host
will not see a sync tsc. Simply because we can't possible
reset all tscs at the same time.

  reply	other threads:[~2010-05-05 18:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 18:35 [PATCH 0/2] fix kvmclock bug - memory corruption Glauber Costa
2010-05-04 18:35 ` [PATCH 1/2] replace set_msr_entry with kvm_msr_entry Glauber Costa
2010-05-04 18:35   ` [PATCH 2/2] turn off kvmclock when resetting cpu Glauber Costa
2010-05-05  7:26     ` Avi Kivity
2010-05-05 15:24       ` Glauber Costa
2010-05-05 15:34         ` Avi Kivity
2010-05-05 18:21           ` Glauber Costa [this message]
2010-05-07 20:44     ` Marcelo Tosatti
2010-05-05  8:42   ` [PATCH 1/2] replace set_msr_entry with kvm_msr_entry Avi Kivity
2010-05-04 20:21 ` [PATCH 0/2] fix kvmclock bug - memory corruption Zachary Amsden

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=20100505182127.GC3443@mothafucka.localdomain \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=zamsden@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