[Qemu-devel] [PATCH 08/12] qdev: move reset register/unregister code to qdev-system.c

2012-10-16 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 ehabk...@redhat.com --- Changes v1 - v2: - Add GCC_WEAK_DECL to function declarations --- hw/qdev-core.c | 16 +++- hw/qdev-core.h | 3 +++ hw/qdev

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

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: Igor Mammedov imamm...@redhat.com writes: From: Eduardo Habkost ehabk...@redhat.com This change should help on two things: - Allowing DeviceState to be used by *-user; - Writing qdev unit tests without pulling too many

Re: [Qemu-devel] [PATCH 07/12] qdev-core: isolate reset register/unregister code

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 01:08:23PM -0500, Anthony Liguori wrote: Eduardo Habkost ehabk...@redhat.com writes: 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 ehabk...@redhat.com --- hw

Re: [Qemu-devel] [PATCH] qemu: enable PV EOI for qemu 1.3

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 09:40:59PM +0200, Michael S. Tsirkin wrote: Enable KVM PV EOI by default. You can still disable it with -kvm_pv_eoi cpu flag. To avoid breaking cross-version migration, enable only for qemu 1.3 or newer machine type. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [Qemu-devel] [PATCH 1/6] qdev: rework device properties.

2012-10-17 Thread Eduardo Habkost
On Wed, Jul 15, 2009 at 01:43:31PM +0200, Gerd Hoffmann wrote: [...] diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c new file mode 100644 index 000..8b0d0ff --- /dev/null +++ b/hw/qdev-properties.c @@ -0,0 +1,246 @@ Gerd, could you clarify what's the copyright/license of this

Re: [Qemu-devel] [PATCH] qemu: enable PV EOI for qemu 1.3

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 10:48:58PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 17, 2012 at 05:03:02PM -0300, Eduardo Habkost wrote: On Wed, Oct 17, 2012 at 09:40:59PM +0200, Michael S. Tsirkin wrote: Enable KVM PV EOI by default. You can still disable it with -kvm_pv_eoi cpu flag

Re: [Qemu-devel] [PATCH 1/6] qdev: rework device properties.

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 11:05:22PM +0200, Stefan Weil wrote: On Wed, Jul 15, 2009 at 01:43:31PM +0200, Gerd Hoffmann wrote: [...] diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c new file mode 100644 index 000..8b0d0ff --- /dev/null +++ b/hw/qdev-properties.c @@ -0,0

Re: [Qemu-devel] [PATCH] i386/cpu: name new CPUID bits

2012-10-18 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 11:17:26PM +0200, Andre Przywara wrote: Update QEMU's knowledge of CPUID bit names. This allows to enable/disable those new features on QEMU's command line when using KVM and prepares future feature enablement in QEMU. This adds F16C, RDRAND, LWP, TBM, TopoExt,

Re: [Qemu-devel] [PATCH] i386/cpu: name new CPUID bits

2012-10-18 Thread Eduardo Habkost
On Fri, Oct 19, 2012 at 01:34:19AM +0200, Andre Przywara wrote: On 10/18/12 18:33, Eduardo Habkost wrote: On Wed, Oct 17, 2012 at 11:17:26PM +0200, Andre Przywara wrote: Update QEMU's knowledge of CPUID bit names. This allows to enable/disable those new features on QEMU's command line when

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

2012-10-19 Thread Eduardo Habkost
On Fri, Oct 19, 2012 at 09:31:00AM +0200, Markus Armbruster wrote: Eduardo Habkost ehabk...@redhat.com writes: On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: [...] I don't really understand the split here and the 'system' suffix really doesn't explain it for me. Could

Re: [Qemu-devel] [PATCH 11/12] include core qdev code into *-user, too

2012-10-19 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 08:21:17PM +0100, Peter Maydell wrote: On 17 October 2012 19:11, Anthony Liguori anth...@codemonkey.ws wrote: It's dangerously close to bike-shedding, but i don't think qdev belongs in qom/. It's not core infrastructure. It's the device base class and belongs IMHO

Re: [Qemu-devel] [PATCHv3] qemu: enable PV EOI for qemu 1.3

