[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Keir Fraser wrote:
> On 9 Apr 2006, at 00:33, Nakajima, Jun wrote:
> 
>> If eax is set to a value outside the recognized range of CPUID
>> currently defined, CPUID does not necessarily return all zero's on
>> Intel. It's "Reserved" (Information returned for highest basic
>> information leaf). Also "an unused index" can have conflicts in the
>> future. 
>> 
>> If we just need to tell on which CPU the current HVM guest is
>> running, I think "GeunineIntel" or "AuthenticAMD" is the best
>> because it's been used by native systems as well.
> 
> Then how do you tell whether you are running on a hypervisor without
> executing some instruction that might fault? We would like to avoid
> requiring that.

This is a different question, and I think detecting a virtual device
(i.e. virtual block device, NIC) or chipset would be a cleaner way at
this point. And that would be proper for the patch that Steve mentioned
(we wrote it). The fact that it's running on a hypervisor does not
necessarily guarantee presence of such virtual devices (in fact they
don't exist today ;-).

If we really need to tell if we are running on a hypervisor at a very
early point or even in user-mode, I think CPUID with "an unused index"
would be the simplest, but so far I haven't seen any usage models that
really require that. If we want to add virtualization hints for
processor architectures (e.g. MMU) in guests, it would be needed. 

> 
> There is quite a lot of CPUID and MSR address space, and a random
> return value for CPUID when running natively is practically-speaking
> fine if we're looking for a 128-bit signature.

Many bits are already reserved for the future capabilities in CPUID, and
MSR is CPU _model_ specific by definition, i.e. not architecturally
clean. But my point is that we should specify "reserved for
virtualization" or something in the H/W manual rather than inventing an
ad hoc one (when we don't really need). BTW, I think virtualization
hints (nop on the native, hypercall on a hypervisor) would be very
useful for performance optimizations.

> 
> The only other option I think would be a BIOS table, probably below
> 1MB. I prefer the CPUID/MSR method.
> 
>   -- Keir

Jun
---
Intel Open Source Technology Center

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.