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), + =c (*cx), +

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 (*ax), + =b (*bx), +

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 is to expose host +{

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: As with previous Takes of this

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

2007-09-25 Thread Fabrice Bellard
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 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

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 CPU if you want

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 (even a shell script)

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 x86/x86_64 target. Then, an

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 implementation of the -cpu option for x86/x86_64 target.

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

2007-09-25 Thread Paul Brook
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 [EMAIL PROTECTED] wrote: As with previous

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 code ? Imho, all is needed is an

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: I've got a remark about this: why this has to be added to the

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 of trying to

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 the -cpu

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

2007-09-25 Thread Jamie Lokier
Jocelyn Mayer wrote: Well, it may be needed to integrate the -cpu host option. But I think it's a really bad idea that running qemu without the -cpu option would not act the same on different host. When I want to test qemu with the same command line, I want it to behave exactly the same,

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

2007-09-25 Thread Avi Kivity
Jamie Lokier wrote: Jocelyn Mayer wrote: Well, it may be needed to integrate the -cpu host option. But I think it's a really bad idea that running qemu without the -cpu option would not act the same on different host. When I want to test qemu with the same command line, I want it to behave