Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-06 Thread Alexander Graf
On 06.06.14 04:37, Eduardo Habkost wrote: On Fri, Jun 06, 2014 at 03:21:04AM +0200, Borislav Petkov wrote: On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: But can we drop the EMULATED name somehow? Can we rename [1] the ioctl to say GET_UNSUPPORTED_CPUID or something along

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-06 Thread gleb
On Thu, Jun 05, 2014 at 06:26:41PM +0200, Paolo Bonzini wrote: Il 05/06/2014 18:24, Alexander Graf ha scritto: On 05.06.14 18:12, Eduardo Habkost wrote: This implements GET_SUPPORTED_CPUID support using an explicit option for it: allow-emulation. We don't want any emulated feature to be

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-06 Thread Eduardo Habkost
On Fri, Jun 06, 2014 at 01:16:00PM +0200, Alexander Graf wrote: On 06.06.14 04:37, Eduardo Habkost wrote: On Fri, Jun 06, 2014 at 03:21:04AM +0200, Borislav Petkov wrote: On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: But can we drop the EMULATED name somehow? Can we rename

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 18:12, Eduardo Habkost wrote: This implements GET_SUPPORTED_CPUID support using an explicit option for it: allow-emulation. We don't want any emulated feature to be enabled by accident, so they will be enabled only if the user explicitly wants to allow them. So is this an

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 18:24, Alexander Graf ha scritto: On 05.06.14 18:12, Eduardo Habkost wrote: This implements GET_SUPPORTED_CPUID support using an explicit option for it: allow-emulation. We don't want any emulated feature to be enabled by accident, so they will be enabled only if the user

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 18:26, Paolo Bonzini wrote: Il 05/06/2014 18:24, Alexander Graf ha scritto: On 05.06.14 18:12, Eduardo Habkost wrote: This implements GET_SUPPORTED_CPUID support using an explicit option for it: allow-emulation. We don't want any emulated feature to be enabled by accident, so

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 18:40, Alexander Graf ha scritto: kvm_set_cpuid(cpuid); but enabling all experimental features inside KVM just because we want one or two of them is very counter-intuitive. Imagine we'd introduce emulation support for AVX. Suddenly allow-emulation (which I'd need for Mac OS X

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 18:44, Paolo Bonzini wrote: Il 05/06/2014 18:40, Alexander Graf ha scritto: kvm_set_cpuid(cpuid); but enabling all experimental features inside KVM just because we want one or two of them is very counter-intuitive. Imagine we'd introduce emulation support for AVX. Suddenly

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using -cpu somethingThatHasAVX, though, no? Yes. The same argument goes the other way around. I want to use AVX emulation, do allow-emulation and suddenly I get MONITOR/MWAIT emulation. What about: - letting -cpu

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 18:52, Paolo Bonzini wrote: Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using -cpu somethingThatHasAVX, though, no? Yes. The same argument goes the other way around. I want to use AVX emulation, do allow-emulation and suddenly I get MONITOR/MWAIT

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 18:52, Paolo Bonzini wrote: Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using -cpu somethingThatHasAVX, though, no? Yes. The same argument goes the other way around. I want to use AVX emulation, do allow-emulation and suddenly I get MONITOR/MWAIT

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 18:54, Alexander Graf ha scritto: What about: - letting -cpu foo,+emulatedfeature just work - adding emulated=yes that blindly enables all emulated features - making -cpu ...,check prints a warning for emulated features unless emulated=yes How about we remove the emulated=yes

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 06:57:57PM +0200, Paolo Bonzini wrote: Il 05/06/2014 18:54, Alexander Graf ha scritto: What about: - letting -cpu foo,+emulatedfeature just work - adding emulated=yes that blindly enables all emulated features - making -cpu ...,check prints a warning for

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 06:40:25PM +0200, Alexander Graf wrote: On 05.06.14 18:26, Paolo Bonzini wrote: Il 05/06/2014 18:24, Alexander Graf ha scritto: On 05.06.14 18:12, Eduardo Habkost wrote: This implements GET_SUPPORTED_CPUID support using an explicit option for it: allow-emulation.

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 19:17, Eduardo Habkost ha scritto: If you don't want MONITOR/MWAIT you shouldn't be using a CPU model containing MONITOR/MWAIT in the first place. If you use -cpu somethingWithMONITOR, that means you are already asking QEMU for a CPU with MONITOR. If you were not getting

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Paolo Bonzini
Il 05/06/2014 19:19, Eduardo Habkost ha scritto: On Thu, Jun 05, 2014 at 06:57:57PM +0200, Paolo Bonzini wrote: Il 05/06/2014 18:54, Alexander Graf ha scritto: What about: - letting -cpu foo,+emulatedfeature just work - adding emulated=yes that blindly enables all emulated features -

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 06:58:17PM +0200, Alexander Graf wrote: On 05.06.14 18:52, Paolo Bonzini wrote: Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using -cpu somethingThatHasAVX, though, no? Yes. The same argument goes the other way around. I want to use AVX

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 07:38:49PM +0200, Paolo Bonzini wrote: Il 05/06/2014 19:17, Eduardo Habkost ha scritto: If you don't want MONITOR/MWAIT you shouldn't be using a CPU model containing MONITOR/MWAIT in the first place. If you use -cpu somethingWithMONITOR, that means you are already

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 06:45:16PM +0200, Alexander Graf wrote: On 05.06.14 18:44, Paolo Bonzini wrote: Il 05/06/2014 18:40, Alexander Graf ha scritto: kvm_set_cpuid(cpuid); but enabling all experimental features inside KVM just because we want one or two of them is very

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 07:39:42PM +0200, Paolo Bonzini wrote: Il 05/06/2014 19:19, Eduardo Habkost ha scritto: On Thu, Jun 05, 2014 at 06:57:57PM +0200, Paolo Bonzini wrote: Il 05/06/2014 18:54, Alexander Graf ha scritto: What about: - letting -cpu foo,+emulatedfeature just work -

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
Sorry for following the discussion backwards, but I see now that you started with a proposal that would cover both cases (the one you care about, and the one I care about), make both of us happy, but it was lost in favour of other suggestions I disagreed with: On Thu, Jun 05, 2014 at 06:24:22PM

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
Sorry for replying to my own message, but I believe we can now summarize a possible solution that makes everybody happy, and the plans for it: On Thu, Jun 05, 2014 at 03:02:53PM -0300, Eduardo Habkost wrote: On Thu, Jun 05, 2014 at 07:39:42PM +0200, Paolo Bonzini wrote: Il 05/06/2014 19:19,

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Borislav Petkov
On Thu, Jun 05, 2014 at 04:12:08PM -0300, Eduardo Habkost wrote: In the meantime, we could: * Include the less fine-tuned allow-emulation (or allow-experimental-features) option, which is implemented by this series, for people who use enforce and/or don't care too much about

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eric Blake
On 06/05/2014 01:24 PM, Borislav Petkov wrote: On Thu, Jun 05, 2014 at 04:12:08PM -0300, Eduardo Habkost wrote: In the meantime, we could: * Include the less fine-tuned allow-emulation (or allow-experimental-features) option, which is implemented by this series, for people who use

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Thu, Jun 05, 2014 at 01:45:06PM -0600, Eric Blake wrote: On 06/05/2014 01:24 PM, Borislav Petkov wrote: On Thu, Jun 05, 2014 at 04:12:08PM -0300, Eduardo Habkost wrote: In the meantime, we could: * Include the less fine-tuned allow-emulation (or allow-experimental-features)

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Alexander Graf
On 05.06.14 19:48, Eduardo Habkost wrote: On Thu, Jun 05, 2014 at 06:58:17PM +0200, Alexander Graf wrote: On 05.06.14 18:52, Paolo Bonzini wrote: Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using -cpu somethingThatHasAVX, though, no? Yes. The same argument goes the

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Borislav Petkov
On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: But can we drop the EMULATED name somehow? Can we rename [1] the ioctl to say GET_UNSUPPORTED_CPUID or something along those lines? The name is just a really really bad pick. What do you mean, a bad pick :-P? I added extra care in

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
On Fri, Jun 06, 2014 at 03:21:04AM +0200, Borislav Petkov wrote: On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: But can we drop the EMULATED name somehow? Can we rename [1] the ioctl to say GET_UNSUPPORTED_CPUID or something along those lines? The name is just a really