Re: [PATCH 2/3] target-i386: initialize vcpu's TSC rate to the value from KVM

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 01:38:30PM +0800, Haozhong Zhang wrote: > When creating a vcpu, we initialize its TSC rate to the value from > KVM (through ioctl KVM_GET_TSC_KHZ). > > Signed-off-by: Haozhong Zhang > --- > target-i386/kvm.c | 7 +++ > 1 file changed, 7

Re: [PATCH 1/1] target-i386: get/put MSR_TSC_AUX across reset and migration

2015-09-24 Thread Eduardo Habkost
On Wed, Sep 23, 2015 at 09:47:43AM +0200, Paolo Bonzini wrote: > > > On 23/09/2015 08:27, Amit Shah wrote: > > There's one report of migration breaking due to missing MSR_TSC_AUX > > save/restore. Fix this by adding a new subsection that saves the state > > of this MSR. > > > >

Re: [PATCH 1/1] target-i386: get/put MSR_TSC_AUX across reset and migration

2015-09-24 Thread Eduardo Habkost
celo Tosatti <mtosa...@redhat.com> > CC: Richard Henderson <r...@twiddle.net> > CC: Eduardo Habkost <ehabk...@redhat.com> > --- > target-i386/kvm.c | 14 ++ > target-i386/machine.c | 20 ++++++++ > 2 files changed, 34 insertions(+)

Re: [PATCH v2 07/18] nvdimm: reserve address range for NVDIMM

2015-08-28 Thread Eduardo Habkost
On Fri, Aug 14, 2015 at 10:52:00PM +0800, Xiao Guangrong wrote: NVDIMM reserves all the free range above 4G to do: - Persistent Memory (PMEM) mapping - implement NVDIMM ACPI device _DSM method Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com [...] @@ -1302,6 +1303,7 @@

Re: [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions

2015-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2015 at 01:05:12PM +0800, Xiao Guangrong wrote: These instructions are used by NVDIMM drivers and the specification locates at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Let them be enabled on Broadwell on default Signed-off-by: Xiao

Re: [Qemu-devel] [PATCH v5] i386: Introduce ARAT CPU feature

2015-06-25 Thread Eduardo Habkost
or with CPU types that include the flag. The exact model number that introduced the feature is not known, but reports can be found that it's at least available since Sandy Bridge. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Applied to the x86

Re: [PATCH v5] i386: Introduce ARAT CPU feature

2015-06-18 Thread Eduardo Habkost
On Sun, Jun 07, 2015 at 11:15:08AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated, it's fine to expose this feature to guests, at least when asking for KVM host features or with

Re: [PATCH v4] i386: Introduce ARAT CPU feature

2015-05-26 Thread Eduardo Habkost
(Fixing subject line) On Tue, May 26, 2015 at 06:35:45AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated, it's fine to expose this feature to guests, at least when asking for

Re: [Qemu-devel] [PATCH v4] i386: Introduce ARAT CPU feature

2015-05-26 Thread Eduardo Habkost
On Tue, May 26, 2015 at 02:18:32PM -0300, Eduardo Habkost wrote: (Fixing subject line) On Tue, May 26, 2015 at 06:35:45AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated

Re: [PATCH v2] i386: Introduce ARAT CPU feature

2015-05-25 Thread Eduardo Habkost
On Mon, May 25, 2015 at 04:16:14PM +0200, Paolo Bonzini wrote: On 25/05/2015 16:06, Jan Kiszka wrote: static void pc_compat_2_3(MachineState *machine) { +x86_cpu_compat_set_features(Westmere, FEAT_6_EAX, 0, CPUID_6_EAX_ARAT); +x86_cpu_compat_set_features(SandyBridge,

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-04-02 Thread Eduardo Habkost
On Thu, Apr 02, 2015 at 09:09:07AM +0200, Michael Mueller wrote: On Wed, 1 Apr 2015 20:05:24 -0300 Eduardo Habkost ehabk...@redhat.com wrote: If you don't want to encode that knowledge in libvirt or other management software for s390, it looks like you need something like

Re: [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-04-01 Thread Eduardo Habkost
On Tue, Mar 31, 2015 at 10:09:09PM +0200, Michael Mueller wrote: On Tue, 31 Mar 2015 15:35:26 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: This patch implements a new QMP request named 'query-cpu-model'. It returns

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-04-01 Thread Eduardo Habkost
(CCing libvir-list and Jiri Denemark for libvirt-related discussion about -cpu host/none, and live-migration safety expectations) On Wed, Apr 01, 2015 at 06:31:23PM +0200, Michael Mueller wrote: On Wed, 1 Apr 2015 10:01:13 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Tue, Mar 31

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-04-01 Thread Eduardo Habkost
On Wed, Apr 01, 2015 at 09:05:31PM +0200, Michael Mueller wrote: On Wed, 1 Apr 2015 13:59:05 -0300 Eduardo Habkost ehabk...@redhat.com wrote: Not directly invalid as -cpu none will be the same as omitting the -cpu option. KVM will setup the vcpu properties withou any QEMU control

Re: [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions

2015-03-31 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:25PM +0200, Michael Mueller wrote: [...] ## # @query-cpu-definitions: # # Return a list of supported virtual CPU definitions # +# @machine: #optional machine type (since 2.4) +# +# @accel: #optional accelerator id (since 2.4) +# # Returns: a list of

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Eduardo Habkost
On Tue, Mar 31, 2015 at 01:21:05PM +0200, Michael Mueller wrote: On Mon, 30 Mar 2015 17:17:21 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: This patch implements a new QMP request named 'query-cpu-model'. It returns

Re: [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: This patch implements a new QMP request named 'query-cpu-model'. It returns the cpu model of cpu 0 and its backing accelerator. request: {execute : query-cpu-model } answer: {return : {name: 2827-ga2, accel: kvm }}

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 02:20:43PM -0600, Eric Blake wrote: On 03/30/2015 02:17 PM, Eduardo Habkost wrote: On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: This patch implements a new QMP request named 'query-cpu-model'. It returns the cpu model of cpu 0 and its backing

Re: [PATCH v4 10/15] target-s390x: Prepare accelerator during cpu object realization

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:23PM +0200, Michael Mueller wrote: This patch implements routine s390_cpu_model_init(). It is called by the realize function during instantiation of an cpu object. Its task is to initialize the current accelerator with the properties of the selected processor

Re: [PATCH v4 13/15] target-s390x: Extend QMP command query-cpu-definitions

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:26PM +0200, Michael Mueller wrote: [...] CpuDefinitionInfoList *arch_query_cpu_definitions(bool has_machine, const char *machine, bool has_accel,

Re: [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: [...] diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 829945d..1698b52 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -37,6 +37,11 @@ #define CR0_RESET 0xE0UL #define CR14_RESET

Re: [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: This patch implements a new QMP request named 'query-cpu-model'. It returns the cpu model of cpu 0 and its backing accelerator. request: {execute : query-cpu-model } answer: {return : {name: 2827-ga2, accel: kvm }} If

Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-05 Thread Eduardo Habkost
On Thu, Mar 05, 2015 at 03:56:03PM +0100, Michael Mueller wrote: On Wed, 4 Mar 2015 16:19:25 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Tue, Mar 03, 2015 at 11:55:24AM +0100, Michael Mueller wrote: On Mon, 02 Mar 2015 17:57:01 +0100 Andreas Färber afaer...@suse.de wrote

Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-04 Thread Eduardo Habkost
On Tue, Mar 03, 2015 at 11:55:24AM +0100, Michael Mueller wrote: On Mon, 02 Mar 2015 17:57:01 +0100 Andreas Färber afaer...@suse.de wrote: Am 02.03.2015 um 17:43 schrieb Michael Mueller: On Mon, 02 Mar 2015 14:57:21 +0100 Andreas Färber afaer...@suse.de wrote: int

Re: [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:43:53PM +0100, Michael Mueller wrote: QEMU now switches into probe mode when the selected machine is none and no specific accelerator(s) has been requested (i.e.: -machine none). In probe mode a by ARCH_CONFIG defines predefined list of accelerators run their

Re: [PATCH v3 14/16] target-s390x: Extend QMP command query-cpu-definitions

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:44:06PM +0100, Michael Mueller wrote: This patch implements the QMP command 'query-cpu-definitions' in the S390 context. The command returns a list of cpu model names in the current host context. A consumer may successfully request each listed cpu model as long for a

Re: [PATCH v3 00/16] s390x cpu model implementation

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:43:52PM +0100, Michael Mueller wrote: [...] What's currently a little bit unclear to me is how to best initialize the various accelerators for machine 'none'. I played around with different options and finally came up with the following sugguestion: Introduce a

Re: [PATCH] target-i386: add feature flags for CPUID[EAX=0xd,ECX=1]

2014-11-26 Thread Eduardo Habkost
On Wed, Nov 26, 2014 at 10:20:12AM +0100, Paolo Bonzini wrote: On 25/11/2014 21:02, Paolo Bonzini wrote: +static const char *cpuid_xsave_feature_name[] = { +xsaveopt, xsavec, xgetbv1, xsaves, None of the above features introduce any new state that might need to be

Re: KVM causes #GP on XRSTORS

2014-11-25 Thread Eduardo Habkost
On Fri, Nov 21, 2014 at 03:46:55PM +0100, Paolo Bonzini wrote: On 20/11/2014 17:34, Nadav Amit wrote: Fenghua, I got KVM (v3.17) crashing on a machine that supports XRSTORS - It appears to get a #GP when it is trying to load the guest FPU. One reason for the #GP is that

Re: [PATCH] target-i386: add feature flags for CPUID[EAX=0xd,ECX=1]

2014-11-25 Thread Eduardo Habkost
On Tue, Nov 25, 2014 at 06:35:42PM +0100, Paolo Bonzini wrote: These represent xsave-related capabilities of the processor, and KVM may or may not support them. Add feature bits so that they are considered by -cpu ...,enforce, and use the new feature work instead of calling

Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default

2014-10-29 Thread Eduardo Habkost
On Wed, Oct 29, 2014 at 06:40:48PM +0100, Andreas Färber wrote: Am 03.10.2014 um 21:39 schrieb Eduardo Habkost: TCG doesn't support VMX, and nested VMX is not enabled by default on the KVM kernel module. So, there's no reason to have VMX enabled by default on the core2duo and coreduo

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-27 Thread Eduardo Habkost
On Fri, Oct 24, 2014 at 07:55:10AM +0200, Paolo Bonzini wrote: [...] I think we can keep the macros. The actual cleanup would be to have a single member for the 32 512-bit ZMM registers, instead of splitting xmm/ymmh/zmmh/zmm_hi16. This will get rid of the YMM_* and ZMM_* registers.

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-24 Thread Eduardo Habkost
On Fri, Oct 24, 2014 at 07:55:10AM +0200, Paolo Bonzini wrote: On 10/24/2014 03:27 AM, Chao Peng wrote: On Thu, Oct 23, 2014 at 05:49:23PM -0200, Eduardo Habkost wrote: On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote: [...] @@ -707,6 +714,24 @@ typedef union { } XMMReg

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-24 Thread Eduardo Habkost
and matches the Intel docs. Reviewed-by: Eduardo Habkost ehabk...@redhat.com -- Eduardo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-24 Thread Eduardo Habkost
On Thu, Oct 23, 2014 at 04:34:46PM +0200, Paolo Bonzini wrote: On 10/23/2014 05:02 AM, Chao Peng wrote: Add AVX512 feature bits, register definition and corresponding xsave/vmstate support. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com --- target-i386/cpu.c | 10 --

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-23 Thread Eduardo Habkost
On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote: [...] @@ -707,6 +714,24 @@ typedef union { } XMMReg; typedef union { +uint8_t _b[32]; +uint16_t _w[16]; +uint32_t _l[8]; +uint64_t _q[4]; +float32 _s[8]; +float64 _d[4]; +} YMMReg; + +typedef union

[PATCH v3 3/6] target-i386: Disable CPUID_ACPI by default on KVM mode

2014-10-03 Thread Eduardo Habkost
machine-type compat code because it is currently impossible to run a KVM VM with the ACPI flag set. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b55950b..4119fca 100644

[PATCH v3 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-10-03 Thread Eduardo Habkost
to be the default, and changing the default would break that code. I will send an RFC to address that later. Cc: Aurelien Jarno aurel...@aurel32.net Cc: Paolo Bonzini pbonz...@redhat.com Cc: kvm@vger.kernel.org Eduardo Habkost (6): pc: Create pc_compat_2_1() functions target-i386: Rename KVM auto

[PATCH v3 1/6] pc: Create pc_compat_2_1() functions

2014-10-03 Thread Eduardo Habkost
We will need new compat code for the 2.1 machine-types. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 13 - hw/i386/pc_q35.c | 13 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index

[PATCH v3 2/6] target-i386: Rename KVM auto-feature-enable compat function

2014-10-03 Thread Eduardo Habkost
the feature may still be enabled by default in some CPU models). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 6 +++--- hw/i386/pc_q35.c | 2 +- target-i386/cpu.c | 2 +- target-i386/cpu.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386

[PATCH v3 4/6] target-i386: Remove unsupported bits from all CPU models

2014-10-03 Thread Eduardo Habkost
requiring some features to be explicitly disabled. This patch removes the above features from all CPU model definitions. We won't need any machine-type compat code for those changes, because it is impossible to have existing VMs with those features enabled. Signed-off-by: Eduardo Habkost ehabk

[PATCH v3 5/6] target-i386: Don't enable nested VMX by default

2014-10-03 Thread Eduardo Habkost
compat code, as people may be running the older machine-types on hosts that had VMX nesting enabled. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ target-i386/cpu.c | 8 3 files changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v3 6/6] target-i386: Disable SVM by default in KVM mode

2014-10-03 Thread Eduardo Habkost
compatibility on previous machine-types. Suggested-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + target-i386/cpu.c | 6 ++ target-i386/cpu.h | 1 + 4 files changed, 9 insertions(+) diff --git a/hw/i386

[PATCH 1/3] x86: apic: Look up MAXPHYADDR on CPUID correctly

2014-08-28 Thread Eduardo Habkost
is 36 bits for processors that do not support CPUID leaf 8008H, or indicated by CPUID.8008H:EAX[bits 7:0] for processors that support CPUID leaf 8008H. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- lib/x86/processor.h | 8 x86/apic.c | 2 +- 2 files changed

[PATCH 0/3] kvm-unit-tests: Check CPUID level/xlevel before using CPUID data

2014-08-28 Thread Eduardo Habkost
Change the kvm-unit-tests x86 code to always check CPUID level/xlevel before looking at CPUID data. Otherwise, the test code will be looking at bogus data. Eduardo Habkost (3): x86: apic: Look up MAXPHYADDR on CPUID correctly x86: vmx: Use cpuid_maxphyaddr() x86: Check level, xlevel before

[PATCH 2/3] x86: vmx: Use cpuid_maxphyaddr()

2014-08-28 Thread Eduardo Habkost
The vmx test code calls cpuid(0x8008) without checking xlevel first. Change it to use cpuid_maxphyaddr() instead. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- x86/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index ef9caca

[PATCH 3/3] x86: Check level, xlevel before returning CPUID data

2014-08-28 Thread Eduardo Habkost
of feature bits, so it is safe to return all zeroes when the requested CPUID leaf is not available. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- lib/x86/processor.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/x86/processor.h b/lib/x86/processor.h index

Re: [PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-27 Thread Eduardo Habkost
On Wed, Aug 27, 2014 at 03:36:51PM +0200, Paolo Bonzini wrote: Il 26/08/2014 20:01, Eduardo Habkost ha scritto: On Tue, Aug 26, 2014 at 02:56:21PM +0200, Paolo Bonzini wrote: Il 25/08/2014 22:45, Eduardo Habkost ha scritto: TCG users expect the default CPU model to contain most TCG

Re: [PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-27 Thread Eduardo Habkost
On Wed, Aug 27, 2014 at 04:33:54PM +0200, Paolo Bonzini wrote: Il 27/08/2014 16:05, Eduardo Habkost ha scritto: On Wed, Aug 27, 2014 at 03:36:51PM +0200, Paolo Bonzini wrote: Il 26/08/2014 20:01, Eduardo Habkost ha scritto: So maybe that's good news, as things can be simpler if we make both

Re: [PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-27 Thread Eduardo Habkost
On Wed, Aug 27, 2014 at 05:58:49PM +0200, Andreas Färber wrote: Am 27.08.2014 17:42, schrieb Eduardo Habkost: On Wed, Aug 27, 2014 at 04:33:54PM +0200, Paolo Bonzini wrote: Il 27/08/2014 16:05, Eduardo Habkost ha scritto: On Wed, Aug 27, 2014 at 03:36:51PM +0200, Paolo Bonzini wrote: Il

Re: [PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-27 Thread Eduardo Habkost
On Wed, Aug 27, 2014 at 06:18:13PM +0200, Paolo Bonzini wrote: Il 27/08/2014 18:08, Eduardo Habkost ha scritto: Might that be an opportunity to reconsider a -cpu best or so, independent of its implementation, to avoid host? Nowadays we have CPU models added way before silicon

Re: [PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-26 Thread Eduardo Habkost
On Tue, Aug 26, 2014 at 02:56:21PM +0200, Paolo Bonzini wrote: Il 25/08/2014 22:45, Eduardo Habkost ha scritto: TCG users expect the default CPU model to contain most TCG-supported features (and it makes sense). See, for example, commit f1e00a9cf326acc1f2386a72525af8859852e1df

[PATCH v2 0/2] target-i386: tsc_adjust and mpx feature names

2014-08-25 Thread Eduardo Habkost
patches. Eduardo Habkost (2): target-i386: Add mpx CPU feature name target-i386: Add tsc_adjust CPU feature name target-i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

[PATCH v2 1/2] target-i386: Add mpx CPU feature name

2014-08-25 Thread Eduardo Habkost
Migration support for MPX is already implemented (commit 79e9ebebbf2a00c46fcedb6dc7dd5e12bbd30216), so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 2/2] target-i386: Add tsc_adjust CPU feature name

2014-08-25 Thread Eduardo Habkost
tsc_adjust migration support is already implemented (commit f28558d3d37ad3bc4e35e8ac93f7bf81a0d5622c), so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 1/6] pc: Create pc_compat_2_1() functions

2014-08-25 Thread Eduardo Habkost
We will need new compat code for the 2.1 machine-types. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 13 - hw/i386/pc_q35.c | 13 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index

[PATCH v2 0/6] target-i386: Make most CPU models work with enforce out of the box

2014-08-25 Thread Eduardo Habkost
that later. Cc: Aurelien Jarno aurel...@aurel32.net Cc: Paolo Bonzini pbonz...@redhat.com Cc: kvm@vger.kernel.org Eduardo Habkost (6): pc: Create pc_compat_2_1() functions target-i386: Rename KVM auto-feature-enable compat function target-i386: Disable CPUID_ACPI by default on KVM mode target

[PATCH v2 4/6] target-i386: Remove unsupported bits from all CPU models

2014-08-25 Thread Eduardo Habkost
requiring some features to be explicitly disabled. This patch removes the above features from all CPU model definitions. We won't need any machine-type compat code for those changes, because it is impossible to have existing VMs with those features enabled. Signed-off-by: Eduardo Habkost ehabk

[PATCH v2 5/6] target-i386: Don't enable nested VMX by default

2014-08-25 Thread Eduardo Habkost
compat code, as people may be running the older machine-types on hosts that had VMX nesting enabled. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ target-i386/cpu.c | 8 3 files changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v2 2/6] target-i386: Rename KVM auto-feature-enable compat function

2014-08-25 Thread Eduardo Habkost
the feature may still be enabled by default in some CPU models). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 6 +++--- hw/i386/pc_q35.c | 2 +- target-i386/cpu.c | 2 +- target-i386/cpu.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386

[PATCH v2 6/6] target-i386: Disable SVM by default in KVM mode

2014-08-25 Thread Eduardo Habkost
compatibility on previous machine-types. Suggested-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + target-i386/cpu.c | 6 ++ target-i386/cpu.h | 1 + 4 files changed, 9 insertions(+) diff --git a/hw/i386

[PATCH v2 3/6] target-i386: Disable CPUID_ACPI by default on KVM mode

2014-08-25 Thread Eduardo Habkost
machine-type compat code because it is currently impossible to run a KVM VM with the ACPI flag set. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 0396410..b7fc6e0 100644

Re: [PATCH kvm-unit-tests 1/2] x86: Use host CPU parameter for apic test

2014-08-19 Thread Eduardo Habkost
On Tue, Aug 19, 2014 at 11:51:05AM +0200, Paolo Bonzini wrote: Il 18/08/2014 21:43, Nadav Amit ha scritto: Currently, the TSC deadline test never runs, since TSC deadline is disabled unless the host cpu parameter is used. This patch changes the apic test to use the qemu host cpu

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-08-12 Thread Eduardo Habkost
On Wed, Jun 04, 2014 at 03:17:56AM -0400, Jidong Xiao wrote: On Wed, Jun 4, 2014 at 3:09 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 04/06/2014 03:10, Jidong Xiao ha scritto: diff --git a/qemu-2.0.0/target-i386/kvm.c.orig b/qemu-2.0.0/target-i386/kvm.c index 4389959..b8b282d 100644

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-08-12 Thread Eduardo Habkost
On Tue, Aug 12, 2014 at 09:12:00PM +0200, Paolo Bonzini wrote: Il 12/08/2014 20:55, Eduardo Habkost ha scritto: This makes the CPUID data change under the guest's feet during live-migration. Adding compat code to ensure older machine-types keep the old behavior is necessary

[PATCH] target-i386: Add MPX CPU feature name

2014-08-06 Thread Eduardo Habkost
Migration support for MPX is already implemented, so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6d008ab

[PATCH] target-i386: Add tsc_adjust CPU feature name

2014-08-06 Thread Eduardo Habkost
tsc_adjust migration support was implemented almost 2 years ago, by commit f28558d3d37ad3bc4e35e8ac93f7bf81a0d5622c, so QEMU can safely recognize the feature name. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- This needs to be applied after: [PATCH] target-i386: Add MPX CPU feature name

Re: kvm-unit-tests failures

2014-08-05 Thread Eduardo Habkost
On Tue, Aug 05, 2014 at 12:26:26PM +0200, Paolo Bonzini wrote: Il 04/08/2014 19:02, Chris J Arges ha scritto: All tests below are done with the kvm tip (fresh as of today) merged with 3.16-rc4. Sorry, I had missed the list of failures. * Failures: - pmu As suggested in comment 2 on

[PATCH for-2.1] target-i386: Add kvmclock-stable-bit feature bit name

2014-07-04 Thread Eduardo Habkost
, the new name also makes the flag configurable, allowing the user to disable it (which may be useful for testing or for compatibility with old kernels). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[qom-cpu PATCH 1/3] target-i386: Disable CPUID_ACPI by default on KVM mode

2014-06-18 Thread Eduardo Habkost
to run a KVM VM with the ACPI flag set. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index de09ca2..8de1566 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -461,6 +461,7

[qom-cpu PATCH 3/3] target-i386: Don't enable nested VMX by default

2014-06-18 Thread Eduardo Habkost
compat code, as people may be running the older machine-types on hosts that had VMX nesting enabled. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ target-i386/cpu.c | 8 3 files changed, 8 insertions(+), 4 deletions(-) diff --git

[qom-cpu PATCH 2/3] target-i386: Remove unsupported bits from all CPU models

2014-06-18 Thread Eduardo Habkost
requiring some features to be explicitly disabled. This patch removes the above features from all CPU model definitions. We won't need any machine-type compat code for those changes, because it is impossible to have existing VMs with those features enabled. Signed-off-by: Eduardo Habkost ehabk

[qom-cpu PATCH 0/3] target-i386: Make most CPU models work with enforce out of the box

2014-06-18 Thread Eduardo Habkost
) that already expects qemu32 or qemu64 to be the default, and changing the default would break that code. I will send an RFC to address that later. Cc: Aurelien Jarno aurel...@aurel32.net Cc: Paolo Bonzini pbonz...@redhat.com Cc: kvm@vger.kernel.org Eduardo Habkost (3): target-i386: Disable

Re: [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: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop

2014-06-05 Thread Eduardo Habkost
On Wed, Jun 04, 2014 at 10:44:48PM +0200, Borislav Petkov wrote: On Wed, Jun 04, 2014 at 06:34:04PM +0200, Paolo Bonzini wrote: That should be the purpose of KVM_GET_EMULATED_CPUID, so MWAIT could be added in __do_cpuid_ent_emulated. However, the corresponding QEMU patches were never

[RFC 0/2] GET_EMULATED_CPUID support with allow-emulation option

2014-06-05 Thread Eduardo Habkost
: Christian Borntraeger borntrae...@de.ibm.com Cc: Jason J. Herne jjhe...@linux.vnet.ibm.com Cc: Andreas Färber afaer...@suse.de Cc: Jason J. Herne jjhe...@linux.vnet.ibm.com Borislav Petkov (1): kvm: Implement kvm_arch_get_emulated_cpuid() Eduardo Habkost (1): target-i386: Add allow-emulation X86CPU

Re: [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: [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: [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: [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: [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: [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
+0200, Alexander Graf wrote: 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

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

[RFC 2/2 v2] target-i386: Add x-allow-emulation X86CPU property

2014-06-05 Thread Eduardo Habkost
that it is not supposed to be supported forever, and intended for developers who want to test GET_EMULATED_CPUID. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes v1 - v2: * Rename property to x-allow-emulation --- target-i386/cpu-qom.h | 3 +++ target-i386/cpu.c | 18

Re: [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

Re: [Qemu-devel] [PATCH] machine: Add kvm-type property

2014-06-02 Thread Eduardo Habkost
On Mon, Jun 02, 2014 at 11:56:59AM +0300, Marcel Apfelbaum wrote: On Sun, 2014-06-01 at 11:31 +0300, Marcel Apfelbaum wrote: On Fri, 2014-05-30 at 17:41 -0300, Eduardo Habkost wrote: The kvm-type machine option was left out when MachineState was introduced, preventing the kvm-type option

[PATCH] kvm: Ensure negative return value on kvm_init() error handling path

2014-05-30 Thread Eduardo Habkost
We need to ensure ret 0 when going through the error path, or QEMU may try to run the half-initialized VM and crash. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- kvm-all.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-all.c index 721a390

[PATCH] machine: Add kvm-type property

2014-05-30 Thread Eduardo Habkost
The kvm-type machine option was left out when MachineState was introduced, preventing the kvm-type option from being used. Add the missing property. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Cc: Andreas Färber afaer...@suse.de Cc: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Cc

Re: [PATCH] machine: Add kvm-type property

2014-05-30 Thread Eduardo Habkost
On Fri, May 30, 2014 at 10:46:56PM +0200, Paolo Bonzini wrote: Il 30/05/2014 22:41, Eduardo Habkost ha scritto: diff --git a/include/hw/boards.h b/include/hw/boards.h index 2d2e2be..44956d6 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -111,6 +111,7 @@ struct MachineState

Re: [Qemu-devel] [PATCH] savevm: check vmsd for migratability status (v2)

2014-04-30 Thread Eduardo Habkost
(CCing Juan) On Tue, Apr 29, 2014 at 09:39:03PM -0300, Marcelo Tosatti wrote: Check vmsd for unmigratable field, allowing migratibility status to be modified after vmstate_register. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com diff

Re: [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-29 Thread Eduardo Habkost
On Tue, Apr 29, 2014 at 08:22:36AM +0200, Paolo Bonzini wrote: Il 28/04/2014 21:23, Eduardo Habkost ha scritto: Makes sense. Basically -cpu host,migratable=yes is close to libvirt's host-model and Alex Graf's proposed -cpu best. Should we call it -cpu best and drop migratability of -cpu

Re: [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-28 Thread Eduardo Habkost
On Fri, Apr 25, 2014 at 11:08:00PM +0200, Paolo Bonzini wrote: Il 25/04/2014 01:18, Eduardo Habkost ha scritto: On Fri, Apr 25, 2014 at 12:57:48AM +0200, Paolo Bonzini wrote: Il 24/04/2014 22:57, Eduardo Habkost ha scritto: If that didn't break other use cases, I would agree. But -cpu host

Re: [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-28 Thread Eduardo Habkost
On Mon, Apr 28, 2014 at 09:06:42PM +0200, Paolo Bonzini wrote: Il 28/04/2014 17:46, Eduardo Habkost ha scritto: So I couldn't indeed think of uses of -cpu host together with migration. But if you're sure there is none, block it in QEMU. There's no reason why this should be specific to libvirt

Re: [PATCH] savevm: check vmsd for migratability status

2014-04-28 Thread Eduardo Habkost
On Fri, Apr 25, 2014 at 07:47:09PM -0300, Marcelo Tosatti wrote: Check vmsd for unmigratable field, allowing migratibility status to be modified after vmstate_register. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/savevm.c b/savevm.c index 22123be..61a25c0 100644 ---

Re: target-i386: block migration and savevm if invariant tsc is exposed (v3)

2014-04-25 Thread Eduardo Habkost
On Thu, Apr 24, 2014 at 06:32:42PM -0300, Marcelo Tosatti wrote: On Thu, Apr 24, 2014 at 04:21:59PM -0300, Eduardo Habkost wrote: On Wed, Apr 23, 2014 at 06:04:45PM -0300, Marcelo Tosatti wrote: Invariant TSC documentation mentions that invariant TSC will run at a constant rate in all

Re: target-i386: block migration and savevm if invariant tsc is exposed (v3)

2014-04-24 Thread Eduardo Habkost
On Wed, Apr 23, 2014 at 06:04:45PM -0300, Marcelo Tosatti wrote: Invariant TSC documentation mentions that invariant TSC will run at a constant rate in all ACPI P-, C-. and T-states. This is not the case if migration to a host with different TSC frequency is allowed, or if savevm is

Re: [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-24 Thread Eduardo Habkost
On Thu, Apr 24, 2014 at 04:42:33PM -0400, Paolo Bonzini wrote: Il 22/04/2014 21:14, Eduardo Habkost ha scritto: Not for -cpu host. If somebody needs migration to work, they shouldn't be using -cpu host anyway (I don't know if you have seen the other comments in my message?). I'm

Re: [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-24 Thread Eduardo Habkost
On Fri, Apr 25, 2014 at 12:57:48AM +0200, Paolo Bonzini wrote: Il 24/04/2014 22:57, Eduardo Habkost ha scritto: On Thu, Apr 24, 2014 at 04:42:33PM -0400, Paolo Bonzini wrote: Il 22/04/2014 21:14, Eduardo Habkost ha scritto: Not for -cpu host. If somebody needs migration to work, they shouldn't

<    1   2   3   4   5   6   7   >