2012-10-22 Thread Eduardo Habkost
On Mon, Oct 22, 2012 at 03:12:00PM +0200, Michael S. Tsirkin wrote: On Mon, Oct 22, 2012 at 12:06:42PM +0200, Andreas Färber wrote: Am 18.10.2012 17:01, schrieb Michael S. Tsirkin: Enable KVM PV EOI by default. You can still disable it with -kvm_pv_eoi cpu flag. To avoid breaking

Re: [Qemu-devel] [PATCHv3] qemu: enable PV EOI for qemu 1.3

2012-10-22 Thread Eduardo Habkost
m...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com --- Changes from v2: Address comments by Andreas: whitespace fixes and moving function around Changes from v1: Address comments by Eduardo: use include instead of duplicate definition

Re: [Qemu-devel] [PATCH 11/12] include core qdev code into *-user, too

2012-10-22 Thread Eduardo Habkost
On Mon, Oct 22, 2012 at 02:36:01PM +0200, Igor Mammedov wrote: On Tue, 16 Oct 2012 16:08:42 -0300 Eduardo Habkost ehabk...@redhat.com wrote: [...] diff --git a/qom/qdev-properties.c b/qom/qdev-properties.c new file mode 100644 index 000..2e82cb9 --- /dev/null +++ b/qom/qdev

Re: [Qemu-devel] [PATCH v2] target-i386: use static properties to list CPUID features

2012-10-23 Thread Eduardo Habkost
On Tue, Oct 23, 2012 at 03:26:40PM +0200, Igor Mammedov wrote: convert x86_cpu_list() to use QDEV_FIND_PROP_FROM_BIT() for getting CPUID feature name. In addition since x86_cpu_list() was the last user of *feature_name arrays, clean them up. Signed-off-by: Igor Mammedov imamm...@redhat.com

Re: [Qemu-devel] [PATCH 07/12] qdev-core: isolate reset register/unregister code

2012-10-23 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 01:08:23PM -0500, Anthony Liguori wrote: Eduardo Habkost ehabk...@redhat.com writes: 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 ehabk...@redhat.com --- hw

Re: [Qemu-devel] [PATCH 07/12] qdev-core: isolate reset register/unregister code

2012-10-23 Thread Eduardo Habkost
On Tue, Oct 23, 2012 at 12:56:18PM -0200, Eduardo Habkost wrote: On Wed, Oct 17, 2012 at 01:08:23PM -0500, Anthony Liguori wrote: Eduardo Habkost ehabk...@redhat.com writes: The reset register/unregister code is specific to qemu-system-*, so isolate it so it can be moved to qdev

[Qemu-devel] [PATCH 03/24] qemu-common.h: comment about usage rules

2012-10-23 Thread Eduardo Habkost
. This simply adds a comment documenting the rules about qemu-common.h, hoping that people will see it before including qemu-common.h from other header files, and before adding more declarations to qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- qemu-common.h | 11

[Qemu-devel] [PATCH 09/24] ui/vnc-pallete.c: include headers it needs

2012-10-23 Thread Eduardo Habkost
Include: - glib.h for g_malloc0() - string.h for memset() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com

[Qemu-devel] [PATCH 07/24] qemu-fsdev-dummy.c: include module.h

2012-10-23 Thread Eduardo Habkost
module.h is where machine_init() is defined, but qemu-fsdev-dummy.c doesn't include it. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ehabk

[Qemu-devel] [PATCH 17/24] qdev-properties.c: add copyright/license information

2012-10-23 Thread Eduardo Habkost
of the list. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- The only reason I am doing this is because: - I am going to mvoe some of the qdev-properties.c file to another file - I need to add a copyright/license header to the new file. See http://article.gmane.org

[Qemu-devel] [PATCH 14/24] sysemu.h: include qemu-types.h instead of qemu-common.h

2012-10-23 Thread Eduardo Habkost
It just needs the Monitor and DeviceState typedefs, so it doesn't need all of qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysemu.h b/sysemu.h index 0c39a3a..2b103a5 100644 --- a/sysemu.h +++ b

[Qemu-devel] [PATCH 22/24] qdev-properties.c: separate core from the code used only by qemu-system-*

2012-10-23 Thread Eduardo Habkost
. The copyright/license header for the new file is directly copied from qdev-properties.c. Signed-off-by: Eduardo Habkost ehabk...@redhat.com [imammedo: keep qdev_get_child_bus() in hw/qdev.c] [imammedo: put qdev_set_nic_properties() in hw/qdev-properties-system.c] Signed-off-by: Igor Mammedov imamm

