Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-23 Thread Zhu Guihua
On 12/17/2015 05:58 AM, Igor Mammedov wrote: On Wed, 16 Dec 2015 16:46:37 +0100 Andreas Färber wrote: Am 10.12.2015 um 13:35 schrieb Igor Mammedov: wrt CLI can't we do something like this? -device some-cpu-model,socket=x[,core=y[,thread=z]] That's problematic and where

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-14 Thread Zhu Guihua
and allow individual targets to use its own way to build CPUs? For initial conversion of x86-cpus to device-add we could do pretty much the same like we do now, where cpu devices will appear under: /machine (pc-i440fx-2.5-machine) /unattached (container) /device[x] (qemu64-x86_64-cpu)

Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list during cpu_exec_exit()

2015-11-12 Thread Zhu Guihua
Hi Bharata, On 09/09/2015 03:56 PM, Bharata B Rao wrote: On Wed, Sep 09, 2015 at 03:41:30PM +0800, Zhu Guihua wrote: On 09/09/2015 01:52 PM, Bharata B Rao wrote: On Fri, Sep 04, 2015 at 03:31:24PM +1000, David Gibson wrote: On Thu, Aug 06, 2015 at 10:57:07AM +0530, Bharata B Rao wrote

Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list during cpu_exec_exit()

2015-11-12 Thread Zhu Guihua
On 11/12/2015 05:30 PM, Bharata B Rao wrote: On Thu, Nov 12, 2015 at 05:11:02PM +0800, Zhu Guihua wrote: Hi Bharata, On 09/09/2015 03:56 PM, Bharata B Rao wrote: On Wed, Sep 09, 2015 at 03:41:30PM +0800, Zhu Guihua wrote: On 09/09/2015 01:52 PM, Bharata B Rao wrote: On Fri, Sep 04, 2015

Re: [Qemu-devel] cpu modelling and hotplug

2015-10-21 Thread Zhu Guihua
Hi all, May I know whether the discussion is still ongoing? I checked Andreas's git tree, there was no changes about the topology. Plz let me know the schedule about this. Thanks, Zhu On 04/07/2015 08:43 PM, Christian Borntraeger wrote: We had a call and I was asked to write a summary about

[Qemu-devel] [RESEND PATCH v3] i386: keep cpu_model field in MachineState uptodate

2015-10-14 Thread Zhu Guihua
Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. This patch is rebased on the latest master. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> -

