WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RFC] Hypercalls from HVM guests
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Sun, 9 Apr 2006 06:56:14 -0700
Cc: Steve Ofsthun <sofsthun@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 09 Apr 2006 06:58:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZbq4OPLo6goFLDQ8ihSFFWdyuIxwAJaI6g
Thread-topic: [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