[Qemu-devel] [PATCH 2/6] pc: Kill pc_init_pci_1_0()

2013-08-20 Thread Eduardo Habkost
d-off-by: Eduardo Habkost Cc: Markus Armbruster --- hw/i386/pc_piix.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 46f1fd7..17f0daa 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -275,19 +275,13 @@ s

[Qemu-devel] [PATCH 3/6] pc: Create pc_compat_*() functions

2013-08-20 Thread Eduardo Habkost
Making the older compat functions call the newer compat functions at the beginning allows the older functions undo what's done by newer compat functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5() and then set has_pvpanic=false. Signed-off-by: Eduardo Habkost --- hw

[Qemu-devel] [PATCH 1/6] pc: cleanup 1.4 compat support

2013-08-20 Thread Eduardo Habkost
From: "Michael S. Tsirkin" 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 Reviewed-by: Andreas Färber Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkos

[Qemu-devel] [PATCH 0/6] pc init & compat function cleanup

2013-08-20 Thread Eduardo Habkost
This is a follow-up to the patch submitted by Michael (patch 1/6 in this series), to make the pc compat initialization code simpler and easier to eventually remove code duplication between pc_piix.c and pc_q35.c. Eduardo Habkost (5): pc: Kill pc_init_pci_1_0() pc: Create pc_compat_

[Qemu-devel] [PATCH 4/6] pc: pc_compat_1_4() now can call pc_compat_1_5()

2013-08-20 Thread Eduardo Habkost
It just needs to set has_pvpanic=false after calling it. This way, it won't be a special case anymore. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_p

[Qemu-devel] [PATCH 6/6] pc_piix: Pass QEMUMachineInitArgs to pc_init1()

2013-08-20 Thread Eduardo Habkost
This makes the code much simpler. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 47 --- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3e77dfd..decbd61 100644 --- a/hw/i386

Re: [Qemu-devel] [PATCH 0/6] pc init & compat function cleanup

2013-08-21 Thread Eduardo Habkost
On Wed, Aug 21, 2013 at 12:20:32AM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 20, 2013 at 05:48:59PM -0300, Eduardo Habkost wrote: > > This is a follow-up to the patch submitted by Michael (patch 1/6 in this > > series), to make the pc compat initialization code simple

Re: [Qemu-devel] [PATCH 6/6] pc_piix: Pass QEMUMachineInitArgs to pc_init1()

2013-08-21 Thread Eduardo Habkost
On Wed, Aug 21, 2013 at 03:11:19PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > This makes the code much simpler. > > > > Signed-off-by: Eduardo Habkost > > Conflicts with my "[PATCH v4 1/6] pc: Don't prematurely explode > QEMUMac

