RE: Use CPUID to communicate with the hypervisor.

From: Nakajima, Jun
Date: Fri Sep 26 2008 - 20:59:22 EST


On 9/26/2008 5:32:26 PM, H. Peter Anvin wrote:
> Alok Kataria wrote:
> > > >
> > > This is great, obviously... although we'll have to deal with
> > > legacy methods for a while if not indefinitely (just as we have to
> > > for pre-CPUID processors).
> >
> > Ok, do you think we should keep those (legacy) interfaces separate
> > so that they can be phased out whenever the time is right.
> >
>
> I don't, realistically, think we can phase them out for a very long
> time, and then it's usually a "why bother". What we want to do is
> abstract them so they don't make the rest of the code suck.
>
> >
> > I would like to see this as a generic hypervisor way to get
> > frequency rather than a VMware specific thingy.
> > > In order for *that* to be safe, you'd have to have well-defined
> > > ranges for different virtualization vendors where each of them can
> > > define their own stuff.
> >
> > My motivation for doing this is to have a standard across all the
> > hypervisor's. If all the different hypervisor guys can come to some
> > sought of consensus on the various hypervisor leafs that would help
> > keep this simple and a lot more maintainable.
> >
>
> Agreed. However, that's obviously beyond our immediate control.

Well, actually it's under full control of the Linux community because the _kernel_ defines such virtual or semi-hardware features. I'm not sure if that particular value (0x40000010) is proper, but we should be able to pick reasonable ones/ranges.

>
> -hpa
.
Jun Nakajima | Intel Open Source Technology Center
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i