Re: [Qemu-devel] [PATCH v12 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-10-09 Thread Zhu Guihua
On 10/03/2015 03:21 AM, Eduardo Habkost wrote: On Fri, Oct 02, 2015 at 03:24:24PM -0300, Eduardo Habkost wrote: On Tue, Sep 22, 2015 at 02:29:01PM +0200, Igor Mammedov wrote: On Wed, 16 Sep 2015 17:19:12 +0800 Zhu Guihua <zhugh.f...@cn.fujitsu.com> wrote: TCG supports per CPU address

Re: [Qemu-devel] [PATCH v12 0/5] remove icc bus/bridge

2015-09-30 Thread Zhu Guihua
Hi Eduardo, Can you help merge this patch series to your x86 tree? Thanks, Zhu On 09/16/2015 05:19 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new

[Qemu-devel] [PATCH v12 5/5] icc_bus: drop the unused files

2015-09-16 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 -

[Qemu-devel] [PATCH v12 3/5] x86: use new method to correct reset sequence

2015-09-16 Thread Zhu Guihua
. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 631f89f..b414055 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1924,6 +1924,25 @@ static void pc_machine_initfn(

[Qemu-devel] [PATCH v12 0/5] remove icc bus/bridge

2015-09-16 Thread Zhu Guihua
use a callback to correct reset sequence for x86 -update apic mmio mapping Chen Fan (2): apic: move APIC's MMIO region mapping into APIC cpu/apic: drop icc bus/bridge Zhu Guihua (3): apic: use per CPU AS to map APIC MMIO for TCG x86: use new method to correct reset sequence icc_bus: d

[Qemu-devel] [PATCH v12 4/5] cpu/apic: drop icc bus/bridge

2015-09-16 Thread Zhu Guihua
Do so and drop ~30LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 +

[Qemu-devel] [PATCH v12 1/5] apic: move APIC's MMIO region mapping into APIC

2015-09-16 Thread Zhu Guihua
ed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 7 --- hw/intc/apic_common.c | 6 -- target-i386/cpu.c | 15 +++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --gi

[Qemu-devel] [PATCH v12 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-09-16 Thread Zhu Guihua
TCG supports per CPU address space, and the emulation quality is a bit better with it. So use per CPU address space to map APIC MMIO area. This allows the APIC base address of each cpu to be moved independent of others. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- target-i386

Re: [Qemu-devel] [PATCH v11 4/5] cpu/apic: drop icc bus/bridge

2015-09-14 Thread Zhu Guihua
On 09/14/2015 09:18 PM, Igor Mammedov wrote: On Wed, 2 Sep 2015 17:36:21 +0800 Zhu Guihua <zhugh.f...@cn.fujitsu.com> wrote: From: Chen Fan <chen.fan.f...@cn.fujitsu.com> After CPU hotplug has been converted to BUS-less hot-plug infrastructure, the only function ICC

Re: [Qemu-devel] [PATCH v11 0/5] remove icc bus/bridge

2015-09-10 Thread Zhu Guihua
ping ... On 09/02/2015 05:36 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off

Re: [Qemu-devel] [RFC PATCH v4 01/11] exec: Remove cpu from cpus list during cpu_exec_exit()

2015-09-09 Thread Zhu Guihua
On 09/09/2015 01:52 PM, Bharata B Rao wrote: On Fri, Sep 04, 2015 at 03:31:24PM +1000, David Gibson wrote: On Thu, Aug 06, 2015 at 10:57:07AM +0530, Bharata B Rao wrote: CPUState *cpu gets added to the cpus list during cpu_exec_init(). It should be removed from cpu_exec_exit().

Re: [Qemu-devel] [PATCH] cpu: introduce CpuTopoInfo structure for argument simplification

2015-09-09 Thread Zhu Guihua
On 09/10/2015 12:11 AM, Eduardo Habkost wrote: On Mon, Sep 07, 2015 at 04:22:10PM +0200, Andreas Färber wrote: Am 07.09.2015 um 13:29 schrieb Paolo Bonzini: On 21/08/2015 11:34, Zhu Guihua wrote: @@ -107,14 +111,12 @@ static inline apic_id_t apicid_from_topo_ids(unsigned nr_cores, static

Re: [Qemu-devel] [PATCH v3] i386: keep cpu_model field in MachineState uptodate

2015-09-07 Thread Zhu Guihua
This patch has been reviewed. Could anyone help merge it? Thanks, Zhu On 08/28/2015 02:28 AM, Eduardo Habkost wrote: On Thu, Aug 27, 2015 at 05:27:05PM +0800, Zhu Guihua wrote: Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static

[Qemu-devel] [PATCH v11 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-09-02 Thread Zhu Guihua
TCG supports per CPU address space, and the emulation quality is a bit better with it. So use per CPU address space to map APIC MMIO area. This allows the APIC base address of each cpu to be moved indepenedent of others. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- target-i386

[Qemu-devel] [PATCH v11 3/5] x86: use new method to correct reset sequence

2015-09-02 Thread Zhu Guihua
. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e15971c..4b4a7f3 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1928,6 +1928,25 @@ static void pc_machine_initfn(

[Qemu-devel] [PATCH v11 4/5] cpu/apic: drop icc bus/bridge

2015-09-02 Thread Zhu Guihua
Do so and drop ~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 +

[Qemu-devel] [PATCH v11 5/5] icc_bus: drop the unused files

2015-09-02 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 -

[Qemu-devel] [PATCH v11 0/5] remove icc bus/bridge

2015-09-02 Thread Zhu Guihua
messages in patch 1 and 2 -make the check of cpu->cpu_as_root simplier v9: -use a callback to correct reset sequence for x86 -update apic mmio mapping Chen Fan (2): apic: move APIC's MMIO region mapping into APIC cpu/apic: drop icc bus/bridge Zhu Guihua (3): apic: use per CPU AS to

[Qemu-devel] [PATCH v11 1/5] apic: move APIC's MMIO region mapping into APIC

2015-09-02 Thread Zhu Guihua
ed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 7 --- hw/intc/apic_common.c | 6 -- target-i386/cpu.c | 15 +++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH v10 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-08-31 Thread Zhu Guihua
On 08/31/2015 09:21 PM, Igor Mammedov wrote: On Mon, 31 Aug 2015 17:47:44 +0800 Zhu Guihua <zhugh.f...@cn.fujitsu.com> wrote: From: Chen Fan <chen.fan.f...@cn.fujitsu.com> After ICC bus/bridge have been removed, APIC MMIO area could not be mapped into sysbus MMIO any more. So rep

[Qemu-devel] [PATCH v10 4/4] icc_bus: drop the unused files

2015-08-31 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 -

[Qemu-devel] [PATCH v10 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-08-31 Thread Zhu Guihua
hen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 7 --- hw/intc/apic_common.c | 6 -- target-i386/cpu.c | 16 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c inde

[Qemu-devel] [PATCH v10 3/4] cpu/apic: drop icc bus/bridge

2015-08-31 Thread Zhu Guihua
Do so and drop ~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 +

[Qemu-devel] [PATCH v10 2/4] x86: use new method to correct reset sequence

2015-08-31 Thread Zhu Guihua
reset. This patch uses the new QEMUMachine reset method to solve the above problem, ensuring the various reset happen in the correct order. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> --- hw/i386/pc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/h

[Qemu-devel] [PATCH v10 0/4] remove icc bus/bridge

2015-08-31 Thread Zhu Guihua
MIO region at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): x86: use new method to correct reset sequence icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs |

[Qemu-devel] [PATCH v3] i386: keep cpu_model field in MachineState uptodate

2015-08-27 Thread Zhu Guihua
Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v3: -use PCMachineState in pc_cpus_init() instead MachineState v2: -transfer MachineState from all pc_cpus_init

Re: [Qemu-devel] [RESEND PATCH v9 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-08-27 Thread Zhu Guihua
On 08/26/2015 11:49 PM, Eduardo Habkost wrote: On Wed, Aug 26, 2015 at 11:27:08AM -0400, Paolo Bonzini wrote: [...] +if (tcg_enabled()) { +memory_region_add_subregion_overlap(cpu-cpu_as_root, +apic-apicbase +

Re: [Qemu-devel] [PATCH v2] i386: keep cpu_model field in MachineState uptodate

2015-08-26 Thread Zhu Guihua
On 08/26/2015 11:11 PM, Eduardo Habkost wrote: On Mon, Aug 24, 2015 at 05:42:09PM +0800, Zhu Guihua wrote: Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com

[Qemu-devel] [PATCH v2] i386: keep cpu_model field in MachineState uptodate

2015-08-24 Thread Zhu Guihua
Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v2: -transfer MachineState from all pc_cpus_init() callers --- hw/i386/pc.c | 16 +++- hw

[Qemu-devel] [PATCH] i386: keep cpu_model field in MachineState uptodate

2015-08-21 Thread Zhu Guihua
Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 17 - hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- include

[Qemu-devel] [PATCH] cpu: introduce CpuTopoInfo structure for argument simplification

2015-08-21 Thread Zhu Guihua
-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- include/hw/i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/include/hw/i386

[Qemu-devel] [RESEND PATCH v9 0/4] remove icc bus/bridge

2015-08-19 Thread Zhu Guihua
): apic: map APIC's MMIO region at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): x86: use new method to correct reset sequence icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs

[Qemu-devel] [RESEND PATCH v9 4/4] icc_bus: drop the unused files

2015-08-19 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [RESEND PATCH v9 2/4] x86: use new method to correct reset sequence

2015-08-19 Thread Zhu Guihua
, ensuring the various reset happen in the correct order. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8b7dbe5..0e83dc9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c

[Qemu-devel] [RESEND PATCH v9 3/4] cpu/apic: drop icc bus/bridge

2015-08-19 Thread Zhu Guihua
~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c

[Qemu-devel] [RESEND PATCH v9 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-08-19 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 7 --- hw/intc

Re: [Qemu-devel] [RFC PATCH v4 00/11] sPAPR CPU hotplug

2015-08-06 Thread Zhu Guihua
On 08/06/2015 01:27 PM, Bharata B Rao wrote: Hi, This is the next version of CPU hotplug support patchset for PowerPC sPAPR guests. This is a split-out from the previous version (v3) that was carrying CPU and memory hotplug together. This patchset applies on spapr-next branch of David Gibson's

Re: [Qemu-devel] [PATCH v9 0/4] remove icc bus/bridge

2015-07-19 Thread Zhu Guihua
On 07/16/2015 05:52 PM, Igor Mammedov wrote: On Thu, 16 Jul 2015 10:45:41 +0800 Zhu Guihua zhugh.f...@cn.fujitsu.com wrote: ping... I'll look at it once 2.4 is released. Got it, thanks. By the way, do you know what state of qemu socket topology ? Regards, Zhu On 07/03/2015 05:38 PM

Re: [Qemu-devel] [PATCH v9 0/4] remove icc bus/bridge

2015-07-15 Thread Zhu Guihua
ping... On 07/03/2015 05:38 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off

Re: [Qemu-devel] [PATCH v3 0/7] cpu: add i386 cpu hot remove support

2015-07-12 Thread Zhu Guihua
On 07/09/2015 10:25 PM, Eduardo Otubo wrote: On Fri, Jun 26, 2015 at 11=37=43AM +0800, Zhu Guihua wrote: Hi, On 06/24/2015 09:28 PM, Eduardo Otubo wrote: Hello Zhu, Are you still working on this feature? Could you provide a rebased version of this series? Sorry for late reply. Yes, we

[Qemu-devel] [PATCH v9 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-07-03 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 7 --- hw/intc

[Qemu-devel] [PATCH v9 2/4] x86: use new method to correct reset sequence

2015-07-03 Thread Zhu Guihua
, ensuring the various reset happen in the correct order. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9f16128..314930a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c

[Qemu-devel] [PATCH v9 0/4] remove icc bus/bridge

2015-07-03 Thread Zhu Guihua
): apic: map APIC's MMIO region at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): x86: use new method to correct reset sequence icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs

[Qemu-devel] [PATCH v9 4/4] icc_bus: drop the unused files

2015-07-03 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [PATCH v9 3/4] cpu/apic: drop icc bus/bridge

2015-07-03 Thread Zhu Guihua
~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c

Re: [Qemu-devel] [RESEND PATCH v8 2/4] hw: add a wrapper for registering reset handler

2015-06-30 Thread Zhu Guihua
On 06/30/2015 05:21 PM, Igor Mammedov wrote: On Tue, 30 Jun 2015 14:31:50 +0800 Zhu Guihua zhugh.f...@cn.fujitsu.com wrote: On 06/26/2015 01:28 AM, Andreas Färber wrote: Am 25.06.2015 um 19:00 schrieb Paolo Bonzini: On 25/06/2015 04:17, Zhu Guihua wrote: Add a wrapper to specify reset

Re: [Qemu-devel] [RESEND PATCH v8 2/4] hw: add a wrapper for registering reset handler

2015-06-30 Thread Zhu Guihua
On 06/26/2015 01:28 AM, Andreas Färber wrote: Am 25.06.2015 um 19:00 schrieb Paolo Bonzini: On 25/06/2015 04:17, Zhu Guihua wrote: Add a wrapper to specify reset order when registering reset handler, instead of non-obvious initiazation code ordering. Signed-off-by: Zhu Guihua zhugh.f

Re: [Qemu-devel] [PATCH v3 0/7] cpu: add i386 cpu hot remove support

2015-06-25 Thread Zhu Guihua
://github.com/zhuguihua/qemu.git cpu-hotplug Thanks, Zhu Regards, On Fri, Feb 13, 2015 at 06=40=15PM +0800, Zhu Guihua wrote: This series is based on chen fan's previous i386 cpu hot remove patchset: https://lists.nongnu.org/archive/html/qemu-devel/2013-12/msg04266.html Via implementing ACPI

[Qemu-devel] [RESEND PATCH v8 3/4] cpu/apic: drop icc bus/bridge

2015-06-24 Thread Zhu Guihua
~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 24 +--- hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c

[Qemu-devel] [RESEND PATCH v8 2/4] hw: add a wrapper for registering reset handler

2015-06-24 Thread Zhu Guihua
Add a wrapper to specify reset order when registering reset handler, instead of non-obvious initiazation code ordering. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- include/hw/hw.h | 4 vl.c| 18 +- 2 files changed, 21 insertions(+), 1 deletion

[Qemu-devel] [RESEND PATCH v8 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-06-24 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- exec.c| 5 + hw/i386/pc.c

[Qemu-devel] [RESEND PATCH v8 0/4] remove icc bus/bridge

2015-06-24 Thread Zhu Guihua
at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): hw: add a wrapper for registering reset handler icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - exec.c | 5 ++ hw/cpu

[Qemu-devel] [RESEND PATCH v8 4/4] icc_bus: drop the unused files

2015-06-24 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

Re: [Qemu-devel] [PATCH v8 0/4] remove icc bus/bridge

2015-06-16 Thread Zhu Guihua
ping... On 06/08/2015 06:35 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off

[Qemu-devel] [PATCH v8 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-06-08 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- exec.c| 5 + hw/i386/pc.c

[Qemu-devel] [PATCH v8 0/4] remove icc bus/bridge

2015-06-08 Thread Zhu Guihua
): apic: map APIC's MMIO region at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): hw: add a wrapper for registering reset handler icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - exec.c

[Qemu-devel] [PATCH v8 2/4] hw: add a wrapper for registering reset handler

2015-06-08 Thread Zhu Guihua
Add a wrapper to specify reset order when registering reset handler, instead of non-obvious initiazation code ordering. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- include/hw/hw.h | 4 vl.c| 18 +- 2 files changed, 21 insertions(+), 1 deletion

[Qemu-devel] [PATCH v8 4/4] icc_bus: drop the unused files

2015-06-08 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [PATCH v8 3/4] cpu/apic: drop icc bus/bridge

2015-06-08 Thread Zhu Guihua
~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 24 +--- hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c

Re: [Qemu-devel] [PATCH v7 1/3] sysbus: register reset handler for main_system_bus when created

2015-06-03 Thread Zhu Guihua
Hi Eduardo, On 06/02/2015 11:53 PM, Eduardo Habkost wrote: On Tue, Jun 02, 2015 at 05:23:55PM +0800, Zhu Guihua wrote: Since icc bus will be droped and apic reset should be after bus reset in x86, this patch moves reset handler for main_system_bus from vl.c to sysbus.c So, you are changing

[Qemu-devel] [PATCH v7 2/3] cpu/apic: drop icc bus/bridge

2015-06-02 Thread Zhu Guihua
~200LOC of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 15 +++ hw/i386/pc_q35.c

[Qemu-devel] [PATCH v7 3/3] icc_bus: drop the unused files

2015-06-02 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [PATCH v7 1/3] sysbus: register reset handler for main_system_bus when created

2015-06-02 Thread Zhu Guihua
Since icc bus will be droped and apic reset should be after bus reset in x86, this patch moves reset handler for main_system_bus from vl.c to sysbus.c Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/core/sysbus.c | 4 vl.c | 3 --- 2 files changed, 4 insertions(+), 3

[Qemu-devel] [PATCH v7 0/3] remove icc bus/bridge

2015-06-02 Thread Zhu Guihua
in x86_cpu_apic_create() -drop NULL check for cpu apic_state -put drop of the unused files about icc_bus into a seprate patch -put DEVICE() casts into a seprate patch v3: -replace init apic by object_new() -add reset apic at the time of CPU reset Chen Fan (1): cpu/apic: drop icc bus/bridge Zhu

Re: [Qemu-devel] [RESEND PATCH v4] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-05-27 Thread Zhu Guihua
This patch has been reviewed. Could it be merged? Thanks, Zhu On 05/16/2015 12:18 AM, Igor Mammedov wrote: On Wed, 13 May 2015 17:21:36 +0800 Zhu Guihua zhugh.f...@cn.fujitsu.com wrote: Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory

[Qemu-devel] [PATCH v6 4/4] icc_bus: drop the unused files

2015-05-19 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [PATCH v6 3/4] cpu/apic: drop icc bus/bridge

2015-05-19 Thread Zhu Guihua
of not needed anymore ICCBus related code. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c| 9

[Qemu-devel] [PATCH v6 0/4] remove icc bus/bridge

2015-05-19 Thread Zhu Guihua
into a seprate patch v3: -replace init apic by object_new() -add reset apic at the time of CPU reset Chen Fan (2): apic: map APIC's MMIO region at each CPU's address space cpu/apic: drop icc bus/bridge Zhu Guihua (2): apic: convert -busdev.qdev casts to C casts icc_bus: drop the unused

[Qemu-devel] [PATCH v6 2/4] apic: convert -busdev.qdev casts to C casts

2015-05-19 Thread Zhu Guihua
Use C casts to avoid accessing ICCDevice's qdev field directly. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/intc/apic.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 0f97b47..77b639c 100644 --- a/hw/intc/apic.c

[Qemu-devel] [PATCH v6 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-05-19 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- exec.c| 5 + hw/i386/pc.c

[Qemu-devel] [RESEND PATCH v4] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-05-13 Thread Zhu Guihua
Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory hotplug. This patch is rebased on master. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v4: -rename struct AcpiHotplugStatus to AcpiGPEStatusBits -add comments for struct

[Qemu-devel] [PATCH v5 2/4] apic: convert -busdev.qdev casts to C casts

2015-05-13 Thread Zhu Guihua
Use C casts to avoid accessing ICCDevice's qdev field directly. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/intc/apic.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 0f97b47..e6f14b5 100644 --- a/hw/intc/apic.c

[Qemu-devel] [PATCH v5 0/4] remove icc bus/bridge

2015-05-13 Thread Zhu Guihua
of CPU reset Chen Fan (2): apic: move apic mmio register to each apic realizefn cpu/apic: drop icc bus/bridge Zhu Guihua (2): apic: convert -busdev.qdev casts to C casts icc_bus: drop the unused files default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1

[Qemu-devel] [PATCH v5 3/4] cpu/apic: drop icc bus/bridge

2015-05-13 Thread Zhu Guihua
in the same manner as pc-dimm. and due to APIC is bus-less, so we should reset it as CPU reset. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 --- hw/i386/pc_piix.c | 9

[Qemu-devel] [PATCH v5 4/4] icc_bus: drop the unused files

2015-05-13 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [PATCH v5 1/4] apic: move apic mmio register to each apic realizefn

2015-05-13 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Due to local apic address is in view of CPU's address space, so able to move apic mapping to each apic realizefn. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- exec.c| 5

[Qemu-devel] [RESEND PATCH v4 4/4] icc_bus: drop the unused files

2015-04-29 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu

[Qemu-devel] [RESEND PATCH v4 0/4] remove icc bus/bridge

2015-04-29 Thread Zhu Guihua
init apic by object_new() -add reset apic at the time of CPU reset Chen Fan (2): apic: move apic mmio register to each apic realizefn cpu/apic: drop icc bus/bridge/ Zhu Guihua (2): apic: convert -busdev.qdev casts to DEVICE() casts icc_bus: drop the unused files default-configs/i386

[Qemu-devel] [RESEND PATCH v4 2/4] apic: convert -busdev.qdev casts to DEVICE() casts

2015-04-29 Thread Zhu Guihua
Use DEVICE() casts to avoid accessing ICCDevice's qdev field directly. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/intc/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 0f97b47..00ae0ec 100644 --- a/hw/intc

[Qemu-devel] [RESEND PATCH v4 3/4] cpu/apic: drop icc bus/bridge/

2015-04-29 Thread Zhu Guihua
in the same manner as pc-dimm. and due to APIC is bus-less, so we should reset it as CPU reset. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c| 19 +-- hw/i386/pc_piix.c | 9

[Qemu-devel] [RESEND PATCH v4 1/4] apic: move apic mmio register to each apic realizefn

2015-04-29 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Due to local apic address is in view of CPU's address space, so able to move apic mapping to each apic realizefn. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- exec.c| 5

[Qemu-devel] [PATCH v3] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-04-28 Thread Zhu Guihua
Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory hotplug. This patch is rebased on pci branch in mst's tree. git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v3: -rebase on pci

Re: [Qemu-devel] [PATCH v3] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-04-28 Thread Zhu Guihua
On 04/28/2015 04:52 PM, Igor Mammedov wrote: On Tue, 28 Apr 2015 16:24:02 +0800 Zhu Guihua zhugh.f...@cn.fujitsu.com wrote: Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory hotplug. This patch is rebased on pci branch in mst's tree

Re: [Qemu-devel] [PATCH v7 6/8] acpi: fix Memory device control fields register

2015-04-28 Thread Zhu Guihua
On 04/28/2015 03:09 AM, Michael S. Tsirkin wrote: On Mon, Apr 27, 2015 at 04:47:20PM +0800, Zhu Guihua wrote: 0 bit in Memory device control fields must be cleared before writing to register. But now this field isn't cleared when other fields are written. To solve this bug, This patch fixes

Re: [Qemu-devel] [PATCH v7 6/8] acpi: fix Memory device control fields register

2015-04-28 Thread Zhu Guihua
On 04/28/2015 01:49 PM, Zhu Guihua wrote: On 04/28/2015 03:09 AM, Michael S. Tsirkin wrote: On Mon, Apr 27, 2015 at 04:47:20PM +0800, Zhu Guihua wrote: 0 bit in Memory device control fields must be cleared before writing to register. But now this field isn't cleared when other fields

[Qemu-devel] [PATCH v4] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-04-28 Thread Zhu Guihua
Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory hotplug. This patch is rebased on pci branch in mst's tree. git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v4: -rename struct

[Qemu-devel] [PATCH v7 3/8] acpi, mem-hotplug: add unplug request cb for memory device

2015-04-27 Thread Zhu Guihua
in acpi_memory_unplug_request_cb(). Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/ich9.c | 10 -- hw/acpi/memory_hotplug.c | 19 +++ hw/acpi/piix4.c

[Qemu-devel] [PATCH v7 8/8] qmp-event: add event notification for memory hot unplug error

2015-04-27 Thread Zhu Guihua
When memory hot unplug fails, this patch adds support to send QMP event to notify mgmt about this failure. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- docs/qmp/qmp-events.txt | 17 + hw/acpi/memory_hotplug.c | 10

[Qemu-devel] [PATCH v7 2/8] acpi, mem-hotplug: add acpi_memory_slot_status() to get MemStatus

2015-04-27 Thread Zhu Guihua
tangc...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/memory_hotplug.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index c6580da..6af9303 100644 --- a/hw

[Qemu-devel] [PATCH v7 0/8] QEMU memory hot unplug support

2015-04-27 Thread Zhu Guihua
in the last version -cleanup external state in acpi_memory_unplug_cb Tang Chen (3): acpi, mem-hotplug: add acpi_memory_slot_status() to get MemStatus acpi, mem-hotplug: add unplug request cb for memory device acpi, mem-hotplug: add unplug cb for memory device Zhu Guihua (5): docs: update

[Qemu-devel] [PATCH v7 7/8] acpi: add hardware implementation for memory hot unplug

2015-04-27 Thread Zhu Guihua
- implements QEMU hardware part of memory hot unplug protocol described at docs/spec/acpi_mem_hotplug.txt - handles memory remove notification event - handles device eject notification Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- docs

[Qemu-devel] [PATCH v7 4/8] acpi, mem-hotplug: add unplug cb for memory device

2015-04-27 Thread Zhu Guihua
-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/ich9.c | 9 +++-- hw/acpi/memory_hotplug.c | 14 ++ hw/acpi/piix4.c | 11 +-- hw/i386/pc.c | 34

[Qemu-devel] [PATCH v7 1/8] docs: update documentation for memory hot unplug

2015-04-27 Thread Zhu Guihua
Add specification about how to use memory hot unplug, and add a flow diagram to explain memory hot unplug process. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- docs/memory-hotplug.txt | 23 +++--- docs/specs

[Qemu-devel] [PATCH v7 6/8] acpi: fix Memory device control fields register

2015-04-27 Thread Zhu Guihua
...@redhat.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- docs/specs/acpi_mem_hotplug.txt | 5 - hw/i386/acpi-build.c| 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/specs/acpi_mem_hotplug.txt b/docs/specs/acpi_mem_hotplug.txt index dcc4808..68daa14 100644

  1   2   3   >