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

[Xen-devel] Re: [RFC PATCH 18/33] Subarch support for CPUID instruction

To: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 18/33] Subarch support for CPUID instruction
From: Zachary Amsden <zach@xxxxxxxxxx>
Date: Tue, 18 Jul 2006 04:33:52 -0700
Cc: Andrew Morton <akpm@xxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Andi Kleen <ak@xxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Tue, 18 Jul 2006 04:34:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1153217686.3038.37.camel@xxxxxxxxxxxxxxxxxxxxx>
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>
References: <20060718091807.467468000@xxxxxxxxxxxx> <20060718091953.003336000@xxxxxxxxxxxx> <1153217686.3038.37.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060516)
Arjan van de Ven wrote:
On Tue, 2006-07-18 at 00:00 -0700, Chris Wright wrote:
plain text document attachment (i386-cpuid)
Allow subarchitectures to modify the CPUID instruction.  This allows
the subarch to provide a limited set of CPUID feature flags during CPU
identification.  Add a subarch implementation for Xen that traps to the
hypervisor where unsupported feature flags can be hidden from guests.

Hi,

I'm wondering if this is entirely the wrong level of abstraction; to me
it feels the subarch shouldn't override the actual cpuid, but the cpu
feature flags that linux uses. That's a lot less messy: cpuid has many
many pieces of information which are near impossible to filter in
practice, however filtering the USAGE of it is trivial; linux basically
flattens the cpuid namespace into a simple bitmap of "what the kernel
can use". That is really what the subarch should filter/fixup, just like
we do for cpu quirks etc etc.

You really need a CPUID hook. The instruction is non-virtualizable, and anything claiming to be a hypervisor really has to support masking and flattening the cpuid namespace for the instruction itself. It is used in assembler code and very early in boot. The alternative is injecting a bunch of Xen-specific code to filter feature bits into the i386 layer, which is both bad for Linux and bad for Xen - and was quite ugly in the last set of Xen patches.

Zach

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

<Prev in Thread] Current Thread [Next in Thread>