[Qemu-devel] [PATCH 08/24] vnc-palette.h: include stdbool.h

2012-10-23 Thread Eduardo Habkost
stdbool.h is needed for the 'bool' type, used in the header. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- ui/vnc

[Qemu-devel] [PATCH 11/24] qapi/qmp-registry.c: include headers it needs

2012-10-23 Thread Eduardo Habkost
Include: - glib.h for g_malloc0() - string.h for strcmp() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com

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

2012-10-23 Thread Eduardo Habkost
qdev_exists() declaration] [ehabkost: keep using 'QemuOpts' instead of 'struct QemuOpts', as qdev-core.h includes qemu-option.h] Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Yes, there is changelog data before the --- mark, but I believe that in this case they are important to indicate

[Qemu-devel] [PATCH 18/24] qdev: qdev_create(): use error_report() instead of hw_error()

2012-10-23 Thread Eduardo Habkost
cpus.o, and depends on the CPU list from exec.o). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/qdev.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 7ddcd24..2cc6434 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -109,10 +109,12

[Qemu-devel] [PATCH 12/24] qga/channel-posix.c: include headers it needs

2012-10-23 Thread Eduardo Habkost
-by: Eduardo Habkost ehabk...@redhat.com --- qga/channel-posix.c | 4 1 file changed, 4 insertions(+) diff --git a/qga/channel-posix.c b/qga/channel-posix.c index 57eea06..1539ed3 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -1,5 +1,9 @@ #include glib.h #include termios.h

[Qemu-devel] [PATCH 16/24] qapi-types.h: don't include qemu-common.h

2012-10-23 Thread Eduardo Habkost
From: Igor Mammedov imamm...@redhat.com needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov imamm...@redhat.com [ehabkost: include stdbool.h too] Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Yes, there is changelog data before

[Qemu-devel] [PATCH 02/24] user: rename qemu-types.h to qemu-user-types.h

2012-10-23 Thread Eduardo Habkost
The header file is specific for *-user, but I plan to introduce a more generic qemu-types.h file, so I'm renaming it. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: Blue Swirl blauwir...@gmail.com Cc: Riku Voipio riku.voi...@iki.fi --- bsd-user/qemu.h | 2 +- cpu

[Qemu-devel] [PATCH 19/24] qdev: move reset handler list from vl.c to qdev.c

2012-10-23 Thread Eduardo Habkost
files that use qemu_register_reset(). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/hw.h | 6 +- hw/qdev-reset.h | 11 +++ hw/qdev.c | 41 + hw/qdev.h | 1 + sysemu.h| 1 - vl.c| 40

[Qemu-devel] [PATCH 24/24] qom: make CPU a child of DeviceState

2012-10-23 Thread Eduardo Habkost
From: Igor Mammedov imamm...@redhat.com Signed-off-by: Igor Mammedov imamm...@redhat.com [ehabkost: change CPU type declaration to hae TYPE_DEVICE as parent] Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Yes, there is changelog data before the --- mark, but I believe that in this case

[Qemu-devel] [PATCH 21/24] qdev: add sysbus_get_default() GCC_WEAK stub

2012-10-23 Thread Eduardo Habkost
This version will be used on cases where sysbus.c is not compiled in (e.g. *-user). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/qdev-core.h | 2 +- hw/qdev.c | 12 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/qdev-core.h b/hw/qdev-core.h

[Qemu-devel] [PATCH 10/24] qemu-config.h: include headers it needs

2012-10-23 Thread Eduardo Habkost
Include: - stdio.h for FILE - qemu-option.h for QemuOptsList Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ehabk

[Qemu-devel] [PATCH 23/24] include qdev code into *-user, too