Re: [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-21 Thread Eduardo Habkost
On Fri, Aug 16, 2013 at 01:13:45PM +0200, arm...@redhat.com wrote: > From: Markus Armbruster > > Don't explode QEMUMachineInitArgs before passing it to pc_init1(). > > Signed-off-by: Markus Armbruster Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH v4 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-21 Thread Eduardo Habkost
On Fri, Aug 16, 2013 at 01:13:46PM +0200, arm...@redhat.com wrote: > From: Markus Armbruster > > Don't explode when the variable is used just a few times, and never > changed. > > Signed-off-by: Markus Armbruster Reviewed-by: Eduardo Habkost -- Eduardo

[Qemu-devel] [pci PATCH v2 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-21 Thread Eduardo Habkost
From: Markus Armbruster Don't explode when the variable is used just a few times, and never changed. Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost --- hw/i386/pc_q35.c | 22 +- 1 file changed, 9 insertions(+), 13 dele

[Qemu-devel] [pci PATCH v2 0/6] pc init & compat function cleanup

2013-08-21 Thread Eduardo Habkost
Now sending the same series based on Michael's pci tree, to avoid conflicts, and including 2 "don't prematurely explode QEMUMachineInitArgs" patches from Markus. Eduardo Habkost (4): pc: Kill pc_init_pci_1_0() pc: Create pc_compat_*() functions pc: pc_compat_1_4() now ca

[Qemu-devel] [pci PATCH v2 5/6] pc: pc_compat_1_4() now can call pc_compat_1_5()

2013-08-21 Thread Eduardo Habkost
It just needs to set has_pvpanic=false after calling it. This way, it won't be a special case anymore. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_p

[Qemu-devel] [pci PATCH v2 4/6] pc: Create pc_compat_*() functions

2013-08-21 Thread Eduardo Habkost
Making the older compat functions call the newer compat functions at the beginning allows the older functions undo what's done by newer compat functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5() and then set has_pvpanic=false. Signed-off-by: Eduardo Habkost --- hw

[Qemu-devel] [pci PATCH v2 1/6] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-21 Thread Eduardo Habkost
From: Markus Armbruster Don't explode QEMUMachineInitArgs before passing it to pc_init1(). Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost --- hw/i386/pc_piix.c | 65 ++- 1 file change

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

2013-08-21 Thread Eduardo Habkost
: Eduardo Habkost --- hw/i386/pc_piix.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d3d4893..3c36a2a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -62,11 +62,11 @@ static bool has_pci_info = true; /* PC

[Qemu-devel] [pci PATCH v2 3/6] pc: Kill pc_init_pci_1_0()

2013-08-21 Thread Eduardo Habkost
d-off-by: Eduardo Habkost Cc: Markus Armbruster --- hw/i386/pc_piix.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bbefea6..dd730b1 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -263,19 +263,13 @@ s

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-22 Thread Eduardo Habkost
On 22/08/2013, at 12:39, Andrew Jones wrote: > The comment in kvm_max_vcpus() states that it's using the recommended > procedure from the kernel API documentation to get the max number > of vcpus that kvm supports. It is, but by always returning the > maximum number supported. The maximum number

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-26 Thread Eduardo Habkost
On Mon, Aug 26, 2013 at 06:45:27PM +0200, Benoît Canet wrote: > > Talk to Eduardo since this is related to cpuid configuration and he is > > an expert. > > I found the following in target-i386/cpu.c > > case 0x8006: > /* cache info (L2 cache) */ > *eax = 0; > *ebx

[Qemu-devel] [PATCH] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-26 Thread Eduardo Habkost
ould make it easier to eventually fix those inconsistencies. All inconsistencies I have found are documented in code comments. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 184 +++--- 1 file changed, 162 insertions(+), 22 deletions(-) dif

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Eduardo Habkost
On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: [...] > > > Do you have some recommandations regarding the other fields of the edx > > > register ? > > > > Probably it will be a good idea to let each CPU model have their own > > defaults for the cache information. > > Do you mean q

[Qemu-devel] [PATCH v2] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-27 Thread Eduardo Habkost
ould make it easier to eventually fix those inconsistencies. All inconsistencies I have found are documented in code comments. Signed-off-by: Eduardo Habkost Reviewed-by: liguang --- Changes v1 -> v2: * s/leafs/leaves/ on code comments --- target-i386

Re: [Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Eduardo Habkost
On Tue, Aug 27, 2013 at 09:51:22AM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > We have a lot of code duplication between machine types, > > this increases with each new machine type > > and each new field. > > > > This has already introduced a minor bug: description > > f

Re: [Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Eduardo Habkost
On Tue, Aug 27, 2013 at 07:13:49PM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 27, 2013 at 01:09:23PM -0300, Eduardo Habkost wrote: > > On Tue, Aug 27, 2013 at 09:51:22AM +0200, Markus Armbruster wrote: > > > "Michael S. Tsirkin" writes: > > > > > &g

Re: [Qemu-devel] [PATCH v2] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-30 Thread Eduardo Habkost
On Fri, Aug 30, 2013 at 04:51:20PM +0200, Andreas Färber wrote: > Am 27.08.2013 17:24, schrieb Eduardo Habkost: > > This is an attempt to make the CPUID cache topology code clearer, by > > replacing the magic numbers in the code with #defines, and moving all > > the cache in

Re: [Qemu-devel] [PATCH] forward cpuid leaves when using -cpu host

2013-09-02 Thread Eduardo Habkost
On Mon, Sep 02, 2013 at 02:45:48PM +0200, Benoît Canet wrote: > > Ping, > > I am aware that this patch must be a QObject/CPUState monstruosity but I don't > see how I could store the fact that the cpu derive from a "host" type cpu. > The alternative would be to remember a variable number of leave

Re: [Qemu-devel] [PATCH] i386: forward CPUID cache leaves when -cpu host is used

2013-09-02 Thread Eduardo Habkost
On Mon, Sep 02, 2013 at 02:55:36PM +0200, Andreas Färber wrote: [...] > > diff --git a/target-i386/cpu.h b/target-i386/cpu.h > > index 8a3d0fd..1ec32fa 100644 > > --- a/target-i386/cpu.h > > +++ b/target-i386/cpu.h > > @@ -865,6 +865,7 @@ typedef struct CPUX86State { > > bool tsc_valid; > >

Re: [Qemu-devel] [PATCH V3] target-i386: forward CPUID cache leaves when -cpu host is used

2013-09-02 Thread Eduardo Habkost
> This patch fix this. > > Signed-off-by: Benoit Canet Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH V11 02/11] NUMA: split -numa option

2013-09-03 Thread Eduardo Habkost
On Fri, Aug 30, 2013 at 11:10:41AM +0800, Wanlong Gao wrote: > Change -numa option like following as Paolo suggested: > -numa node,nodeid=0,cpus=0-1 \ > -numa mem,nodeid=0,size=1G > > This new option will make later coming memory hotplug better. > And this new option is implemented using O

Re: [Qemu-devel] [PATCH V11 06/11] NUMA: parse guest numa nodes memory policy

2013-09-03 Thread Eduardo Habkost
On Fri, Aug 30, 2013 at 11:10:45AM +0800, Wanlong Gao wrote: > The memory policy setting format is like: > > policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N > And we are adding this setting as a suboption of "-numa mem,", > the memory policy then can be set like fo

Re: [Qemu-devel] [PATCH V3] target-i386: forward CPUID cache leaves when -cpu host is used

2013-09-04 Thread Eduardo Habkost
On Mon, Sep 02, 2013 at 07:09:47PM +0200, Benoît Canet wrote: > > > > > > Signed-off-by: Benoit Canet > > > > Reviewed-by: Eduardo Habkost > > Thanks. > > Do you have an idea on how QEMU could reflect the real host clock frequency > to the gues

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Eduardo Habkost
On Thu, Sep 18, 2014 at 11:29:47AM -0500, Michael Roth wrote: > Quoting Michael S. Tsirkin (2014-09-14 13:41:23) > > From: Eduardo Habkost > > > > There are multiple reasons for running the global property tests on a > > subprocess: > > > > * We need the

[Qemu-devel] [RFC 02/10] bitops.h: Don't include qemu-common.h

2014-09-25 Thread Eduardo Habkost
This removes the following circular dependency: bitops.h -> qemu-common.h -> target-i386/cpu.h -> target-i386/cpu-qom.h -> qom/cpu.h -> qdev-core.h -> bitmap.h -> bitops.h. Signed-off-by: Eduardo Habkost --- include/qemu/bitops.h | 4 +++- 1 file changed, 3 insertions(+)

[Qemu-devel] [RFC 01/10] tests: Add missing include to test-bitops.c

2014-09-25 Thread Eduardo Habkost
The test code needs osdep.h for the ARRAY_SIZE macro. Signed-off-by: Eduardo Habkost --- tests/test-bitops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-bitops.c b/tests/test-bitops.c index 8238eb5..47b5d3e 100644 --- a/tests/test-bitops.c +++ b/tests/test-bitops.c @@ -8,6

[Qemu-devel] [RFC 05/10] tests: Support target-specific unit tests

2014-09-25 Thread Eduardo Habkost
unit tests, on the other hand, may apply to any target (e.g. they may test *-softmmu and/or *-user code). To clarify this, $(TARGETS) was renamed to $(QTEST_ARCHES). Signed-off-by: Eduardo Habkost --- tests/Makefile | 31 +++ 1 file changed, 23 insertions(+), 8

[Qemu-devel] [RFC 07/10] tests: Add unit test for X86CPU code

2014-09-25 Thread Eduardo Habkost
t add dependencies that ensure the target-specific object files are compiled on demand when building the test binary, but "make check" already requires "make" to be run first because of the qtest test cases, so I assume this is OK. Signed-off-by: Eduardo Habkost --- tests/.git

[Qemu-devel] [RFC 03/10] bitmap.h: Don't include qemu-common.h

2014-09-25 Thread Eduardo Habkost
This will avoid unexpected circular header dependencies in the future. Signed-off-by: Eduardo Habkost --- include/qemu/bitmap.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index 1babd5d..8c50d70 100644 --- a/include/qemu

[Qemu-devel] [RFC 09/10] tests: test-x86-cpu: Add TCG feature bit initialization test

2014-09-25 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- tests/test-x86-cpu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/test-x86-cpu.c b/tests/test-x86-cpu.c index 9227e20..e8e9a74 100644 --- a/tests/test-x86-cpu.c +++ b/tests/test-x86-cpu.c @@ -30,6 +30,30 @@ static void

[Qemu-devel] [RFC 08/10] target-i386: Isolate enabled-by-default features to a separate array

2014-09-25 Thread Eduardo Habkost
This will make it easier to write unit tests for the feature initialization logic. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 90d0a05..8d1af64 100644 --- a

[Qemu-devel] [RFC 04/10] tests: Move fake yield_until_fd_readable() to coroutine-stub.c

2014-09-25 Thread Eduardo Habkost
Other test code will use the function. Signed-off-by: Eduardo Habkost --- tests/Makefile | 1 + tests/coroutine-stub.c | 13 + tests/test-vmstate.c | 11 --- 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 tests/coroutine-stub.c diff --git

[Qemu-devel] [RFC 10/10] tests: test-x86-cpu: Add KVM feature bit initialization test

2014-09-25 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- tests/test-x86-cpu.c | 28 1 file changed, 28 insertions(+) diff --git a/tests/test-x86-cpu.c b/tests/test-x86-cpu.c index e8e9a74..afd5088 100644 --- a/tests/test-x86-cpu.c +++ b/tests/test-x86-cpu.c @@ -54,6 +54,33 @@ static void

[Qemu-devel] [RFC 06/10] tests: Make test-x86-cpuid target-specific

2014-09-25 Thread Eduardo Habkost
Instead of using a test-specific hack to add -I$(SRC_PATH)/target-i386, add test-x86-cpuid to $(test-obj-x86_64-softmmu-y). Signed-off-by: Eduardo Habkost --- tests/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 95566d9

[Qemu-devel] [RFC 00/10] Target-specific unit test support, add unit tests for target-i386/cpu.c code

2014-09-25 Thread Eduardo Habkost
This is an attempt to write unit tests for the target-i386/cpu.c code. By now, I just implemented 3 simple test cases, to ensure X86CPU objects can be created, and to ensure the CPU features are set properly depending on the CPU model table. Eduardo Habkost (10): tests: Add missing include to

Re: [Qemu-devel] [RFC 00/10] Target-specific unit test support, add unit tests for target-i386/cpu.c code

2014-09-26 Thread Eduardo Habkost
On Fri, Sep 26, 2014 at 05:20:32PM +0200, Paolo Bonzini wrote: > Il 25/09/2014 22:18, Eduardo Habkost ha scritto: > > This is an attempt to write unit tests for the target-i386/cpu.c code. By > > now, I > > just implemented 3 simple test cases, to ensure X86CPU object

Re: [Qemu-devel] [PATCH v2 13/17] accel: Rename 'init' method to 'init_machine'

2014-09-26 Thread Eduardo Habkost
On Fri, Sep 26, 2014 at 05:09:06PM +0200, Paolo Bonzini wrote: > Il 29/08/2014 22:31, Eduardo Habkost ha scritto: > > This makes explicit the fact that the method is for machine > > initialization, not just for accelerator object initialization. > > No, it is not for machin

Re: [Qemu-devel] [PATCH v2 10/17] accel: Move qtest accel registration to qtest.c

2014-09-26 Thread Eduardo Habkost
On Fri, Sep 26, 2014 at 05:06:43PM +0200, Paolo Bonzini wrote: > Il 29/08/2014 22:31, Eduardo Habkost ha scritto: > > As qtest_availble() returns 1 only when CONFIG_POSIX is set, keep > > setting AccelClass.available to keep current behavior (this is different > > from what w

[Qemu-devel] [PATCH 0/3] bitops: Header dependency fixes

2014-09-26 Thread Eduardo Habkost
This series adds a missing include, kills a circular header dependency, and avoid including qemu-common.h from a header to avoid new circular dependencies. Eduardo Habkost (3): tests: Add missing include to test-bitops.c bitops.h: Don't include qemu-common.h bitmap.h: Don't in

[Qemu-devel] [PATCH 1/3] tests: Add missing include to test-bitops.c

2014-09-26 Thread Eduardo Habkost
The test code needs osdep.h for the ARRAY_SIZE macro. Signed-off-by: Eduardo Habkost --- tests/test-bitops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-bitops.c b/tests/test-bitops.c index 8238eb5..47b5d3e 100644 --- a/tests/test-bitops.c +++ b/tests/test-bitops.c @@ -8,6

[Qemu-devel] [PATCH 3/3] bitmap.h: Don't include qemu-common.h

2014-09-26 Thread Eduardo Habkost
This will avoid unexpected circular header dependencies in the future. Signed-off-by: Eduardo Habkost --- include/qemu/bitmap.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index 1babd5d..8c50d70 100644 --- a/include/qemu

[Qemu-devel] [PATCH 2/3] bitops.h: Don't include qemu-common.h

2014-09-26 Thread Eduardo Habkost
This removes the following circular dependency: bitops.h -> qemu-common.h -> target-i386/cpu.h -> target-i386/cpu-qom.h -> qom/cpu.h -> qdev-core.h -> bitmap.h -> bitops.h. Signed-off-by: Eduardo Habkost --- include/qemu/bitops.h | 4 +++- 1 file changed, 3 insertions(+)

[Qemu-devel] [PATCH v3 00/17] QOMify accelerator code

2014-09-26 Thread Eduardo Habkost
and KVM-specific changes, by now (they will be submitted later). * Introduce ACCEL_CLASS_NAME(s) macro. Cc: Michael Mueller Cc: Christian Borntraeger Cc: Alexander Graf Cc: "Jason J. Herne" Cc: Paolo Bonzini Cc: Andreas Färber Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin" Ed

[Qemu-devel] [PATCH v3 02/17] accel: Move accel code to accel.c

2014-09-26 Thread Eduardo Habkost
Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: Suggested-by: Paolo Bonzini : * Rename hw/core/accel.c -> accel.c, * Rename include/hw/accel.h -> include/sysemu/accel.h --- Makefile.objs | 1 + accel.c

[Qemu-devel] [PATCH v3 03/17] accel: Create AccelType typedef

2014-09-26 Thread Eduardo Habkost
Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel.c b/accel.c index 9424796..3cefd74 100644 --- a/accel.c +++ b/accel.c @@ -40,13 +40,15 @@ static int tcg_init(MachineClass *mc) return 0

[Qemu-devel] [PATCH v3 05/17] accel: Move accel name lookup to separate function

2014-09-26 Thread Eduardo Habkost
Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 57 + 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/accel.c b/accel.c index fc8c551..c752fcc 100644 --- a/accel.c +++ b/accel.c @@ -55,11 +55,24

[Qemu-devel] [PATCH v3 01/17] vl.c: Small coding style fix

2014-09-26 Thread Eduardo Habkost
Just to make checkpatch.pl happy when moving the code. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index dbdca59..ce606a6 100644 --- a/vl.c +++ b/vl.c @@ -2715,7 +2715,7 @@ static int

[Qemu-devel] [PATCH v3 04/17] accel: Simplify configure_accelerator() using AccelType *acc variable

2014-09-26 Thread Eduardo Habkost
Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/accel.c b/accel.c index 3cefd74..fc8c551 100644 --- a/accel.c +++ b/accel.c @@ -62,6 +62,7 @@ int configure_accelerator(MachineClass *mc

[Qemu-devel] [PATCH v3 14/17] accel: Rename 'init' method to 'init_machine'

2014-09-26 Thread Eduardo Habkost
e, or that need data from MachineClass or MachineState. To clarify the difference between those two steps, rename init() to init_machine(). Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Clarify reasoning for the method rename on commit message. --- accel.c| 8 i

[Qemu-devel] [PATCH v3 06/17] accel: Use QOM classes for accel types

2014-09-26 Thread Eduardo Habkost
Instead of having a static AccelType array, register a class for each accelerator type, and use class name lookup to find accelerator information. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c| 117

[Qemu-devel] [PATCH v3 08/17] accel: Report unknown accelerator as "not found" instead of "does not exist"

2014-09-26 Thread Eduardo Habkost
As the accelerator classes won't be registered anymore if they are not enabled at compile time, saying "does not exist" may be misleading, as the accelerator may be simply disabled. Change the wording to just say "not found". Suggested-by: Paolo Bonzini Signe

[Qemu-devel] [PATCH v3 07/17] accel: Make AccelClass.available() optional

2014-09-26 Thread Eduardo Habkost
When we move accel classes outside accel.c, the available() function won't be necessary anymore, because the classes will be registered only if the accelerator code is really enabled at build time. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 2 +- 1 file chang

[Qemu-devel] [PATCH v3 15/17] accel: Pass MachineState object to accel init functions

2014-09-26 Thread Eduardo Habkost
: Eduardo Habkost --- accel.c | 11 ++- include/qemu/typedefs.h | 1 + include/sysemu/accel.h | 4 ++-- kvm-all.c | 3 ++- qtest.c | 2 +- vl.c| 2 +- xen-common.c| 2 +- 7 files changed, 14 insertions(+), 11

[Qemu-devel] [PATCH v3 09/17] accel: Move KVM accel registration to kvm-all.c

2014-09-26 Thread Eduardo Habkost
set AccelClass.available anymore. kvm_enabled() is not being completely removed yet only because qmp_query_kvm() still uses it. This also allows us to make kvm_init() static. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 18 -- include/sysemu

[Qemu-devel] [PATCH v3 10/17] accel: Move Xen registration code to xen-common.c

2014-09-26 Thread Eduardo Habkost
set AccelClass.available anymore. xen_enabled() is not being removed yet, but only because vl.c is still using it. This also allows us to make xen_init() static. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 18 -- include/hw/xen/xen.h | 1 -

[Qemu-devel] [PATCH v3 12/17] accel: Remove tcg_available() function

2014-09-26 Thread Eduardo Habkost
As the function always return 1, it is not needed anymore. Signed-off-by: Eduardo Habkost Reviewed-by: Paolo Bonzini --- accel.c| 1 - arch_init.c| 5 - include/sysemu/arch_init.h | 1 - 3 files changed, 7 deletions(-) diff --git a/accel.c b/accel.c

[Qemu-devel] [PATCH v3 16/17] accel: Create accel object when initializing machine

2014-09-26 Thread Eduardo Habkost
Create an actual TYPE_ACCEL object when initializing a machine. This will allow accelerator classes to implement some initialization on instance_init, and to save state on the TYPE_ACCEL object. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Squashed &qu

[Qemu-devel] [PATCH v3 11/17] accel: Move qtest accel registration to qtest.c

2014-09-26 Thread Eduardo Habkost
As qtest_availble() returns 1 only when CONFIG_POSIX is set, keep setting AccelClass.available to keep current behavior (this is different from what we did for KVM and Xen). This also allows us to make qtest_init_accel() static. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost

[Qemu-devel] [PATCH v3 17/17] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct

2014-09-26 Thread Eduardo Habkost
Now that we create an accel object before calling machine_init, we can simply use the accel object to save all KVMState data, instead of allocationg KVMState manually. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- kvm-all.c | 13 + 1 file changed, 9 insertions(+), 4

[Qemu-devel] [PATCH v3 13/17] accel: Move accel init/allowed code to separate function

2014-09-26 Thread Eduardo Habkost
Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- accel.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/accel.c b/accel.c index 0f3fcee..9241967 100644 --- a/accel.c +++ b/accel.c @@ -57,6 +57,17 @@ static AccelClass *accel_find(const char

[Qemu-devel] [PATCH] smbios: Fix assertion on socket count calculation

2014-09-29 Thread Eduardo Habkost
ly be moved to the main SMP topology configuration code. But while we don't move the code, at least make it correct by rounding up the division. Cc: Gabriel Somlo Cc: qemu-sta...@nongnu.org Signed-off-by: Eduardo Habkost --- hw/i386/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[Qemu-devel] [PATCH v2 0/7] Target-specific unit test support, add unit tests for target-i386/cpu.c code

2014-09-30 Thread Eduardo Habkost
t of test binary much simpler, now that cpus.o was removed. Eduardo Habkost (7): tests: Move fake yield_until_fd_readable() to coroutine-stub.c tests: Support target-specific unit tests tests: Make test-x86-cpuid target-specific tests: Add unit test for X86CPU code target-i386: Isolate e

[Qemu-devel] [PATCH v2 2/7] tests: Support target-specific unit tests

2014-09-30 Thread Eduardo Habkost
unit tests, on the other hand, may apply to any target (e.g. they may test *-softmmu and/or *-user code). To clarify this, $(TARGETS) was renamed to $(QTEST_ARCHES). Signed-off-by: Eduardo Habkost --- tests/Makefile | 31 +++ 1 file changed, 23 insertions(+), 8

[Qemu-devel] [PATCH v2 1/7] tests: Move fake yield_until_fd_readable() to coroutine-stub.c

2014-09-30 Thread Eduardo Habkost
Other test code will use the function. Signed-off-by: Eduardo Habkost --- tests/Makefile | 1 + tests/coroutine-stub.c | 13 + tests/test-vmstate.c | 11 --- 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 tests/coroutine-stub.c diff --git

[Qemu-devel] [PATCH v2 6/7] tests: test-x86-cpu: Add TCG feature bit initialization test

2014-09-30 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- tests/test-x86-cpu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/test-x86-cpu.c b/tests/test-x86-cpu.c index 9227e20..e8e9a74 100644 --- a/tests/test-x86-cpu.c +++ b/tests/test-x86-cpu.c @@ -30,6 +30,30 @@ static void

[Qemu-devel] [PATCH v2 7/7] tests: test-x86-cpu: Add KVM feature bit initialization test

2014-09-30 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- tests/test-x86-cpu.c | 28 1 file changed, 28 insertions(+) diff --git a/tests/test-x86-cpu.c b/tests/test-x86-cpu.c index e8e9a74..afd5088 100644 --- a/tests/test-x86-cpu.c +++ b/tests/test-x86-cpu.c @@ -54,6 +54,33 @@ static void

[Qemu-devel] [PATCH v2 3/7] tests: Make test-x86-cpuid target-specific

2014-09-30 Thread Eduardo Habkost
Instead of using a test-specific hack to add -I$(SRC_PATH)/target-i386, add test-x86-cpuid to $(test-obj-x86_64-softmmu-y). Signed-off-by: Eduardo Habkost --- tests/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index ea17838

[Qemu-devel] [PATCH v2 5/7] target-i386: Isolate enabled-by-default features to a separate array

2014-09-30 Thread Eduardo Habkost
This will make it easier to write unit tests for the feature initialization logic. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index e7bf9de..b1eb0cb 100644 --- a

[Qemu-devel] [PATCH v2 4/7] tests: Add unit test for X86CPU code

2014-09-30 Thread Eduardo Habkost
tests/x86-stub.c. Note: I couldn't add dependencies that ensure the target-specific object files are compiled on demand when building the test binary, but "make check" already requires "make" to be run first because of the qtest test cases, so I assume this is OK. Signe

Re: [Qemu-devel] [PATCH v2 1/7] tests: Move fake yield_until_fd_readable() to coroutine-stub.c

2014-10-01 Thread Eduardo Habkost
On Wed, Oct 01, 2014 at 12:17:50AM +0200, Paolo Bonzini wrote: > Il 30/09/2014 20:26, Eduardo Habkost ha scritto: > > Other test code will use the function. > > > > Signed-off-by: Eduardo Habkost > > --- > > tests/Makefile | 1 + > > tests/corouti

Re: [Qemu-devel] [PATCH v2 4/7] tests: Add unit test for X86CPU code

2014-10-01 Thread Eduardo Habkost
On Wed, Oct 01, 2014 at 12:20:18AM +0200, Paolo Bonzini wrote: > Il 30/09/2014 20:26, Eduardo Habkost ha scritto: > > Reasoning for each object file included in the test binary: > > * qom/cpu.o - for TYPE_CPU. Dependencies: > >* qom/qom-qobject.o > > * q

[Qemu-devel] [PATCH] qemu-file: Add copyright header to qemu-file.c

2014-10-01 Thread Eduardo Habkost
ilbert Cc: Alexey Kardashevskiy Cc: Markus Armbruster Cc: Juan Quintela Signed-off-by: Eduardo Habkost --- qemu-file.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/qemu-file.c b/qemu-file.c index a8e3912..bd5d4af 100644 --- a/qemu-file.c +++ b/qemu-file.c @@

[Qemu-devel] [PATCH 2/4] qemu-file: Use qemu_file_is_writable() on stdio_fclose()

2014-10-01 Thread Eduardo Habkost
Use the existing function which checks if writev_buffer() or put_buffer() are set, instead of duplicating it. Signed-off-by: Eduardo Habkost --- qemu-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-file.c b/qemu-file.c index 6c8a6c9..482bda6 100644 --- a/qemu

[Qemu-devel] [PATCH 4/4] qemu-file: Move stdio implementation to qemu-file-stdio.c

2014-10-01 Thread Eduardo Habkost
Markus, Juan, and myself. So, I am using the copyright and license header from savevm.c, but CCing Juan and Markus so they can review the copyright/license header. Cc: Markus Armbruster Cc: Juan Quintela Signed-off-by: Eduardo Habkost --- Makefile.objs | 2 +- qemu-file-stdio.c | 194

[Qemu-devel] [PATCH 0/4] qemu-file: Move QEMUFileOps implementations to separate files

2014-10-01 Thread Eduardo Habkost
With this, code that uses symbols from qemu-file.c don't need to bring extra dependencies because of the actual QEMUFile operation implementations. Eduardo Habkost (4): qemu-file: Make qemu_file_is_writable() non-static qemu-file: Use qemu_file_is_writable() on stdio_fclose() qemu

[Qemu-devel] [PATCH 1/4] qemu-file: Make qemu_file_is_writable() non-static

2014-10-01 Thread Eduardo Habkost
The QEMUFileStdio code will use qemu_file_is_writable() and will be moved to a separate file. Signed-off-by: Eduardo Habkost --- include/migration/qemu-file.h | 1 + qemu-file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/migration/qemu-file.h

[Qemu-devel] [PATCH 3/4] qemu-file: Move unix and socket implementations to qemu-file-unix.c

2014-10-01 Thread Eduardo Habkost
license header from savevm.c for the new file. Signed-off-by: Eduardo Habkost --- Makefile.objs| 2 +- qemu-file-unix.c | 223 +++ qemu-file.c | 195 tests/Makefile | 2 +- 4 files

Re: [Qemu-devel] [PATCH 0/4] qemu-file: Move QEMUFileOps implementations to separate files

2014-10-02 Thread Eduardo Habkost
On Thu, Oct 02, 2014 at 08:49:12AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > With this, code that uses symbols from qemu-file.c don't need to bring extra > > dependencies because of the actual QEMUFile operation implementations. > > Eac

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

2014-10-03 Thread Eduardo Habkost
e need CPU models that work without always 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 enab

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

2014-10-03 Thread Eduardo Habkost
g the feature may still be enabled by default in some CPU models). Signed-off-by: Eduardo Habkost --- 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/pc_piix.c b/hw

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

2014-10-03 Thread Eduardo Habkost
libvirt) 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 Cc: Paolo Bonzini Cc: k...@vger.kernel.org Eduardo Habkost (6): pc: Create pc_compat_2_1() functions target-i386:

[Qemu-devel] [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 Signed-off-by: Eduardo Habkost --- 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/pc_piix.c b/hw/i386/pc_piix.c index 1d5d57e

[Qemu-devel] [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 --- 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 103d756..0a4f4d3

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

2014-10-03 Thread Eduardo Habkost
x27;t need machine-type compat code because it is currently impossible to run a KVM VM with the ACPI flag set. Signed-off-by: Eduardo Habkost --- 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 --- a/target-

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

2014-10-03 Thread Eduardo Habkost
ed machine-type compat code, as people may be running the older machine-types on hosts that had VMX nesting enabled. Signed-off-by: Eduardo Habkost --- 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 a/hw

Re: [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386

2013-04-09 Thread Eduardo Habkost
On Tue, Apr 09, 2013 at 10:19:11PM +0200, Igor Mammedov wrote: > On Fri, 5 Apr 2013 14:10:54 -0300 > Eduardo Habkost wrote: > > > On Fri, Apr 05, 2013 at 04:37:16PM +0200, Igor Mammedov wrote: > > [...] > > > diff --git a/qapi-schema.json b/qapi-schema.json >

Re: [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386

2013-04-11 Thread Eduardo Habkost
On Tue, Apr 09, 2013 at 11:05:26PM +0200, Igor Mammedov wrote: > On Tue, 9 Apr 2013 17:46:21 -0300 > Eduardo Habkost wrote: > > > On Tue, Apr 09, 2013 at 10:19:11PM +0200, Igor Mammedov wrote: > > > On Fri, 5 Apr 2013 14:10:54 -0300 > > > Eduardo Habkost wro

Re: [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386

2013-04-11 Thread Eduardo Habkost
On Thu, Apr 11, 2013 at 05:17:29PM +0200, Igor Mammedov wrote: [...] > > > > Now, my question is: suppose a caller starts QEMU as: > > > > $ qemu -smp 18,cores=3,threads=3,maxcpus=36 \ > > -numa node,cpus=0-8 -numa node,cpus=9-17 \ > > -numa node,cpus=18-26 -numa node,cpus=27-3

Re: [Qemu-devel] [PATCH 01/19] target-i386: split out CPU creation and features parsing into cpu_x86_create()

2013-04-11 Thread Eduardo Habkost
y with the code that uses cpu_init() > and doesn't need to modify CPU properties. > > Signed-off-by: Igor Mammedov Nice, much simpler to review than v1. :-) Reviewed-by: Eduardo Habkost > --- > v2: > * use error_propagate() to rise error up stack > --- > target-

Re: [Qemu-devel] [PATCH 18/19] target-i386: expose all possible CPUs as /machine/icc-bridge/cpu[0..N] links

2013-04-11 Thread Eduardo Habkost
On Thu, Apr 11, 2013 at 04:51:57PM +0200, Igor Mammedov wrote: > ... and leave links for not present CPUs empty. > > It will allow users to query for possible APIC IDs and use them > with cpu-add QMP command. > > Signed-off-by: Igor Mammedov I don't see anything wrong with having icc-bridge lin

Re: [Qemu-devel] [PATCH 03/19] cpu: make kvm-stub.o a part of CPU library

2013-04-11 Thread Eduardo Habkost
On Thu, Apr 11, 2013 at 04:51:42PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > Makefile.target | 13 +++-- > include/hw/pci/msi.h | 2 ++ > include/sysemu/kvm.h | 4 ++-- > kvm-stub.c | 2 ++ > 4 files changed, 13 insertions(+), 8 deletions(-) > >

Re: [Qemu-devel] [PATCH 04/19] cpu: call cpu_synchronize_post_init() from CPUClass.realize() if hotplugged

2013-04-11 Thread Eduardo Habkost
On Thu, Apr 11, 2013 at 04:51:43PM +0200, Igor Mammedov wrote: > ... to synchronize CPU state to KVM > > Signed-off-by: Igor Mammedov > --- > v2: > * linking kvm-stub.o to *-user target moved in separate patch > --- > include/sysemu/kvm.h | 18 ++ > kvm-all.c| 1 +

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