[lkml]   [2008]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Use CPUID to communicate with the hypervisor.
On Mon, 2008-09-29 at 15:46 -0700, Gerd Hoffmann wrote:
> Alok Kataria wrote:
> > On Mon, 2008-09-29 at 11:46 -0700, Gerd Hoffmann wrote:
> >> But even that you can't take for granted, see the
> >> discussion of the "tsc-may-change-on-migration" problem.
> >
> > I may have been unclear in my first attempt to this question, let me try
> > again.
> > If the frequency of tsc changes during migration, it should be the task
> > of hypervisor to handle it. There could be multiple ways to solve that
> > problem, either the hypervisor emulates the old frequency (by whatever
> > way) or there are cpufreq drivers in the guest which detect changes in
> > frequency, and ask the hypervisor for the new frequency. The interface
> > still allows you to query the cpuid leaf and get the new frequency.
> > right ?
> This small print is part of the guest/host ABI though, so hypervisors
> must agree here too, be it "tsc is constant" or "re-read tsc freq on
> $event" or whatever else. Otherwise it isn't a generic interface.

Hi Gerd,

I really fail to see your point here. Maybe you can point out what am i
Think about the current situation, whenever there is migration to such a
tsc-is-different system , how does the guest come to know about the
frequency change, either through a $event or if it reboots it runs the
calibration algorithm.
How does asking the hypervisor for tsc instead of calibrating it, breaks
the semantics for this migration.

What special things does Xen do at migration, which would be affected by
this interface ?

> > Hmm, I am confused, from the patch i posted above, in
> > native_calibrate_tsc
> >
> > + tsc_khz = hypervisor_tsc_freq();
> > + if (tsc_khz)
> > + return tsc_khz;
> >
> > We do ignore zero values over here.
> Oh, ok.
> I expected the check explicitly coded within the hypervisor_tsc_freq()
> function. This deserves at least a comment saying that this side effect
> is actually intentional.

Yep i will document this in my next post.

> cheers,
> Gerd

 \ /
  Last update: 2008-09-30 02:37    [W:0.069 / U:6.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site