2012-10-23 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 ehabk...@redhat.com --- Changes v1 - v2: - Keep files on the hw/ directory (it's simply easier to keep them there, as qdev.o depends

[Qemu-devel] [PATCH 13/24] create qemu-types.h for struct typedefs

2012-10-23 Thread Eduardo Habkost
to include qdev-core.h only because of DeviceState and other typedefs. This will help us remove qemu-common.h dependencies from some headers later. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/qdev-core.h | 11 +-- qemu-common.h | 53

[Qemu-devel] [PATCH 06/24] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-10-23 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost ehabk...@redhat.com -- Changes v1 - v2: - move qemu_open() qemu_close() to qemu-stdio.h, too --- qemu-common.h | 59 ++ qemu-stdio.h | 76

[Qemu-devel] [PATCH v5 00/24] CPU DeviceState, 5th try

2012-10-23 Thread Eduardo Habkost
it can be used in cpu.h Eduardo Habkost (20): user: move *-user/qemu-types.h to main directory user: rename qemu-types.h to qemu-user-types.h qemu-common.h: comment about usage rules move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h) qemu-fsdev-dummy.c: include

[Qemu-devel] [PATCH 15/24] qlist.h: do not include qemu-common.h

2012-10-23 Thread Eduardo Habkost
I don't know why it was including it, as I don't see any code that depends on anything from qemu-common.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- qlist.h | 1 - 1 file changed, 1 deletion(-) diff --git a/qlist.h b/qlist.h index ae776f9..7408947 100644 --- a/qlist.h +++ b/qlist.h

[Qemu-devel] [PATCH 20/24] qdev: add stub vmstate handling to qdev.c

2012-10-23 Thread Eduardo Habkost
Add GCC_WEAK vmstate symbols to qdev.c, so that qdev.o can be used without savevm.o (i.e. by *-user). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Originally submitted as: Subject: qdev-core: isolate vmstate handling into separate functions Changes v1 - v2: - Add GCC_WEAK_DECL

[Qemu-devel] [PATCH 01/24] user: move *-user/qemu-types.h to main directory

2012-10-23 Thread Eduardo Habkost
The bsd-user/qemu-types.h and linux-user/qemu-types.h files are almost the same, but linux-user have the additional definitions of tswapal(). This moves the linux-user file to the main directory, so the same file can be used by linux-user and bsd-user. Signed-off-by: Eduardo Habkost ehabk

[Qemu-devel] [PATCH 04/24] move qemu_irq typedef out of cpu-common.h

2012-10-23 Thread Eduardo Habkost
From: Igor Mammedov imamm...@redhat.com it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov imamm...@redhat.com [ehabkost: re-added the typedef to hw/irq.h after rebasing] Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes

Re: [Qemu-devel] [PATCH 0/7] ARM boards: don't prematurely explode QEMUMachineInitArgs

2012-10-24 Thread Eduardo Habkost
On Wed, Oct 24, 2012 at 10:42:55AM +0200, Markus Armbruster wrote: Peter Maydell peter.mayd...@linaro.org writes: A lot of the ARM board models follow the pattern of having a single common init function which is called with various parameters from the QEMUMachine init function for several

Re: [Qemu-devel] [PATCH 00/37 v5] target-i386: convert CPU features into properties

2012-10-24 Thread Eduardo Habkost
On Tue, Oct 23, 2012 at 03:56:52PM +0200, Igor Mammedov wrote: On Tue, 23 Oct 2012 09:32:53 -0400 Don Slutz d...@cloudswitch.com wrote: On 10/22/12 11:02, Igor Mammedov wrote: v5: - Use static properties instead of dynamic ones - Compile in KVM CPUID features only if

[Qemu-devel] [PATCH] target-i386: cpu: recover items 28-31 of ext2_feature_name

2012-10-24 Thread Eduardo Habkost
I removed a line by mistake on commit 3b671a40cab2404bc63e57db8cd3afa4ec70bfab, containing the flags lm/i64, 3dnow, and 3dnowext. This patch restores the removed line. Reported-by: Don Slutz d...@cloudswitch.com Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 1 + 1

Re: [Qemu-devel] [PATCH 36/37] target-i386: use static properties to list CPUID features

2012-10-24 Thread Eduardo Habkost
On Tue, Oct 23, 2012 at 01:23:43PM -0400, Don Slutz wrote: Turns out that patch #32 is the one that causes the command line: ./x86_64-softmmu/qemu-system-x86_64 -cpu

[Qemu-devel] [PATCH 05/27] kvm: create kvm_arch_vcpu_id() function

2012-10-24 Thread Eduardo Habkost
This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- kvm-all.c | 2 +- kvm.h | 3 +++ target-i386/kvm.c | 5 + target-ppc/kvm.c | 5 + target-s390x/kvm.c | 5

