Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Dan Kenigsberg
On Tue, Sep 25, 2007 at 03:07:44PM +0200, Jocelyn Mayer wrote: > > So, running qemu without any parameters would use host capabilities if > > kvm is available and the default qemu cpu if not. The -cpu option can > > be used to override this if necessary. > > Well, it may be needed to integrate th

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
Paul Brook wrote: >> 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

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
Jocelyn Mayer wrote: > On Tue, 2007-09-25 at 13:36 +0200, Avi Kivity wrote: > >> J. Mayer wrote: >> >>> On Tue, 2007-09-25 at 12:40 +0200, Avi Kivity wrote: >>> >>> Avi Kivity wrote: >>> >>> >>> >>>

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Jocelyn Mayer
On Tue, 2007-09-25 at 13:36 +0200, Avi Kivity wrote: > J. Mayer wrote: > > On Tue, 2007-09-25 at 12:40 +0200, Avi Kivity wrote: > > > >> Avi Kivity wrote: > >> > > > > > > > I've got a remark about this: why this has to be added to the Qemu > cod

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Fabrice Bellard
Avi Kivity wrote: > J. Mayer wrote: > >>On Tue, 2007-09-25 at 12:40 +0200, Avi Kivity wrote: >> >> >>>Avi Kivity wrote: >>> >>> >> >> >> > >I've got a remark about this: why this has to be added to the Qemu >code ? >Imho, all is needed is an im

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
J. Mayer wrote: > On Tue, 2007-09-25 at 12:40 +0200, Avi Kivity wrote: > >> Avi Kivity wrote: >> > > > I've got a remark about this: why this has to be added to the Qemu code ? Imho, all is needed is an implementation of the -cpu option for

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread J. Mayer
On Tue, 2007-09-25 at 12:40 +0200, Avi Kivity wrote: > Avi Kivity wrote: > >>> > >>> > >> I've got a remark about this: why this has to be added to the Qemu > >> code ? > >> Imho, all is needed is an implementation of the -cpu option for > >> x86/x86_64 target. Then, an external tool (e

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
Avi Kivity wrote: >>> >>> >> I've got a remark about this: why this has to be added to the Qemu >> code ? >> Imho, all is needed is an implementation of the -cpu option for >> x86/x86_64 target. Then, an external tool (even a shell script) can be >> used to determine what is the host CP

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
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 <[EMAIL PROTECTED]> wrote:

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread J. Mayer
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 <[EMAIL PROTECTED]> wrote: > >> > >>> As with previous "Takes" of this patch, its purpose

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Avi Kivity
Dan Kenigsberg wrote: > On Tue, Sep 25, 2007 at 03:28:24AM +0200, andrzej zaborowski wrote: > >> Hi, >> >> On 24/09/2007, Dan Kenigsberg <[EMAIL PROTECTED]> wrote: >> >>> As with previous "Takes" of this patch, its purpose is to expose host >>> +{ >>> +asm("cpuid" >>> +: "=a" (*

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-25 Thread Dan Kenigsberg
On Tue, Sep 25, 2007 at 03:28:24AM +0200, andrzej zaborowski wrote: > Hi, > > On 24/09/2007, Dan Kenigsberg <[EMAIL PROTECTED]> wrote: > > As with previous "Takes" of this patch, its purpose is to expose host > > +{ > > +asm("cpuid" > > +: "=a" (*ax), > > + "=b" (*bx), > > +

Re: [kvm-devel] [Qemu-devel] expose host CPU features to guests: Take 3

2007-09-24 Thread andrzej zaborowski
Hi, On 24/09/2007, Dan Kenigsberg <[EMAIL PROTECTED]> wrote: > As with previous "Takes" of this patch, its purpose is to expose host > CPU features to guests. It proved rather helpful to KVM in various > benchmarks, and it should similarly speed kqemu up. Note that it does > not extend the set of