lkml.org 
[lkml]   [2008]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Use CPUID to communicate with the hypervisor.
From
Date
On Tue, 2008-09-30 at 01:11 -0700, Gerd Hoffmann wrote:
> Alok Kataria wrote:

> Well, that should be clearly defined, that is my point. When asking the
> hypervisor for the tsc instead of running a calibration loop, then we
> have a small bit of paravirtualization: The guest is aware that it runs
> on a hypervisor and just asks it directly. So while we are at it we can
> also define a way to communicate tsc freq changes between host and
> guest, so the cost of trap'n'emulate tsc reads can be avoided. Or we
> define "tsc is constant" and leave it to the hypervisor to make sure it

For our purposes, we define TSC is constant.

> actually appears being constant to the guest, even in case it changes on
> the host. But it must be defined one way or another, so the guest knows
> whenever it should expect the tsc frequency change or not. And in case
> we allow tsc changes, we also need a way to signal that to the guest.

Non-constant TSCs probably won't want to use CPUID based retreival, due
to the extra trap it would require to read TSC frequency, it can't be
done at every TSC read (or else, virtualizing TSC frequency has the same
cost and you haven't won anything by making it dynamic). It's also not
clean to issue interrupts to the guest telling it TSC frequency has
changed because the guest may not notice the interrupt before making
computations using the old value, and multiple rapid changes would
require multiple interrupt injections for each affected guest.

> Is the tsc cpu leaf interface set in stone already (aka implemented in
> vmware versions released to public)?

Not to my knowledge.

Zach



\
 
 \ /
  Last update: 2008-09-30 18:49    [W:0.085 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site