[Qemu-devel] [PATCH 01/27] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-10-24 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost ehabk...@redhat.com -- Changes v1 - v2: - move qemu_open() qemu_close() to qemu-stdio.h, too --- qemu-common.h | 59 ++ qemu-stdio.h | 76

[Qemu-devel] [PATCH 23/27] pc: set fw_cfg data based on APIC ID calculation

2012-10-24 Thread Eduardo Habkost
This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes v1 - v2: - Get PC object

[Qemu-devel] [PATCH 12/27] pc: add PCInitArgs parameter to pc_cpus_init()

2012-10-24 Thread Eduardo Habkost
This will make the code simpler when the CPU initialization code start using additional initialization parameters. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 8 hw/pc.h | 2 +- hw/pc_piix.c | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH 21/27] fw_cfg: remove FW_CFG_MAX_CPUS from fw_cfg_init()

2012-10-24 Thread Eduardo Habkost
PC will not use max_cpus for that field, so move it outside the common code so it can use a different value on PC. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/fw_cfg.c | 1 - hw/pc.c | 2 +- hw/ppc_newworld.c | 1 + hw/ppc_oldworld.c | 1 + hw/sun4m.c| 3

[Qemu-devel] [PATCH 27/27] pc: generate APIC IDs according to CPU topology

2012-10-24 Thread Eduardo Habkost
This keeps compatibility on machine-types pc-1.2 and older, and prints a warning in case the requested configuration won't get the correct topology. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes v1 - v2: - Move code to cpu.c - keep using cpu_index on *-user - Use

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

2012-10-24 Thread Eduardo Habkost
Has anybody looked at this series? Avi, Marcelo? On Thu, Oct 04, 2012 at 05:48:52PM -0300, Eduardo Habkost wrote: Most of this series are just cleanups that will help when making -cpu check/enforce work properly, with some fixes. In addition to code movements, the main changes

[Qemu-devel] [PATCH 15/27] pc: rename bochs_bios_init() to pc_bios_init()

2012-10-24 Thread Eduardo Habkost
This code is not specific to the Bochs BIOS, so rename it. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4e971c8..c38d8b2 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -570,7 +570,7 @@ int

[Qemu-devel] [PATCH 18/27] pc: isolate the code that create CPUs

2012-10-24 Thread Eduardo Habkost
The code will get more complex, so put it outside the for loop, into a separate function. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 0e01003..85eab04 100644 --- a/hw/pc.c

[Qemu-devel] [PATCH 07/27] pc: pc_init1(): always use rom_memory on pc_memory_init() call

2012-10-24 Thread Eduardo Habkost
When pci_enabled is false, rom_memory is already pointing to system_memory, so there's no need to check pci_enabled again when calling pc_memory_init(). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw

[Qemu-devel] [PATCH 10/27] pc: create PCInitArgs struct

2012-10-24 Thread Eduardo Habkost
Instead of changing pc_init1() arguments every time some additional machine-type-specific behavior has to be introduced, create a struct that will carry all the information needed by the PC initialization functions. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.h | 8

[Qemu-devel] [PATCH 19/27] cpu_x86_init: check for x86_cpu_realize() errors

2012-10-24 Thread Eduardo Habkost
If x86_cpu_realize() set any errors, print an error message and return NULL. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/helper.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index c5d42c5..1e5f61f

[Qemu-devel] [PATCH 17/27] xen_machine_pv: use cpu_init() instead of cpu_x86_init()

2012-10-24 Thread Eduardo Habkost
creation and the x86_cpu_realize() call. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/xen_machine_pv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 4264703..95833f4 100644 --- a/hw/xen_machine_pv.c +++ b/hw

[Qemu-devel] [PATCH 13/27] pc: pass PCInitArgs struct to pc_memory_init()

2012-10-24 Thread Eduardo Habkost
Instead of having a large list of arguments, just pass the PCInitArgs struct to pc_memory_init(). This is being done mainly to facilitate the addition of an argument to be used by bochs_bios_init() (enabling compatibility mode for APIC ID generation). Signed-off-by: Eduardo Habkost ehabk

[Qemu-devel] [PATCH 09/27] pc: pc_init1(): get QEMUMachineInitArgs argument

