From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: =?iso-8859-1?q?=5BQemu-devel=5D_expose_host_CPU_featu?= =?iso-8859-1?q?res=09to=09guests=3A_Take_3?= Date: Tue, 25 Sep 2007 13:51:54 +0100 Message-ID: <200709251351.55481.paul@codesourcery.com> References: <20070905174530.GA3945@karma.qumranet.com> <1190711970.30193.15.camel@rapid> <46F8D577.3020306@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , "J. Mayer" , Avi Kivity To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org Return-path: In-Reply-To: <46F8D577.3020306-atKUWr5tajBWk0Htik3J/w@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Tuesday 25 September 2007, Avi Kivity wrote: > J. Mayer wrote: > > On Tue, 2007-09-25 at 11:01 +0200, Avi Kivity wrote: > >> Dan Kenigsberg wrote: > >>> On Tue, Sep 25, 2007 at 03:28:24AM +0200, andrzej zaborowski wrote: > >>>> Hi, > >>>> > >>>> On 24/09/2007, Dan Kenigsberg wrote: > >>>>> As with previous "Takes" of this patch, its purpose is to expose host > >>>>> +{ > >>>>> + asm("cpuid" > >>>>> + : "=a" (*ax), > >>>>> + "=b" (*bx), > >>>>> + "=c" (*cx), > >>>>> + "=d" (*dx) > >>>>> + : "a" (function)); > >>>>> +} > >>>> > Indeed for regular qemu this is useless. But it is useful for kqemu > (for which there is support in mainline qemu), and for kvm (which we > hope to merge one day). And, as discussed before, it should be asking the hypervisor what features it supports instead of trying to guess from the cpuid output. Paul ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/