[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d6222a80712190732h515a63e6y49c64c0f572f044@mail.gmail.com>
Date: Wed, 19 Dec 2007 13:32:06 -0200
From: "Glauber de Oliveira Costa" <glommer@...il.com>
To: "Avi Kivity" <avi@...o.co.il>
Cc: "Ingo Molnar" <mingo@...e.hu>, "Avi Kivity" <avi@...ranet.com>,
kvm-devel <kvm-devel@...ts.sourceforge.net>,
linux-kernel <linux-kernel@...r.kernel.org>,
"Chris Wright" <chrisw@...s-sol.org>,
"Gerd Hoffmann" <kraxel@...hat.com>
Subject: Re: [kvm-devel] Guest kernel hangs in smp kvm for older kernels prior to tsc sync cleanup
On Dec 19, 2007 12:27 PM, Avi Kivity <avi@...o.co.il> wrote:
> Ingo Molnar wrote:
> > * Avi Kivity <avi@...ranet.com> wrote:
> >
> >
> >> Avi Kivity wrote:
> >>
> >>> Testing shows wrmsr and rdtsc function normally.
> >>>
> >>> I'll try pinning the vcpus to cpus and see if that helps.
> >>>
> >>>
> >> It does.
> >>
> >
> > do we let the guest read the physical CPU's TSC? That would be trouble.
> >
> >
>
> vmx (and svm) allow us to add an offset to the physical tsc. We set it
> on startup to -tsc (so that an rdtsc on boot would return 0), and
> massage it on vcpu migration so that guest rdtsc is monotonic.
>
> The net effect is that tsc on a vcpu can experience large forward jumps
> and changes in rate, but no negative jumps.
>
Changes in rate does not sound good. It's possibly what's screwing up
my paravirt clock implementation in smp.
Since the host updates guest time prior to putting vcpu to run, two
vcpus that start running at different times will have different system
values.
Now if the vcpu that started running later probes the time first,
we'll se the time going backwards. A constant tsc rate is the only way
around
my limited mind sees around the problem (besides, obviously, _not_
making the system time per-vcpu).
--
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists