[Qemu-devel] [PATCH 0/6] qdev: handle global properties after all instance_init calls

2012-10-03 Thread Eduardo Habkost
ulling too many dependencies. Patches 1-3 are just code movement, patch 3 adds the qdev unit test, patches 5-6 finally introduce post_init(), and move the qdev_prop_set_globals() call to post_init(). Anthony Liguori (1): qdev: split up header so it can be used in cpu.h Eduardo Habkost (4): qdev

[Qemu-devel] [PATCH 4/6] tests: unit tests for qdev global-properties handling

2012-10-03 Thread Eduardo Habkost
This tests the qdev global-properties handling code. A fake-qdev.c module was added with some stub functions, to keep dependencies under control. Signed-off-by: Eduardo Habkost --- tests/Makefile| 6 +++ tests/fake-qdev.c | 52 tests/test

[Qemu-devel] [PATCH 3/6] qdev: separate core from the code used only by qemu-system-*

2012-10-03 Thread Eduardo Habkost
function registration. Those two parts will need to be handled somehow (by being moved outside of qdev-core, or compiled out, or by adding equivalent implementations to *-user), to allow the qdev core to be used by *-user. Signed-off-by: Eduardo Habkost --- hw/Makefile.objs| 1 + hw/qdev

[Qemu-devel] [PATCH 1/6] qdev: split up header so it can be used in cpu.h

2012-10-03 Thread Eduardo Habkost
ration] Signed-off-by: Anthony Liguori Signed-off-by: Eduardo Habkost --- hw/irq.h | 2 + hw/mc146818rtc.c | 1 + hw/qdev-addr.c | 1 + hw/qdev-core.h | 240 + hw/qdev-monitor.h| 16 +++ hw/qdev-properties.c | 1 + hw/qd

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 08:53:22AM +0200, Igor Mammedov wrote: > On Wed, 3 Oct 2012 13:54:34 -0300 > Eduardo Habkost wrote: > > > On Wed, Oct 03, 2012 at 06:24:11PM +0200, Igor Mammedov wrote: > > > On Wed, 03 Oct 2012 17:20:46 +0200 > > > Paolo Bonzini wrote: &

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 02:57:29PM +0200, Andreas Färber wrote: > Am 04.10.2012 14:43, schrieb Eduardo Habkost: > > On Thu, Oct 04, 2012 at 08:53:22AM +0200, Igor Mammedov wrote: > >> For x86 CPU classes we were going dynamically generate CPU classes and > >> store

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 03:01:19PM +0200, Igor Mammedov wrote: > On Thu, 4 Oct 2012 09:43:41 -0300 > Eduardo Habkost wrote: > > > On Thu, Oct 04, 2012 at 08:53:22AM +0200, Igor Mammedov wrote: > > > On Wed, 3 Oct 2012 13:54:34 -0300 > > > Eduardo Habkost wro

Re: [Qemu-devel] [RFC 05/18] cpus.h: include qemu-stdio.h

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 02:00:57PM +0200, Igor Mammedov wrote: > On Wed, 3 Oct 2012 10:29:01 -0300 > Eduardo Habkost wrote: > > > Needed for the definition of fprint_function. > > > > This is not necessary right now, but it will be necessary if code that >

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 03:10:53PM +0200, Igor Mammedov wrote: > On Thu, 04 Oct 2012 14:57:29 +0200 > Andreas Färber wrote: > > > Am 04.10.2012 14:43, schrieb Eduardo Habkost: > > > On Thu, Oct 04, 2012 at 08:53:22AM +0200, Igor Mammedov wrote: > > >&g

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 03:25:59PM +0200, Igor Mammedov wrote: > On Thu, 4 Oct 2012 10:10:27 -0300 > Eduardo Habkost wrote: > > > On Thu, Oct 04, 2012 at 03:01:19PM +0200, Igor Mammedov wrote: > > > On Thu, 4 Oct 2012 09:43:41 -0300 > > > Eduardo Habkost wro

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 08:46:46AM -0500, Anthony Liguori wrote: > Eduardo Habkost writes: > > > We can make it a child of a generic "machine" class later, but right now > > a "PC" class is needed to allow global-properties to control some >

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 09:29:57AM -0500, Anthony Liguori wrote: > Eduardo Habkost writes: > > > On Thu, Oct 04, 2012 at 08:46:46AM -0500, Anthony Liguori wrote: > >> Eduardo Habkost writes: > >> > >> > We can make it a child of a generic "m

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 10:10:16AM -0500, Anthony Liguori wrote: > Eduardo Habkost writes: > > > On Thu, Oct 04, 2012 at 09:28:13AM -0500, Anthony Liguori wrote: > >> Paolo Bonzini writes: > >> > >> > Il 04/10/2012 15:46, Anthony Liguori

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 12:42:23PM -0500, Anthony Liguori wrote: > Eduardo Habkost writes: > > > On Thu, Oct 04, 2012 at 10:10:16AM -0500, Anthony Liguori wrote: > >> Eduardo Habkost writes: > >> > >> > On Thu, Oct 04, 2012 at 09:28:13AM -0500, An

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 03:50:34PM +0200, Igor Mammedov wrote: > On Thu, 4 Oct 2012 10:33:30 -0300 > Eduardo Habkost wrote: > > > On Thu, Oct 04, 2012 at 03:25:59PM +0200, Igor Mammedov wrote: > > > On Thu, 4 Oct 2012 10:10:27 -0300 > > > Eduardo Habkost wro

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-04 Thread Eduardo Habkost
On Thu, Oct 04, 2012 at 09:28:13AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 04/10/2012 15:46, Anthony Liguori ha scritto: > >>> > +typedef struct PC { > >>> > +DeviceState parent_obj; > >>> > +} PC; > >> So the general problem with this approach is that it strays from >

[Qemu-devel] [RFC 12/13] include core qdev code into *-user, too

2012-10-04 Thread Eduardo Habkost
The code depends on some functions from qemu-option.o, so add qemu-option.o to universal-obj-y to make sure it's included. Signed-off-by: Eduardo Habkost --- Makefile.objs | 3 +++ hw/Makefile.objs | 2 +- qom/Makefile.objs | 2 +- {hw => q

[Qemu-devel] [RFC 13/13] make CPU a child of DeviceState

2012-10-04 Thread Eduardo Habkost
From: Igor Mammedov [ehabkost: change CPU type declaration to hae TYPE_DEVICE as parent] Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- include/qemu/cpu.h | 6 +++--- qom/cpu.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/qemu

[Qemu-devel] [RFC 01/13] qdev: kill bogus comment

2012-10-04 Thread Eduardo Habkost
When the DeviceInfo code was removed, the comment describing qdev_subclass_init() was left in the code by mistake. Remove it. Cc: qemu-triv...@nongnu.org Signed-off-by: Eduardo Habkost --- hw/qdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/qdev.c b/hw/qdev.c index b5a52ac..a7270a5

[Qemu-devel] [RFC 04/13] qdev: separate core from the code used only by qemu-system-*

2012-10-04 Thread Eduardo Habkost
function registration. Those two parts will be handled later, by moving that code to qdev-system.c but keeping weak symbols for *-user. Signed-off-by: Eduardo Habkost --- hw/Makefile.objs| 1 + hw/qdev-properties-system.c | 329 hw/qdev

[Qemu-devel] [RFC 10/13] move qemu_irq typedef out of cpu-common.h

2012-10-04 Thread Eduardo Habkost
From: Igor Mammedov it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov --- hw/arm-misc.h | 1 + hw/bt.h | 2 ++ hw/devices.h | 2 ++ hw/omap.h | 1 + hw/soc_dma.h | 1 + hw/xen.h | 1 + qemu-common.h | 1 - sysemu.h

[Qemu-devel] [RFC 08/13] qdev-core: isolate reset register/unregister code

2012-10-04 Thread Eduardo Habkost
The reset register/unregister code is specific to qemu-system-*, so isolate it so it can be moved to qdev-system.c. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/qdev-core.c b/hw/qdev-core.c

[Qemu-devel] [RFC 05/13] qdev: rename qdev.c to qdev-core.c

2012-10-04 Thread Eduardo Habkost
Just to make clear that it's the qdev core code, corresponding to qdev-core.h. Signed-off-by: Eduardo Habkost --- hw/Makefile.objs | 2 +- hw/{qdev.c => qdev-core.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/{qdev.c => qdev-core.c} (100%) diff

[Qemu-devel] [RFC 03/13] qapi-types.h doesn't really need to include qemu-common.h

2012-10-04 Thread Eduardo Habkost
From: Igor Mammedov needed to prevent build breakage when CPU becomes a child of DeviceState [ehabkost: include too] Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- scripts/qapi-types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi

[Qemu-devel] [RFC 11/13] qdev: use full qdev.h include path on qdev*.c

2012-10-04 Thread Eduardo Habkost
This way, the files can be moved to the qom/ directory as-is. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 2 +- hw/qdev-properties.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-core.c b/hw/qdev-core.c index 46ab239..472fe8f 100644 --- a/hw/qdev

[Qemu-devel] [RFC 06/13] qdev-core: isolate vmstate handling into separate functions

2012-10-04 Thread Eduardo Habkost
Those functions will eventually be moved somewhere else, and won't get included on *-user. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/qdev-core.c b/hw/qdev-core.c index c3c4d77..24

[Qemu-devel] [RFC 07/13] qdev: move vmstate handling to qdev-system.c

2012-10-04 Thread Eduardo Habkost
Add GCC_WEAK symbols to qdev-core.c, so that qdev-core.o can be used without qdev-system.o (i.e. by *-user). Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 23 +++ hw/qdev-core.h | 2 ++ hw/qdev-system.c | 22 ++ 3 files changed, 31 insertions

[Qemu-devel] [RFC 02/13] qdev: split up header so it can be used in cpu.h

2012-10-04 Thread Eduardo Habkost
ration] Signed-off-by: Anthony Liguori Signed-off-by: Eduardo Habkost --- hw/irq.h | 2 + hw/mc146818rtc.c | 1 + hw/qdev-addr.c | 1 + hw/qdev-core.h | 240 + hw/qdev-monitor.h| 16 +++ hw/qdev-properties.c | 1 + hw/qd

[Qemu-devel] [RFC v2 00/13] include qdev core in *-user, make CPU child of DeviceState

2012-10-04 Thread Eduardo Habkost
Eduardo Habkost (9): qdev: kill bogus comment qdev: separate core from the code used only by qemu-system-* qdev: rename qdev.c to qdev-core.c qdev-core: isolate vmstate handling into separate functions qdev: move vmstate handling to qdev-system.c qdev-core: isolate reset register

[Qemu-devel] [PATCH 12/15] i386: kvm: mask cpuid_ext4_features bits earlier

2012-10-04 Thread Eduardo Habkost
This way all the filtering by GET_SUPPORTED_CPUID is being done at the same place in the code. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3f4bee5..335b3e7 100644 --- a

[Qemu-devel] [PATCH 10/15] i386: kvm: x2apic is not supported without in-kernel irqchip

2012-10-04 Thread Eduardo Habkost
puid()), but it will be eventually fixed to properly report the missing x2apic flag. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 704ad33..590f4d5 100644 --- a/target-i386/kvm.c +++ b/ta

[Qemu-devel] [PATCH 04/15] i386: kvm: extract register switch to cpuid_entry_get_reg() function

2012-10-04 Thread Eduardo Habkost
No behavior change: just code movement. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 22e8564..ae51573 100644 --- a/target-i386/kvm.c

[Qemu-devel] [PATCH 08/15] i386: kvm: set CPUID_EXT_HYPERVISOR on kvm_arch_get_supported_cpuid()

2012-10-04 Thread Eduardo Habkost
code automatically know that the flag can be safely set by QEMU. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 084b40c..1f451e3 100644 --- a/target-i386/kvm.c +++

[Qemu-devel] [PATCH 02/15] i386: kvm: kvm_arch_get_supported_cpuid: clean up has_kvm_features check

2012-10-04 Thread Eduardo Habkost
Instead of a function-specific has_kvm_features variable, simply use a "found" variable that will be checked in case we have to use the legacy get_para_features() interface. No behavior change, just code cleanup. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 8 +++- 1 fi

[Qemu-devel] [PATCH 15/15] i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too

2012-10-04 Thread Eduardo Habkost
Now that CPUID leaf 7 features can be enabled/disabled on the command-line, we need to filter them properly using GET_SUPPORTED_CPUID, at the same place where other features are filtered out. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-devel] [RFC 09/13] qdev: move reset register/unregister code to qdev-system.c

2012-10-04 Thread Eduardo Habkost
Also, add weak symbols that will be used if qdev-system.o is not compiled in (i.e. on *-user). Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 16 +++- hw/qdev-core.h | 3 +++ hw/qdev-system.c | 15 +++ 3 files changed, 25 insertions(+), 9 deletions(-) diff

[Qemu-devel] [PATCH 05/15] i386: kvm: extract CPUID entry lookup to cpuid_find_entry() function

2012-10-04 Thread Eduardo Habkost
No behavior change, just code movement. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index ae51573..3519028 100644 --- a/target-i386/kvm.c +++ b

[Qemu-devel] [PATCH 06/15] i386: kvm: extract try_get_cpuid() loop to get_supported_cpuid() function

2012-10-04 Thread Eduardo Habkost
No behavior change, just code movement. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3519028..7115921 100644 --- a/target-i386/kvm.c +++ b/target-i386

[Qemu-devel] [PATCH 09/15] i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid()

2012-10-04 Thread Eduardo Habkost
_kernel(). But the 'kvm_kernel_irqchip' global variable is initialized during kvm_init(), that is called very early, and kvm_init() is already a requirement to run the GET_SUPPORTED_CPUID ioctl() (as kvm_init() is the function that initializes the 'kvm_state' global variable). S

[Qemu-devel] [PATCH 03/15] i386: kvm: kvm_arch_get_supported_cpuid: use 'entry' variable

2012-10-04 Thread Eduardo Habkost
The reg switch will be moved to a separate function, so store the entry pointer in a variable. No behavior change, just code movement. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target-i386/kvm.c b/target

[Qemu-devel] [PATCH 11/15] i386: kvm: mask cpuid_kvm_features earlier

2012-10-04 Thread Eduardo Habkost
Instead of masking the KVM feature bits very late (while building the KVM_SET_CPUID2 data), mask it out on env->cpuid_kvm_features, at the same point where the other feature words are masked out. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 6 -- 1 file changed, 4 insertions(+)

[Qemu-devel] [PATCH 13/15] i386: kvm: filter CPUID feature words earlier, on cpu.c

2012-10-04 Thread Eduardo Habkost
because it simply uses the host CPU feature bits instead of GET_SUPPORTED_CPUID, and we need to fix that. Signed-off-by: Eduardo Habkost --- kvm.h | 1 + target-i386/cpu.c | 30 ++ target-i386/kvm.c | 18 -- 3 files changed, 31 insertions(+), 18 del

[Qemu-devel] [PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes

2012-10-04 Thread Eduardo Habkost
rlier, and inside target-i386/cpu.c (patch 13) - CPUID leaf 7 feature bits are now filterd based on GET_SUPPORTED_CPUID too (patch 15) Eduardo Habkost (15): i386: kvm: kvm_arch_get_supported_cpuid: move R_EDX hack outside of for loop i386: kvm: kvm_arch_get_supported_cpuid: cle

[Qemu-devel] [PATCH 07/15] i386: kvm: kvm_arch_get_supported_cpuid: replace if+switch with single 'if'

2012-10-04 Thread Eduardo Habkost
Additional fixups will be added, and making them a single 'if/else if' chain makes it clearer than two nested switch statements. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/target-i3

[Qemu-devel] [PATCH 14/15] i386: kvm: reformat filter_features_for_kvm() code

2012-10-04 Thread Eduardo Habkost
Cosmetic, but it will also help to make futher patches easier to review. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index a5c1628..7921b1b 100644

[Qemu-devel] [PATCH 01/15] i386: kvm: kvm_arch_get_supported_cpuid: move R_EDX hack outside of for loop

2012-10-04 Thread Eduardo Habkost
that. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5b18383..8b4ab34 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -155,24 +1

Re: [Qemu-devel] [QEMU PATCH] create struct for machine initialization arguments

2012-10-05 Thread Eduardo Habkost
On Fri, Oct 05, 2012 at 03:37:00PM -0300, Eduardo Habkost wrote: [...] > diff --git a/hw/boards.h b/hw/boards.h > index a2e0a54..813d0e5 100644 > --- a/hw/boards.h > +++ b/hw/boards.h > @@ -5,12 +5,16 @@ > > #include "qdev.h" > > -typedef void QE

Re: [Qemu-devel] [QEMU PATCH] create struct for machine initialization arguments (v2)

2012-10-05 Thread Eduardo Habkost
On Sat, Oct 06, 2012 at 12:33:09AM +0400, Max Filippov wrote: > On Sat, Oct 6, 2012 at 12:22 AM, Eduardo Habkost wrote: > > This should help us to: > > - More easily add or remove machine initialization arguments without > > having to change every single machine init functi

[Qemu-devel] [QEMU PATCH] i386: cpu: add missing CPUID[EAX=7, ECX=0] flag names

2012-10-09 Thread Eduardo Habkost
, RTM | 83c529151ab0d4a813e3f6a3e293fff75d468519 INVPCID | ad756a1603c5fac207758faaac7f01c34c9d0b7b ERMS | a01c8f9b4e266df1d7166d23216f2060648f862d Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH 04/14] create_config: separate section for qemu_*dir variables (v2)

2012-10-09 Thread Eduardo Habkost
On Tue, Oct 09, 2012 at 09:02:56AM -0600, Eric Blake wrote: > On 04/18/2012 01:55 PM, Eduardo Habkost wrote: > > The generic *dir section will eventually go away and be replaced with > > qemu_* section. By now, both sections will be kept, while the variables > > get renam

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2012 at 01:06:32PM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 08:50:09PM -0300, Eduardo Habkost wrote: > > On Wed, Aug 29, 2012 at 01:25:35AM +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 29, 2012 at 01:21:13AM +0300, Michael S. Tsirkin wro

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2012 at 04:18:12PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 29, 2012 at 09:56:12AM -0300, Eduardo Habkost wrote: > > On Wed, Aug 29, 2012 at 01:06:32PM +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 28, 2012 at 08:50:09PM -0300, Eduardo Habkost wrote: &

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2012 at 08:36:30AM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > In preparation for adding PV EOI support, disable PV EOI by default for > > 1.1 and older machine types, to avoid CPUID changing during migration. > > > > PV EOI can still be enabled/disabled by

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2012 at 05:11:12PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 29, 2012 at 10:49:04AM -0300, Eduardo Habkost wrote: > > > Normally CPUID will tell you if such important MSR is available. > > > So we can check that at destination. > > > > How ca

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2012 at 09:09:16AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Wed, Aug 29, 2012 at 08:36:30AM -0500, Anthony Liguori wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > In preparation for adding PV EOI support, disable PV EOI by default for > >> > 1.1 and old

[Qemu-devel] [QEMU 1.2 PATCH] i386: kvm: have a predefined set of default KVM feature bits

2012-08-29 Thread Eduardo Habkost
#x27;t support them. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 18 +- target-i386/cpu.h | 10 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 120a2e3..52042f0 100644 --- a/target-i386/cpu.c +++ b/

Re: [Qemu-devel] [PATCH 1/3] target-i386: disable pv eoi to fix migration across QEMU versions

2012-08-29 Thread Eduardo Habkost
conditionally enable new features for guests > future proofing us from this happening again in the future. > > Signed-off-by: Anthony Liguori Lots of trailing whitespaces below, but they can be fixed before pushing the patch, so: Reviewed-by: Eduardo Habkost Tested-by: Eduardo Habk

[Qemu-devel] Deprecating "cpudef" on QEMU 1.2

2012-08-31 Thread Eduardo Habkost
Anthony, I remeber we quickly discussed on #qemu about deprecting the support for "cpudef" config sections on QEMU 1.2. But as cpudef is not documented anywhere, we would simply document that on the 1.2 Release Notes. I am sending this just to confirm: this is still the current plan, right? -- E

Re: [Qemu-devel] Deprecating "cpudef" on QEMU 1.2

2012-08-31 Thread Eduardo Habkost
On Fri, Aug 31, 2012 at 06:26:34PM +0200, Andreas Färber wrote: > Am 31.08.2012 18:07, schrieb Eduardo Habkost: > > Anthony, I remeber we quickly discussed on #qemu about deprecting the > > support for "cpudef" config sections on QEMU 1.2. But as cpudef is not > >

[Qemu-devel] [PATCH 2/7] Drop cpu_list_id macro

2012-09-05 Thread Eduardo Habkost
From: Peter Maydell Since the only user of the extended cpu_list_id() format was the x86 ?model/?dump/?cpuid output, we can drop it completely. Signed-off-by: Peter Maydell Signed-off-by: Eduardo Habkost Reviewed-by: Eduardo Habkost --- cpus.c| 6 ++ linux-user/main.c | 6

[Qemu-devel] [PATCH 5/7] eliminate cpus-x86_64.conf file

2012-09-05 Thread Eduardo Habkost
This file is not needed anymore, as QEMU won't ship any config-based cpudefs out of the box, relying only on the builtin CPU models. Signed-off-by: Eduardo Habkost --- Makefile | 1 - arch_init.c| 1 - sysconfigs/target/cpus-x86_64.conf | 1

[Qemu-devel] [PATCH 3/7] i386: add missing CPUID_* constants

2012-09-05 Thread Eduardo Habkost
Those constants will be used by new CPU model definitions. Signed-off-by: Eduardo Habkost --- target-i386/cpu.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 49e0259..d7ea2f9 100644 --- a/target-i386/cpu.h +++ b/target

[Qemu-devel] [PATCH 1/7] target-i386: Fold -cpu ?cpuid, ?model output into -cpu help, drop ?dump

2012-09-05 Thread Eduardo Habkost
se options are undocumented and not used by libvirt, simply drop them completely rather than reinstating them with new style syntax. Instead, we fold the ?model and ?cpuid output into the output of the plain "-cpu help" output. The detailed output produced by ?dump is dropped. Signed-off

[Qemu-devel] [PATCH 0/7] x86 CPU patches that didn't get into 1.2

2012-09-05 Thread Eduardo Habkost
Hi, This is a small queue of patches that I consider "ready to go", that didn't enter QEMU 1.2. Eduardo Habkost (5): i386: add missing CPUID_* constants move CPU models from cpus-x86_64.conf to C eliminate cpus-x86_64.conf file x86_cpudef_setup: coding style change i3

[Qemu-devel] [PATCH 7/7] i386: kill cpudef config section support

2012-09-05 Thread Eduardo Habkost
rectly may simply use the "-cpu" command-line option (and maybe an equivalent -device option in the future) to set CPU features. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 101 ++ 1 file changed, 2 insertions(+), 99 deleti

[Qemu-devel] [PATCH 4/7] move CPU models from cpus-x86_64.conf to C

2012-09-05 Thread Eduardo Habkost
Those models are maintained by QEMU and may require compatibility code to be added when making some changes. Keeping the data in the C source code should make it simpler to handle those details. Signed-off-by: Eduardo Habkost --- sysconfigs/target/cpus-x86_64.conf | 129

[Qemu-devel] [PATCH 6/7] x86_cpudef_setup: coding style change

2012-09-05 Thread Eduardo Habkost
Make source code lines shorter. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 73302d8..e13e6d5 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

Re: [Qemu-devel] [RFC 2/6] i386: kill cpudef config section support

2012-09-06 Thread Eduardo Habkost
On Wed, Sep 05, 2012 at 11:39:21AM +0200, Igor Mammedov wrote: > On Wed, 5 Sep 2012 11:09:16 +0200 > Igor Mammedov wrote: > > > On Fri, 17 Aug 2012 14:53:38 -0300 > > Eduardo Habkost wrote: > > > > > It's nice to have a flexible system to maintain CPU

Re: [Qemu-devel] [PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-06 Thread Eduardo Habkost
On Thu, Sep 06, 2012 at 12:28:05PM +0200, Andreas Färber wrote: > Am 30.08.2012 21:20, schrieb Don Slutz: > > This is primarily done so that the guest will think it is running > > under vmware when hypervisor=vmware is specified as a property of a > > cpu. > > > > Also allow this to work in accel=

Re: [Qemu-devel] [PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-06 Thread Eduardo Habkost
On Thu, Sep 06, 2012 at 03:00:47PM -0400, Don Slutz wrote: > On 09/06/12 14:40, Eduardo Habkost wrote: > >On Thu, Sep 06, 2012 at 12:28:05PM +0200, Andreas Färber wrote: > >>Am 30.08.2012 21:20, schrieb Don Slutz: > >>>This is primarily done so that the guest will

[Qemu-devel] [PATCH 1/5] i386: kvm: bit 10 of CPUID[8000_0001].EDX is reserved

2012-09-06 Thread Eduardo Habkost
Bit 10 of CPUID[8000_0001].EDX is not defined as an alias of CPUID[1].EDX[10], so do not duplicate it on kvm_arch_get_supported_cpuid(). Signed-off-by: Eduardo Habkost Reviewed-By: Igor Mammedov --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target

[Qemu-devel] [PATCH 5/5] i386: -cpu help: remove reference to specific CPUID leaves/registers

2012-09-06 Thread Eduardo Habkost
The -cpu configuration interface is based on a list of feature names or properties, on a single namespace, so there's no need to mention on which CPUID leaf/register each flag is located. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 8 1 file changed, 4 insertions(

[Qemu-devel] [PATCH 0/5] i386: cpu: remove duplicate feature names

2012-09-06 Thread Eduardo Habkost
and only if the CPU vendor is AMD. This series depends on the "x86 CPU patches that didn't get into 1.2" series: http://article.gmane.org/gmane.comp.emulators.qemu/168633 Message-Id: <1346877673-9136-1-git-send-email-ehabk...@redhat.com> Eduardo Habkost (5): i38

[Qemu-devel] [PATCH 3/5] i386: cpu: replace EXT2_FEATURE_MASK with CPUID_EXT2_AMD_ALIASES

2012-09-06 Thread Eduardo Habkost
Both constants have the same value, but CPUID_EXT2_AMD_ALIASES is defined without using magic numbers. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[Qemu-devel] [PATCH 4/5] i386: cpu: eliminate duplicate feature names

2012-09-06 Thread Eduardo Habkost
ature bit aliases on Intel CPUs; - Make it easier to convert feature bits to CPU properties, as now we have a single bit on the x86_def_t struct for each CPU feature. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 31 +++ 1 file changed, 23 insertions(

[Qemu-devel] [PATCH 2/5] i386: kvm: use a #define for the set of alias feature bits

2012-09-06 Thread Eduardo Habkost
Instea of using a hardcoded hex constant, define CPUID_EXT2_AMD_ALIASES as the set of CPUID[8000_0001].EDX bits that on AMD are the same as the bits of CPUID[1].EDX. Signed-off-by: Eduardo Habkost Reviewed-By: Igor Mammedov --- target-i386/cpu.h | 12 target-i386/kvm.c | 2 +- 2

Re: [Qemu-devel] [PATCH 4/7] move CPU models from cpus-x86_64.conf to C

2012-09-10 Thread Eduardo Habkost
On Mon, Sep 10, 2012 at 03:04:30PM +0200, Igor Mammedov wrote: > On Mon, 10 Sep 2012 14:31:49 +0200 > Igor Mammedov wrote: > > > On Mon, 10 Sep 2012 14:18:38 +0200 > > Igor Mammedov wrote: > > > > > On Wed, 5 Sep 2012 17:41:10 -0300 > > > Eduard

Re: [Qemu-devel] [PATCH 4/7] move CPU models from cpus-x86_64.conf to C

2012-09-10 Thread Eduardo Habkost
On Mon, Sep 10, 2012 at 04:58:39PM +0200, Andreas Färber wrote: > Am 10.09.2012 16:50, schrieb Don Slutz: > > On 09/10/12 09:04, Igor Mammedov wrote: > >> But question unrelated to this patch is still stand if ia64 is valid > >> bit for > >> 01.EDX[30]? > >> > >> > > Intel® Processor Identification

[Qemu-devel] CPU code roadmap (was Re: [PATCH 0/7] x86 CPU patches that didn't get into 1.2)

2012-09-10 Thread Eduardo Habkost
On Mon, Sep 10, 2012 at 05:17:03PM +0200, Andreas Färber wrote: > Hi Eduardo, > > Am 05.09.2012 22:41, schrieb Eduardo Habkost: > > This is a small queue of patches that I consider "ready to go", that didn't > > enter QEMU 1.2. > > There's s

Re: [Qemu-devel] CPU code roadmap (was Re: [PATCH 0/7] x86 CPU patches that didn't get into 1.2)

2012-09-11 Thread Eduardo Habkost
On Mon, Sep 10, 2012 at 12:46:18PM -0300, Eduardo Habkost wrote: > On Mon, Sep 10, 2012 at 05:17:03PM +0200, Andreas Färber wrote: > > Hi Eduardo, > > > > Am 05.09.2012 22:41, schrieb Eduardo Habkost: > > > This is a small queue of patches that I consider &qu

Re: [Qemu-devel] [PATCH v2] Add ability to disable build of all targets

2012-09-11 Thread Eduardo Habkost
On Mon, Sep 10, 2012 at 06:00:54PM -0500, Anthony Liguori wrote: > "Daniel P. Berrange" writes: > > > From: "Daniel P. Berrange" > > > > Allow passing of '--target-list=' to configure to request that > > all targets are to be disabled. This allows for doing a very > > fast tools-only build of th

[Qemu-devel] [PATCH] configure: fix "--target-list=, , ..." option

2012-09-11 Thread Eduardo Habkost
h restores that ability. Signed-off-by: Eduardo Habkost Cc: Daniel P. Berrange Cc: Anthony Liguori --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 7656c32..9ee7038 100755 --- a/configure +++ b/configure @@ -1323,7 +1323,9 @@ if ! &q

Re: [Qemu-devel] [PATCH 01/22] target-i386: return Error from cpu_x86_find_by_name()

2012-09-13 Thread Eduardo Habkost
by patch 19)? But is harmless (as error is never set anyway), and this is code that simply gets removed later in this series. So: Reviewed-by: Eduardo Habkost > featurestr = strtok(NULL, ","); > } > x86_cpu_def->features |= plus_features; > @@ -1264,6

Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter

2012-09-13 Thread Eduardo Habkost
"error_is_set(&error)" is used, but I saw other QEMU code using "if (error)" before, so I don't know what's the recommended style. Anyway, the point of this patch is to add the error message, not cleaning up the existing code. So: Reviewed-by: Eduar

Re: [Qemu-devel] [PATCH 03/22] target-i386: if x86_cpu_realize() failed report error and do cleanup

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:52PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > Acked-by: Andreas Färber > --- > target-i386/helper.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/target-i386/helper.c b/target-i386/helper.c > index 8a5da3d..a0

Re: [Qemu-devel] [PATCH 04/22] target-i386: filter out not TCG features if running without kvm at realize time

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:53PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > Reviewed-by: Eduardo Habkost > Signed-off-by: Eduardo Habkost Reviewed-by: Eduardo Habkost (The Reviewed-by line is present above already, but I am just confirming that this refresh looks

Re: [Qemu-devel] [PATCH 05/22] target-i386: move out CPU features initialization in separate func

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:54PM +0200, Igor Mammedov wrote: > later it could be used in cpu_x86_find_by_name() to init > CPU from found cpu_def > > Signed-off-by: Igor Mammedov > Reviewed-by: Eduardo Habkost Reviewed-by: Eduardo Habkost (Just confirming that the patch refr

Re: [Qemu-devel] [PATCH v3 00/17] Allow changing of Hypervisor CPUIDs.

2012-09-17 Thread Eduardo Habkost
On Mon, Sep 17, 2012 at 10:00:50AM -0400, Don Slutz wrote: > Resend with new id so the backup files are not included. > > Also known as Paravirtualization CPUIDs. > > This is primarily done so that the guest will think it is running > under vmware when hypervisor-vendor=vmware is specified as a >

Re: [Qemu-devel] Breakage

2012-09-17 Thread Eduardo Habkost
On Mon, Sep 17, 2012 at 11:54:42PM +0400, malc wrote: > On Mon, 17 Sep 2012, Anthony Liguori wrote: > > > malc writes: > > > > > Some(thing|one) broke compilation with pcspk enabled. > > > Symptoms being: > > > > > > ../libhw32/hw/pcspk.o: In function `pcspk_io_write': > > > /home/malc/x/rcs/git

Re: [Qemu-devel] [PATCH 1/2] target-i386: Fix default Hypervisor level for accel=kvm.

2012-09-18 Thread Eduardo Habkost
On Tue, Sep 18, 2012 at 10:49:52AM -0400, Don Slutz wrote: > From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html > EAX should be KVM_CPUID_FEATURES (0x4001) not 0. > --- > target-i386/kvm.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/target

Re: [Qemu-devel] [PATCH 2/2] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-18 Thread Eduardo Habkost
On Tue, Sep 18, 2012 at 10:49:53AM -0400, Don Slutz wrote: > From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html > EAX should be KVM_CPUID_FEATURES (0x4001) not 0. > > If kvm is not configured, the additional option of hypervisor-level=1 > (or hypervisor-level=0x4001) nee

Re: [Qemu-devel] [PATCH 2/2] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-19 Thread Eduardo Habkost
On Tue, Sep 18, 2012 at 03:32:04PM -0400, Don Slutz wrote: > On 09/18/12 13:00, Eduardo Habkost wrote: > >On Tue, Sep 18, 2012 at 10:49:53AM -0400, Don Slutz wrote: > >> From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html > >>EAX should be KVM_CPUID_

Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models

2013-03-01 Thread Eduardo Habkost
On Fri, Mar 01, 2013 at 02:12:38PM +0100, Jiri Denemark wrote: > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote: > > Hi, > > > > After a long time trying to figure out the proper modelling inside QEMU, > > I believe the plans are now clearer in QEMU,

Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models

2013-03-01 Thread Eduardo Habkost
On Fri, Mar 01, 2013 at 02:28:37PM +0100, Jiri Denemark wrote: > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote: > > = Querying host capabilities = > > > > Requirement: libvirt needs to know which feature can really be enabled, > > before > > it t

Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models

2013-03-01 Thread Eduardo Habkost
On Fri, Mar 01, 2013 at 07:31:46PM +0100, Andreas Färber wrote: > Am 01.03.2013 14:12, schrieb Jiri Denemark: > > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote: > >> = Listing CPU models = > >> > >> Requirement: libvirt needs to know which CPU m

Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models

2013-03-01 Thread Eduardo Habkost
On Fri, Mar 01, 2013 at 06:34:31PM +, Daniel P. Berrange wrote: > On Fri, Mar 01, 2013 at 07:31:46PM +0100, Andreas Färber wrote: > > Am 01.03.2013 14:12, schrieb Jiri Denemark: > > > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote: > >

Re: [Qemu-devel] [PATCH] pc: cleanup 1.4 compat support

2013-08-19 Thread Eduardo Habkost
On Sun, Aug 18, 2013 at 04:50:02PM +0300, Michael S. Tsirkin wrote: > Make 1.4 compat code call the 1.6 one, reducing > code duplication. Add comment explaining why we can't > make 1.4 call 1.5 as usual. > > Signed-off-by: Michael S. Tsirkin > --- > hw/i386/pc_piix.c | 4 ++-- > hw/i386/pc_q35.c

Re: [Qemu-devel] [PATCH] pc: cleanup 1.4 compat support

2013-08-19 Thread Eduardo Habkost
On Mon, Aug 19, 2013 at 04:02:10PM +0300, Michael S. Tsirkin wrote: > On Mon, Aug 19, 2013 at 09:04:28AM -0300, Eduardo Habkost wrote: > > On Sun, Aug 18, 2013 at 04:50:02PM +0300, Michael S. Tsirkin wrote: > > > Make 1.4 compat code call the 1.6 one, reducing > > > co

Re: [Qemu-devel] [PATCH] pc: cleanup 1.4 compat support

2013-08-19 Thread Eduardo Habkost
On Mon, Aug 19, 2013 at 05:28:45PM +0300, Michael S. Tsirkin wrote: > On Mon, Aug 19, 2013 at 11:19:23AM -0300, Eduardo Habkost wrote: > > On Mon, Aug 19, 2013 at 04:02:10PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 19, 2013 at 09:04:28AM -0300, Eduardo Habkost wrote: &

[Qemu-devel] [PATCH 5/6] pc_piix: Kill pc_init1() memory region args

2013-08-20 Thread Eduardo Habkost
: Eduardo Habkost --- hw/i386/pc_piix.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e0d2b5f..3e77dfd 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -60,9 +60,7 @@ static bool has_pvpanic; static bool

<    2   3   4   5   6   7   8   9   10   11   >