This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [RFC] Hypercalls from HVM guests

Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> writes:

> On 7 Apr 2006, at 20:30, Steve Ofsthun wrote:
> >> Actually, maybe using an unused index for CPUID (e.g. 0xb0000000)
> >> would
> >> be better? As that's defined to return all zero's, and not cause any
> >> traps whatever value you use (unless the CPU is so old that it doesn't
> >> support CPUID, of course).
> >
> > This sounds encouraging, but is CPUID always trapped by the HVM code?
> It can be, and in practise yes it is so this could work.

CPUID doesn't have any advantage over MSRs for this purpose because
for custom CPUIDs like 0xb... you can't use the normal "max count" mechanism
of determining if a CPUID is supported.  All that would work is to try
it and handle the GPF if it didn't work. That would give the same ugly 
implementation as with MSRs.

Using the MSR would have the advantage of it being trappable in a para virtual
kernel too.

Or alternatively use some table in RAM/ROM space that can be searched for.
That would allow to implement this simply in OS without having 
to change any exception handlers.


Xen-devel mailing list