2012-10-24 Thread Eduardo Habkost
Instead of passing each QEMUMachineInitArgs field individually, just pass the whole QEMUMachineInitArgs object to pc_init1(). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc_piix.c | 47 --- 1 file changed, 12 insertions(+), 35 deletions

[Qemu-devel] [PATCH 04/27] target-i386: initialize APIC at CPU level

2012-10-24 Thread Eduardo Habkost
From: Igor Mammedov imamm...@redhat.com (L)APIC is a part of cpu [1] so move APIC initialization inside of x86_cpu object. Since cpu_model and override flags currently specify whether APIC should be created or not, APIC creationinitialization is moved into x86_cpu_apic_init() which is called from

[Qemu-devel] [PATCH 24/27] tests: support target-specific unit tests

2012-10-24 Thread Eduardo Habkost
To make unit tests that depend on target-specific files, use check-unit-arch-y and test-obj-arch-y. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- tests/Makefile | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index

[Qemu-devel] [PATCH 22/27] pc: set CPU APIC ID explicitly

2012-10-24 Thread Eduardo Habkost
- kvm_arch_init_vcpu(), that's called by kvm_init_vcpu() So it's safe to change it before x86_cpu_realize() is called. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- This is based on the patch that I have originally suybmitted as: Subject: pc: create apic_id_for_cpu() function (v3) --- hw/pc.c | 22

[Qemu-devel] [PATCH 03/27] hw/apic.c: rename bit functions to not conflict with bitops.h

2012-10-24 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes v1 - v2: - Coding style change: break too-long line --- hw/apic.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 49f0015..1772f2c 100644 --- a/hw

[Qemu-devel] [PATCH 14/27] pc: use FWCfgState* instead of void* for fw_cfg data

2012-10-24 Thread Eduardo Habkost
I don't know why the code uses void* if the FWCfgState typedef is declared at the same header where fw_cfg_init() and other fw_cfg_*() functions are declared. This changes the code to use FWCfgState* instead of void* in the PC initialization code. Signed-off-by: Eduardo Habkost ehabk

[Qemu-devel] [PATCH 20/27] target-i386: do not call x86_cpu_realize() on cpu_x86_init()

2012-10-24 Thread Eduardo Habkost
advanced PC CPU initialization steps Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 12 +++- target-i386/cpu.h| 14 ++ target-i386/helper.c | 11 --- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/hw/pc.c b/hw/pc.c

[Qemu-devel] [PATCH 25/27] target-i386: topology APIC ID utility functions

2012-10-24 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: Blue Swirl blauwir...@gmail.com Changes v1 - v2: - Support 32-bit APIC IDs (in case x2APIC is going to be used) - Coding style changes - Use TARGET_I386_TOPOLOGY_H instead of __QEMU_X86_TOPOLOGY_H__ - Rename topo_make_apic_id

[Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3

2012-10-24 Thread Eduardo Habkost
This: - Renames the init function for pc-1.2 and lower to pc_init_pci_v1_2; - Creates a pc_init_pci_v1_3 function for pc-1.3. Right now both functions have exactly the same code, but the following patch will change pc_init_v1_2 to set compatibility PCInitArgs fields. Signed-off-by: Eduardo

[Qemu-devel] [PATCH 11/27] pc: add PC_DEFAULT_CPU_MODEL #define

2012-10-24 Thread Eduardo Habkost
Make the pc_cpus_init() code more clear, by removing an #ifdef from the middle of the code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 408823b..67fdbe2 100644 --- a/hw

[Qemu-devel] [PATCH 08/27] pc: pc_init1(): remove MemoryRegion arguments

2012-10-24 Thread Eduardo Habkost
All calls to pc_init1() pass the same expressions as arguments, so move the expressions inside pc_init1(). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc_piix.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index

[Qemu-devel] [PATCH 16/27] pc: pass PCInitArgs struct to pc_bios_init()

2012-10-24 Thread Eduardo Habkost
The argument will be used later, when enabling compatibility mode for the APIC ID generation code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- hw/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index c38d8b2..0e01003 100644 --- a/hw/pc.c

[Qemu-devel] [PATCH 06/27] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index

2012-10-24 Thread Eduardo Habkost
The CPU ID in KVM is supposed to be the APIC ID, so change the KVM_CREATE_VCPU call to match it. The current behavior didn't break anything yet because today the APIC ID is assumed to be == the CPU index, but this won't be true in the future. Signed-off-by: Eduardo Habkost ehabk...@redhat.com

[Qemu-devel] [PATCH 02/27] cpus.h: include qemu-stdio.h

2012-10-24 Thread Eduardo Habkost
Needed for the definition of fprint_function. This is not necessary right now, but it will be necessary if code that doesn't include cpu-common.h includes cpus.h. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- cpus.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpus.h b/cpus.h

[Qemu-devel] Subject: [PATCH 00/27] Fix APIC-ID-based CPU topology, take 3

2012-10-24 Thread Eduardo Habkost
://software.intel.com/en-us/articles/intel-64-architecture-processor-topolog y-enumeration/ This series is available on git, at: https://github.com/ehabkost/qemu-hacks/commits/apicid-topology-v3 Eduardo Habkost (26): move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h

[Qemu-devel] [QEMU PATCH 0/3] Fix -cpu host and enforce/check to use GET_SUPPORTED_CPUID

2012-10-24 Thread Eduardo Habkost
This depends on a previous series I have submitted: Subject: [QEMU PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes Message-Id: 1349383747-19383-1-git-send-email-ehabk...@redhat.com http://article.gmane.org/gmane.comp.emulators.kvm.devel/99375 Eduardo Habkost (3): target-i385

[Qemu-devel] [QEMU PATCH 1/3] target-i385: make cpu_x86_fill_host() void

2012-10-24 Thread Eduardo Habkost
The return value of that function is always 0, and is always ignored. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 38fca92..42171c9 100644 --- a/target

[Qemu-devel] [QEMU PATCH 2/3] target-i386: cpu: make -cpu host/check/enforce code KVM-specific

2012-10-24 Thread Eduardo Habkost
as such, and rename them to kvm_check_features_against_host() and kvm_cpu_fill_host(). Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 42171c9

[Qemu-devel] [QEMU PATCH 3/3] target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID

2012-10-24 Thread Eduardo Habkost
on the host CPU (e.g. x2apic); * check and enforce options were not detecting problems when the host CPU did support a feature, but the KVM kernel code didn't support it. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 25 +++-- 1 file changed, 15

Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add

2013-04-03 Thread Eduardo Habkost
On Wed, Apr 03, 2013 at 07:58:00PM +0200, Igor Mammedov wrote: snip +void do_cpu_hot_add(const int64_t id, Error **errp) +{ +pc_new_cpu(saved_cpu_model, id, errp); +} + Missing x86_cpu_apic_id_from_index(id)? There was(is?) opposition to using cpu_index to identify x86

Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add

2013-04-03 Thread Eduardo Habkost
On Wed, Apr 03, 2013 at 08:59:07PM +0200, Igor Mammedov wrote: On Wed, 3 Apr 2013 15:10:05 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Wed, Apr 03, 2013 at 07:58:00PM +0200, Igor Mammedov wrote: snip +void do_cpu_hot_add(const int64_t id, Error **errp

Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add

2013-04-03 Thread Eduardo Habkost
On Wed, Apr 03, 2013 at 10:09:25PM +0200, Igor Mammedov wrote: On Wed, 3 Apr 2013 16:27:11 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Wed, Apr 03, 2013 at 08:59:07PM +0200, Igor Mammedov wrote: On Wed, 3 Apr 2013 15:10:05 -0300 Eduardo Habkost ehabk...@redhat.com wrote

[Qemu-devel] [RFC 3/5] target-i386: Use FeatureWord loop on filter_features_for_kvm()

2013-04-04 Thread Eduardo Habkost
Instead of open-coding the filtering code for each feature word, change the existing code to use the feature_word_info array, that have exactly the same CPUID eax/ecx/register values for each feature word. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 24

[Qemu-devel] [RFC 5/5] target-i386: Add filtered-features property to X86CPU

2013-04-04 Thread Eduardo Habkost
item[7].cpuid-register: EDX item[7].cpuid-input-eax: 1 item[7].features: 0 Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 64e5570..0dceaf2

[Qemu-devel] [RFC 4/5] target-i386: Introduce X86CPU.filtered_features field

2013-04-04 Thread Eduardo Habkost
This field will contain the feature bits that were filtered out because of missing host support. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu-qom.h | 3 +++ target-i386/cpu.c | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target-i386

[Qemu-devel] [RFC 0/5] X86CPU feature-words filtered-features properties (v2)

2013-04-04 Thread Eduardo Habkost
].cpuid-register: EAX item[6].cpuid-input-eax: 1073741825 item[6].features: 0 item[7].cpuid-register: EDX item[7].cpuid-input-eax: 2147483658 item[7].features: 0 Eduardo Habkost (5): target-i386: Add ECX information to FeatureWordInfo target-i386: Add feature-words property target

[Qemu-devel] [RFC 1/5] target-i386: Add ECX information to FeatureWordInfo

2013-04-04 Thread Eduardo Habkost
FEAT_7_0_EBX uses ECX as input, so we have to take that into account when reporting feature word values. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[Qemu-devel] [RFC 2/5] target-i386: Add feature-words property

2013-04-04 Thread Eduardo Habkost
item[7].cpuid-register: EDX item[7].cpuid-input-eax: 1 item[7].features: 126614521 Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Changes v1 - v2: * Merge the non-qapi and qapi patches, to keep series simpler * Use the feature word array series as base, so we don't have to set

Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus

2013-04-05 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:37:10PM +0200, Igor Mammedov wrote: [...] void pc_cpus_init(const char *cpu_model) { int i; +X86CPU *cpu; Error *error = NULL; +SysBusDevice *ib; /* init CPUs */ if (cpu_model == NULL) { @@ -902,14 +907,22 @@ void

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

2013-04-05 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:37:16PM +0200, Igor Mammedov wrote: [...] diff --git a/qapi-schema.json b/qapi-schema.json index db542f6..a760ed5 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1387,6 +1387,17 @@ { 'command': 'cpu', 'data': {'index': 'int'} } ## +# @cpu-add +#

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

2013-04-05 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 02:10:54PM -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 index db542f6..a760ed5 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1387,6 +1387,17

Re: [Qemu-devel] [PATCH 02/22] target-i386: split APIC creation from initialization in x86_cpu_realizefn()

2013-04-08 Thread Eduardo Habkost
env-mp_state. So split APIC device creation from its initialization and realize APIC after CPU is created, when it's safe to call APIC's reset method. Signed-off-by: Igor Mammedov imamm...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com --- v2: * s/x86_cpu_apic_init

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

2013-04-08 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:36:55PM +0200, Igor Mammedov wrote: Move CPU creation and features parsing into a separate cpu_x86_create() function, so that board would be able to set board specific CPU properties before CPU is realized. Keep cpu_x86_init() for compatibility with the code that

Re: [Qemu-devel] [PATCH 04/22] cpu: Pass CPUState to *cpu_synchronize_post*()

2013-04-08 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:36:56PM +0200, Igor Mammedov wrote: ... so it could be called from without requiring CPUArchState Signed-off-by: Igor Mammedov imamm...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com --- cpus.c | 4 ++-- include/sysemu/kvm.h | 12

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

2013-04-08 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:36:57PM +0200, Igor Mammedov wrote: ... to synchronize CPU state to KVM * in addition link kvm-stub.o to *-user target and fix related compiling issues. Signed-off-by: Igor Mammedov imamm...@redhat.com --- Makefile.target | 6 ++

Re: [Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method

2013-04-08 Thread Eduardo Habkost
On Fri, Apr 05, 2013 at 04:36:58PM +0200, Igor Mammedov wrote: ... and call it if defined from CPUClass.realize() if CPU was hotplugged by default leave .resume() unset (i.e. NULL) and override it for softmmu in qemu_init_vcpu() if it's still unset. Signed-off-by: Igor Mammedov

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 ehabk...@redhat.com wrote: On Fri, Apr 05, 2013 at 04:37:16PM +0200, Igor Mammedov wrote: [...] diff --git a/qapi-schema.json b/qapi-schema.json index db542f6..a760ed5

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 ehabk...@redhat.com 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 ehabk...@redhat.com wrote

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

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
that uses cpu_init() and doesn't need to modify CPU properties. Signed-off-by: Igor Mammedov imamm...@redhat.com Nice, much simpler to review than v1. :-) Reviewed-by: Eduardo Habkost ehabk...@redhat.com --- v2: * use error_propagate() to rise error up stack --- target-i386/cpu.c | 18

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