[Qemu-devel] [PATCH v1 0/3] monitor: add peripheral device del completion support

2014-09-18 Thread Zhu Guihua
After inputting device_del command in monitor, we expect to list all hotpluggable devices automatically by pressing tab key. This patchset provides the function to list all peripheral devices such as memory devices. Zhu Guihua (3): qom: add function to get opaque property in ObjectProperty

[Qemu-devel] [PATCH v1 2/3] qom: export object_property_is_child()

2014-09-18 Thread Zhu Guihua
Export object_property_is_child() to let it be invoked in other places. Signed-off-by: Zhu Guihua --- include/qom/object.h | 1 + qom/object.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 5d55889..8f27b7c 100644

[Qemu-devel] [PATCH v1 1/3] qom: add function to get opaque property in ObjectProperty

2014-09-18 Thread Zhu Guihua
Add object_property_get_opaque() to get opaque property in ObjectProperty. Signed-off-by: Zhu Guihua --- include/qom/object.h | 1 + qom/object.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 8a05a81..5d55889 100644

[Qemu-devel] [PATCH v1 3/3] monitor: add del completion for peripheral device

2014-09-18 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 24 1 file changed, 24 insertions(+) diff --git a/monitor.c b/monitor.c index 667efb7..c0e00e4 100644 --- a/monitor.c +++ b/monitor.c

Re: [Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-22 Thread Zhu Guihua
t; On Thu, 18 Sep 2014 16:09:32 +0800 > > >> >> > zhugh wrote: > > >> >> > > > >> >> > > Hi, > > >> >> > > > > >> >> > > Could anyone help to review this patch?

[Qemu-devel] [PATCH v5] Add HMP command "info memory-devices"

2014-09-22 Thread Zhu Guihua
Provides HMP equivalent of QMP query-memory-devices command. Signed-off-by: Zhu Guihua --- Changes since v4: - enclose ID in double quotes. Changes since v3: - optimize the time to print memory devices' information. - change output format of di->addr and di->size. Changes since

Re: [Qemu-devel] [PATCH v1 0/3] monitor: add peripheral device del completion support

2014-09-25 Thread Zhu Guihua
ping ... On Thu, 2014-09-18 at 15:53 +0800, Zhu Guihua wrote: > After inputting device_del command in monitor, we expect to list all > hotpluggable devices automatically by pressing tab key. This patchset provides > the function to list all peripheral devices such as memory devices.

[Qemu-devel] [PATCH v2 0/2] monitor: add peripheral device del completion support

2014-09-30 Thread Zhu Guihua
After inputting device_del command in monitor, we expect to list all hotpluggable devices automatically by pressing tab key. This patchset provides the function to list all peripheral devices such as memory devices. v2: - use object_child_foreach() to simplify the implementation (Andreas) Zhu

[Qemu-devel] [PATCH v2 2/2] monitor: add del completion for peripheral device

2014-09-30 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index 667efb7..55f4466 100644 --- a/monitor.c +++ b/monitor.c

[Qemu-devel] [PATCH v2 1/2] qdev: add list built for devices

2014-09-30 Thread Zhu Guihua
For peripheral device del completion, add a function to build a list for devices. Signed-off-by: Zhu Guihua --- hw/core/qdev.c | 13 + include/hw/qdev-core.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index fcb1638..041ac38

[Qemu-devel] [PATCH v3 0/2] monitor: add peripheral device del completion support

2014-10-06 Thread Zhu Guihua
'hotpluggable' property to discard non-hotpluggable devices (Igor) v2: - use object_child_foreach() to simplify the implementation (Andreas) Zhu Guihua (2): qdev: add qdev_build_hotpluggable_device_list helper monitor: add del completion for peripheral device hw/core/qdev.c

[Qemu-devel] [PATCH v3 1/2] qdev: add qdev_build_hotpluggable_device_list helper

2014-10-06 Thread Zhu Guihua
For peripheral device del completion, add a function to build a list for hotpluggable devices. Signed-off-by: Zhu Guihua --- hw/core/qdev.c | 14 ++ include/hw/qdev-core.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index fcb1638

[Qemu-devel] [PATCH v3 2/2] monitor: add del completion for peripheral device

2014-10-06 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 24 1 file changed, 24 insertions(+) diff --git a/monitor.c b/monitor.c index 667efb7..ffe5405 100644 --- a/monitor.c +++ b/monitor.c

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Zhu Guihua
On Thu, 2014-10-02 at 10:08 +, Igor Mammedov wrote: > device_add puts every device with 'id' inside of 'peripheral' > container using id's value as the last component name. > Use it by replacing recursive search on sysbus with path > lookup in 'peripheral' container, which could handle both > B

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Zhu Guihua
On Tue, 2014-10-07 at 15:53 +0200, Igor Mammedov wrote: > On Tue, 07 Oct 2014 15:23:45 +0200 > Andreas Färber wrote: > > > Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > > > On Tue, 7 Oct 2014 19:59:51 +0800 > > > Zhu Guihua wrote: > > > > > >

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-08 Thread Zhu Guihua
On Wed, 2014-10-08 at 10:01 +0200, Paolo Bonzini wrote: > Il 08/10/2014 05:49, Zhu Guihua ha scritto: > > when device_add pc-dimm, only 'memdev' property is necessary, but the > > 'id' property is optional. > > > > So I execute the command as follow

Re: [Qemu-devel] [PATCH v3 0/2] monitor: add peripheral device del completion support

2014-10-13 Thread Zhu Guihua
ping... On Mon, 2014-10-06 at 19:38 +0800, Zhu Guihua wrote: > After inputting device_del command in monitor, we expect to list all > hotpluggable devices automatically by pressing tab key. This patchset provides > the function to list all peripheral devices such as memory devices

Re: [Qemu-devel] [PATCH v3 2/2] monitor: add del completion for peripheral device

2014-10-16 Thread Zhu Guihua
On Thu, 2014-10-16 at 13:50 +0200, Igor Mammedov wrote: > On Mon, 6 Oct 2014 19:38:44 +0800 > Zhu Guihua wrote: > > > Add peripheral_device_del_completion() to let peripheral device del > > completion be possible. > > > > Signed-off-by: Zhu Gu

[Qemu-devel] [PATCH v4 2/3] monitor: add del completion for peripheral device

2014-10-17 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 24 1 file changed, 24 insertions(+) diff --git a/monitor.c b/monitor.c index 2d14f39..9c3fa01 100644 --- a/monitor.c +++ b/monitor.c

[Qemu-devel] [PATCH v4 1/3] qdev: add qdev_build_hotpluggable_device_list helper

2014-10-17 Thread Zhu Guihua
For peripheral device del completion, add a function to build a list for hotpluggable devices. Signed-off-by: Zhu Guihua --- hw/core/qdev.c | 13 + include/hw/qdev-core.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index a1e9247

[Qemu-devel] [PATCH v4 0/3] monitor: add peripheral device del completion support

2014-10-17 Thread Zhu Guihua
value of hotpluggable property (Igor) v3: - commit message changes (Igor) - rename function in patch 1 (Igor) - use 'hotpluggable' property to discard non-hotpluggable devices (Igor) v2: - use object_child_foreach() to simplify the implementation (Andreas) Zhu Guihua (3):

[Qemu-devel] [PATCH v4 3/3] monitor: delete device_del_bus_completion

2014-10-17 Thread Zhu Guihua
device_del_bus_completion() that gathers devices from buses is unused; delete it. Signed-off-by: Zhu Guihua --- monitor.c | 20 1 file changed, 20 deletions(-) diff --git a/monitor.c b/monitor.c index 9c3fa01..42affb7 100644 --- a/monitor.c +++ b/monitor.c @@ -4340,25

Re: [Qemu-devel] [PATCH v4 2/3] monitor: add del completion for peripheral device

2014-10-19 Thread Zhu Guihua
On Sun, 2014-10-19 at 14:37 +0300, Marcel Apfelbaum wrote: > On Fri, 2014-10-17 at 17:35 +0800, Zhu Guihua wrote: > > Add peripheral_device_del_completion() to let peripheral device del > > completion > > be possible. > > > > Signed-off-by: Zhu Gu

[Qemu-devel] [PATCH v5 1/3] qdev: add qdev_build_hotpluggable_device_list helper

2014-10-21 Thread Zhu Guihua
For peripheral device del completion, add a function to build a list for hotpluggable devices. Signed-off-by: Zhu Guihua --- hw/core/qdev.c | 13 + include/hw/qdev-core.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index a1e9247

[Qemu-devel] [PATCH v5 2/3] monitor: add del completion for peripheral device

2014-10-21 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/monitor.c b/monitor.c index 2d14f39..ac41fa3 100644 --- a/monitor.c +++ b/monitor.c

[Qemu-devel] [PATCH v5 0/3] monitor: add peripheral device del completion support

2014-10-21 Thread Zhu Guihua
n (Andreas) Zhu Guihua (3): qdev: add qdev_build_hotpluggable_device_list helper monitor: add del completion for peripheral device monitor: delete device_del_bus_completion hw/core/qdev.c | 13 + include/hw/qdev-core.h | 2 ++ monitor.c

[Qemu-devel] [PATCH v5 3/3] monitor: delete device_del_bus_completion

2014-10-21 Thread Zhu Guihua
device_del_bus_completion() that gathers devices from buses is unused; delete it. Signed-off-by: Zhu Guihua --- monitor.c | 20 1 file changed, 20 deletions(-) diff --git a/monitor.c b/monitor.c index ac41fa3..2cccd0a 100644 --- a/monitor.c +++ b/monitor.c @@ -4340,25

[Qemu-devel] [PATCH] icc_bus: rename ICC_BRIGDE to ICC_BRIDGE

2014-11-02 Thread Zhu Guihua
Rename ICC_BRIGDE for better readability. Signed-off-by: Zhu Guihua --- hw/cpu/icc_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/cpu/icc_bus.c b/hw/cpu/icc_bus.c index 9575fd6..6646ea2 100644 --- a/hw/cpu/icc_bus.c +++ b/hw/cpu/icc_bus.c @@ -73,11 +73,11

Re: [Qemu-devel] [PATCH] icc_bus: rename ICC_BRIGDE to ICC_BRIDGE

2014-11-03 Thread Zhu Guihua
On Mon, 2014-11-03 at 12:01 +0300, Michael Tokarev wrote: > 03.11.2014 08:51, Zhu Guihua wrote: > > Rename ICC_BRIGDE for better readability. > > That's a good one... :) Applied to -trivial, thank you! > For Igor's opinion, it is better to change the subject. So

[Qemu-devel] [RFC PATCH v1] monitor: add parameter 'memory-devices' to the 'info' command

2014-09-03 Thread Zhu Guihua
emory-devices' in monitor, monitor can list all available memory devices and their information. Signed-off-by: Zhu Guihua --- hmp-commands.hx | 2 ++ hmp.c | 33 + hmp.h | 1 + monitor.c | 7 +++ 4 files changed, 43 insertions(+) di

[Qemu-devel] [RFC PATCH v2] Add HMP command "info memory-devices"

2014-09-10 Thread Zhu Guihua
Provides HMP equivalent of QMP query-memory-devices command. Signed-off-by: Zhu Guihua --- hmp-commands.hx | 2 ++ hmp.c | 43 +++ hmp.h | 1 + monitor.c | 7 +++ 4 files changed, 53 insertions(+) diff --git a/hmp

[Qemu-devel] [RESEND RFC PATCH v2] Add HMP command "info memory-devices"

2014-09-10 Thread Zhu Guihua
#x27;device_del'. Change log v1 -> v2: 1. fix bug that accessing info->dimm when MemoryDeviceInfo is not PCDIMMDevice. 2. use enum to replace "dimm", and lookup type name in MemoryDeviceInfoKind_lookup[] instead of opencodding it. Signed-off-by: Zhu Guihua --- hmp-comma

[Qemu-devel] [RFC PATCH v3] Add HMP command "info memory-devices"

2014-09-12 Thread Zhu Guihua
Provides HMP equivalent of QMP query-memory-devices command. Signed-off-by: Zhu Guihua --- Changes since v2: - print address in hex. - change the loop control from while to for. - modify some variables' name. - optimize the time to print memory devices' kind. Changes since v1: - fi

[Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-15 Thread Zhu Guihua
Provides HMP equivalent of QMP query-memory-devices command. Signed-off-by: Zhu Guihua --- Changes since v3: - optimize the time to print memory devices' information. - change output format of di->addr and di->size. Changes since v2: - print address in hex. - change the loop control

[Qemu-devel] [RFC PATCH] add memory hotunplug support

2014-07-16 Thread Zhu Guihua
xcute 'device_del d10', the pc-dimm will be deleted successfully. If you change the id property of device_del to others, the device_del operation will also be excuted correctly, and the pc-dimm d9 will be deleted. Signed-off-by: Hu Tao Signed-off-by: Zhu Guihu

[Qemu-devel] [RFC PATCH v2] add memory hotunplug support

2014-07-23 Thread Zhu Guihua
erate OST. Finally, qemu handles OST events to free dimm device. Signed-off-by: Hu Tao Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c | 74 +++- hw/acpi/piix4.c | 2 ++ hw/core/qdev.c | 9 + hw/i386

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-02-12 Thread Zhu Guihua
On Tue, 2015-02-10 at 20:38 +0800, Zhi Yong Wu wrote: > On Fri, Feb 6, 2015 at 3:54 PM, Zhu Guihua wrote: > > On Tue, 2015-02-03 at 16:41 +0800, Zhi Yong Wu wrote: > >> HI, > >> > >> Can you push the patchset to a branch on github? It will be convenient

[Qemu-devel] [PATCH v4 00/10] cpu: add device_add foo-x86_64-cpu support

2015-02-13 Thread Zhu Guihua
rt Gu Zheng (4): qom/cpu: move register_vmstate to common CPUClass.realizefn qom/cpu: move apic vmstate register into x86_cpu_apic_realize monitor: use cc->get_arch_id as the cpu index i386/cpu: add instance finalize callback Zhu Guihua (2): cpu: introduce get_compat_arch_id() meth

[Qemu-devel] [PATCH v4 01/10] cpu/apic: drop icc bus/bridge/

2015-02-13 Thread Zhu Guihua
. Signed-off-by: Chen Fan Signed-off-by: Zhu Guihua --- hw/i386/kvm/apic.c | 10 -- hw/i386/pc.c| 21 + hw/i386/pc_piix.c | 9 + hw/i386/pc_q35.c| 9 + hw/intc/apic.c | 16

[Qemu-devel] [PATCH v4 06/10] qom/cpu: move apic vmstate register into x86_cpu_apic_realize

2015-02-13 Thread Zhu Guihua
From: Gu Zheng move apic vmstate register into x86_cpu_apic_realize, and use cc->get_arch_id as the instance id to avoid using the auto-id which will break the migration if we add device not in order. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/intc/apic_common.c |

[Qemu-devel] [PATCH v4 05/10] qom/cpu: move register_vmstate to common CPUClass.realizefn

2015-02-13 Thread Zhu Guihua
From: Gu Zheng Move cpu vmstate register from cpu_exec_init into cpu_common_realizefn, and use cc->get_arch_id as the instance id that suggested by Igor to fix the migration issue. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- exec.c| 25 ++--- incl

[Qemu-devel] [PATCH v4 02/10] icc_bus: remove icc related files

2015-02-13 Thread Zhu Guihua
From: Chen Fan ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Chen Fan Signed-off-by: Zhu Guihua --- MAINTAINERS| 6 -- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1

[Qemu-devel] [PATCH v4 07/10] monitor: use cc->get_arch_id as the cpu index

2015-02-13 Thread Zhu Guihua
From: Gu Zheng Use cc->get_arch_id as the cpu index to avoid the cpu index duplicated issue in the QMP/HMP command output. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- cpus.c| 4 +++- monitor.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpus.

[Qemu-devel] [PATCH v4 03/10] cpu: introduce CpuTopoInfo structure for argument simplification

2015-02-13 Thread Zhu Guihua
From: Chen Fan Reviewed-by: Eduardo Habkost Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- target-i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/target-i386/topology.h b/target-i386

[Qemu-devel] [PATCH v4 08/10] acpi: introduce acpi_send_gpe_event()

2015-02-13 Thread Zhu Guihua
acpi_send_gpe_event() is introduced to do a generic for acpi to send gpe event, and it can be reused by CPU and PCI hotplug. Signed-off-by: Zhu Guihua --- hw/acpi/core.c | 7 +++ include/hw/acpi/acpi.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/hw/acpi/core.c b/hw/acpi

[Qemu-devel] [PATCH v4 04/10] cpu: introduce get_compat_arch_id() method and override it for X86CPU

2015-02-13 Thread Zhu Guihua
get_compat_arch_id() is introduced to handle cross version migration issue, it is to convert new 'apic-id' to old 'cpu_index'. Signed-off-by: Zhu Guihua --- include/qom/cpu.h | 3 +++ qom/cpu.c | 6 ++ target-i386/cpu.c | 10 ++ target-

[Qemu-devel] [PATCH v4 10/10] i386/cpu: add instance finalize callback

2015-02-13 Thread Zhu Guihua
From: Gu Zheng Add a func to finalize a cpu's instance. When cpu's device_add failed, and cpu's device_del executed, this func would be invoked. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- include/qom/cpu.h | 1 + target-i386/cpu.c | 8 2 files change

[Qemu-devel] [PATCH v4 09/10] cpu: add device_add foo-x86_64-cpu support

2015-02-13 Thread Zhu Guihua
ff-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/cpu_hotplug.c | 6 -- hw/i386/pc.c | 6 -- target-i386/cpu.c | 48 +--- 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/hw/acpi/cpu

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

2015-02-13 Thread Zhu Guihua
ejection Gu Zheng (3): acpi/cpu: add cpu hot unplug request callback function acpi, pc: add cpu hot unplug callback support cpus: reclaim allocated vCPU objects Zhu Guihua (2): acpi, pc: add cpu hot unplug request callback support acpi/cpu: add cpu hot unplug callback function cpus.c

[Qemu-devel] [PATCH v3 2/7] acpi/cpu: add cpu hot unplug request callback function

2015-02-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/cpu_hotplug.c | 37 - include/hw/acpi/cpu_hotplug.h | 4 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/acpi

[Qemu-devel] [PATCH v3 4/7] acpi/cpu: add cpu hot unplug callback function

2015-02-13 Thread Zhu Guihua
Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- cpus.c| 7 +++ hw/acpi/cpu_hotplug.c | 8 include/hw/acpi/cpu_hotplug.h | 3 +++ include/qom/cpu.h | 9 + 4 files changed, 27 insertions(+) diff --git a/cpus.c b/cpus.c index

[Qemu-devel] [PATCH v3 5/7] acpi, pc: add cpu hot unplug callback support

2015-02-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 8 ++-- hw/acpi/piix4.c | 10 -- hw/i386/pc.c| 26 -- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 7600e88

[Qemu-devel] [PATCH v3 3/7] acpi, pc: add cpu hot unplug request callback support

2015-02-13 Thread Zhu Guihua
Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- hw/acpi/ich9.c | 9 +++-- hw/acpi/piix4.c | 2 ++ hw/i386/pc.c| 42 -- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 5352e19..7600e88

[Qemu-devel] [PATCH v3 1/7] x86: add x86_cpu_unrealizefn() for cpu apic remove

2015-02-13 Thread Zhu Guihua
From: Chen Fan Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clean the apic related allocation and vmstates at here. Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/i386/kvm/apic.c | 5 + hw

[Qemu-devel] [PATCH v3 7/7] cpus: reclaim allocated vCPU objects

2015-02-13 Thread Zhu Guihua
: Zhu Guihua --- cpus.c | 37 ++ include/sysemu/kvm.h | 1 + kvm-all.c| 57 +++- 3 files changed, 94 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index d6e5a5f..a11941f 100644

[Qemu-devel] [PATCH v3 6/7] cpu hotplug: implement function cpu_status_write() for vcpu ejection

2015-02-13 Thread Zhu Guihua
From: Chen Fan When OS ejected a vcpu (like: echo 1 > /sys/bus/acpi/devices/LNXCPUXX/eject), it would call acpi EJ0 method, the firmware need to write the new cpumap, QEMU would know which vcpu need to be ejected. Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Gui

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-02-13 Thread Zhu Guihua
On Thu, 2015-02-12 at 19:49 +0800, Zhu Guihua wrote: > On Tue, 2015-02-10 at 20:38 +0800, Zhi Yong Wu wrote: > > On Fri, Feb 6, 2015 at 3:54 PM, Zhu Guihua > > wrote: > > > On Tue, 2015-02-03 at 16:41 +0800, Zhi Yong Wu wrote: > > >> HI, > > >>

Re: [Qemu-devel] [RESEND PATCH v1 11/13] pc-dimm: Add memory hot unplug support for pc-dimm.

2015-02-25 Thread Zhu Guihua
On 01/29/2015 09:34 PM, Igor Mammedov wrote: On Thu, 8 Jan 2015 09:06:18 +0800 Tang Chen wrote: Implement unplug cb for pc-dimm. It remove the corresponding memory region, and unregister vmstat. At last, it calls memory unplug cb to reset memory status and do unparenting. --- hw/i386/pc.c |

[Qemu-devel] [PATCH v3 00/10] QEMU memory hot unplug support

2015-02-25 Thread Zhu Guihua
request cb for memory device. acpi, mem-hotplug: Add unplug cb for memory device. ich9, piix4, pc-dimm: Add memory hot unplug support acpi: Add hardware implementation for memory hot unplug. Zhu Guihua (2): qdev: make qdev_get_hotplug_handler() non-static ssdt-mem: add

[Qemu-devel] [PATCH v3 10/10] acpi: Add hardware implementation for memory hot unplug.

2015-02-25 Thread Zhu Guihua
From: Tang Chen This patch adds a new bit to memory hotplug IO port indicating that ej0 has been evaluated by guest OS. And call pc-dimm unplug cb to do the real removal. Signed-off-by: Hu Tao Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- docs/specs/acpi_mem_hotplug.txt | 11

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-25 Thread Zhu Guihua
On Fri, 2015-01-23 at 11:24 +0100, Alexandre DERUMIER wrote: > Hello, > > I'm currently testing the new cpu unplug features, > Works fine here with debian guests and kernel 3.14. > Thanks for your test. > But I have notice some small potential bugs, but I'm not sure I'm doing it > right. > >

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-25 Thread Zhu Guihua
res=1,maxcpus=2 > -object memory-backend-ram,size=256M,id=ram-node0 -numa > node,nodeid=0,cpus=0,memdev=ram-node0 > -object memory-backend-ram,size=256M,id=ram-node1 -numa > node,nodeid=1,cpus=1,memdev=ram-node1 > > # info numa > 2 nodes > node 0 cpus: 0 > node

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-25 Thread Zhu Guihua
m-node1 -numa > node,nodeid=1,cpus=1,memdev=ram-node1 > > # info numa > 2 nodes > node 0 cpus: 0 > node 0 size: 256 MB > node 1 cpus: > node 1 size: 256 MB > > hotpluging a cpu > # device_add kvm64-x86_64-cpu,apic-id=1,id=cpu1 > > # info numa

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-26 Thread Zhu Guihua
vel] [RESEND PATCH v1 0/5] Common unplug and unplug request cb for > memory and CPU hot-unplug. > https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html > [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpusupport > https://www.mail-archive.com/qemu-devel@

[Qemu-devel] [PATCH v2 2/5] acpi, ich9: Add hotunplug request cb for ich9.

2015-01-27 Thread Zhu Guihua
Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 7 +++ hw/isa/lpc_ich9.c | 5 +++-- include/hw/acpi/ich9.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 884dab3..5fe1eb8 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c

[Qemu-devel] [PATCH v2 4/5] acpi, ich9: Add unplug cb for ich9.

2015-01-27 Thread Zhu Guihua
memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 7 +++ hw/isa/lpc_ich9.c | 9 + include/hw/acpi/ich9.h | 2 ++ 3 files changed, 18 insertions(+) diff --git a/hw/acpi/ich9.c b/hw

[Qemu-devel] [PATCH v2 0/5] Common unplug and unplug request cb for memory and CPU hot-unplug

2015-01-27 Thread Zhu Guihua
Memory and CPU hot unplug are both asynchronous procedures. When the unplug operation happens, unplug request cb is called first. And when guest OS finished handling unplug, unplug cb will be called to do the real removal of device. They both need pc-machine, piix4 and ich9 unplug and unplug reque

[Qemu-devel] [PATCH v2 1/5] acpi, pc: Add hotunplug request cb for pc machine.

2015-01-27 Thread Zhu Guihua
Signed-off-by: Zhu Guihua --- hw/i386/pc.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c7af6aa..15ee10a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1680,6 +1680,13 @@ static void pc_machine_device_plug_cb(HotplugHandler *hotplug_dev

[Qemu-devel] [PATCH v2 3/5] acpi, pc: Add unplug cb for pc machine.

2015-01-27 Thread Zhu Guihua
, which memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/i386/pc.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 15ee10a..850b6b5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c

[Qemu-devel] [PATCH v2 5/5] acpi, piix4: Add unplug cb for piix4.

2015-01-27 Thread Zhu Guihua
memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/piix4.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 184e7e4..14d40a0 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi

Re: [Qemu-devel] [PATCH v2 0/5] Common unplug and unplug request cb for memory and CPU hot-unplug

2015-01-28 Thread Zhu Guihua
On Wed, 2015-01-28 at 10:00 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 28, 2015 at 03:45:36PM +0800, Zhu Guihua wrote: > > Memory and CPU hot unplug are both asynchronous procedures. > > When the unplug operation happens, unplug request cb is called first. > > And w

Re: [Qemu-devel] [PATCH v2 1/5] acpi, pc: Add hotunplug request cb for pc machine.

2015-01-28 Thread Zhu Guihua
On Wed, 2015-01-28 at 10:02 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 28, 2015 at 03:45:37PM +0800, Zhu Guihua wrote: > > From: Tang Chen > > > > Memory and CPU hot unplug are both asynchronous procedures. > > They both need unplug request callback to initiate unp

Re: [Qemu-devel] [PATCH v2 1/5] acpi, pc: Add hotunplug request cb for pc machine.

2015-01-28 Thread Zhu Guihua
On Wed, 2015-01-28 at 10:39 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 28, 2015 at 04:33:02PM +0800, Zhu Guihua wrote: > > On Wed, 2015-01-28 at 10:02 +0200, Michael S. Tsirkin wrote: > > > On Wed, Jan 28, 2015 at 03:45:37PM +0800, Zhu Guihua wrote: >

Re: [Qemu-devel] [PATCH v2 0/5] Common unplug and unplug request cb for memory and CPU hot-unplug

2015-01-28 Thread Zhu Guihua
Any comments about this series? If no, could anyone help to merge this? Thanks. Regards, Zhu On Wed, 2015-01-28 at 15:45 +0800, Zhu Guihua wrote: > Memory and CPU hot unplug are both asynchronous procedures. > When the unplug operation happens, unplug request cb is called first. > And w

[Qemu-devel] [PATCH v2 09/12] acpi, piix4: Add memory hot unplug support for piix4.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Call memory unplug cb in piix4_device_unplug_cb(). Signed-off-by: Zhu Guihua --- hw/acpi/piix4.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 8bd9007..acd054e 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi

[Qemu-devel] [PATCH v2 01/12] acpi, mem-hotplug: Use PC_DIMM_SLOT_PROP in acpi_memory_plug_cb().

2015-02-03 Thread Zhu Guihua
From: Tang Chen Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP. Reviewed-by: Igor Mammedov Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v2 10/12] acpi, ich9: Add memory hot unplug support for ich9.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Call memory unplug cb in ich9_pm_device_unplug_cb(). Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index b85eed4..3a8d712 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi

[Qemu-devel] [PATCH v2 05/12] acpi, piix4: Add memory hot unplug request support for piix4.

2015-02-03 Thread Zhu Guihua
From: Hu Tao Call memory unplug request cb in piix4_device_unplug_request_cb(). Signed-off-by: Hu Tao Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/piix4.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index

[Qemu-devel] [PATCH v2 03/12] acpi, mem-hotplug: Add acpi_memory_hotplug_sci() to rise sci for memory hotplug.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Add a new API named acpi_memory_hotplug_sci() to send memory hotplug SCI. Doing this is because this procedure will be used by other functions in the next coming patches. Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/core.c | 7 +++ hw/acpi

[Qemu-devel] [PATCH v2 12/12] acpi: Add hardware implementation for memory hot unplug.

2015-02-03 Thread Zhu Guihua
From: Tang Chen This patch adds a new bit to memory hotplug IO port indicating that ej0 has been evaluated by guest OS. And call pc-dimm unplug cb to do the real removal. Signed-off-by: Hu Tao Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- docs/specs/acpi_mem_hotplug.txt | 9

[Qemu-devel] [PATCH v2 02/12] acpi, mem-hotplug: Add acpi_memory_slot_status() to get MemStatus.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Add a new API named acpi_memory_get_slot_status_descriptor() to obtain a single memory slot status. Doing this is because this procedure will be used by other functions in the next coming patches. Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c

[Qemu-devel] [PATCH v2 00/12] QEmu memory hot unplug support

2015-02-03 Thread Zhu Guihua
Memory hot unplug are both asynchronize procedures. When the unplug operation happens, unplug request cb is called first. And when ghest OS finished handling unplug, unplug cb will be called to do the real removal of device. This series depends on the following patchset. [PATCH v2 0/5] Common unpl

[Qemu-devel] [PATCH v2 11/12] pc-dimm: Add memory hot unplug support for pc-dimm.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Implement unplug cb for pc-dimm. It remove the corresponding memory region, and unregister vmstat. At last, it calls memory unplug cb to reset memory status and do unparenting. Signed-off-by: Zhu Guihua --- hw/i386/pc.c | 20 ++-- 1 file changed, 18 insertions

[Qemu-devel] [PATCH v2 07/12] pc-dimm: Add memory hot unplug request support for pc-dimm.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Implement memory unplug request cb for pc-dimm, and call it in pc_machine_device_unplug_request_cb(). Signed-off-by: Zhu Guihua --- hw/i386/pc.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index

[Qemu-devel] [PATCH v2 08/12] acpi, mem-hotplug: Add unplug cb for memory device.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Reset all memory status, and unparent the memory device. Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c | 34 ++ hw/core/qdev.c | 2 +- include/hw/acpi/memory_hotplug.h | 2 ++ include/hw/qdev-core.h

[Qemu-devel] [PATCH v2 06/12] acpi, ich9: Add memory hot unplug request support for ich9.

2015-02-03 Thread Zhu Guihua
From: Tang Chen Call memory unplug request cb in ich9_pm_device_unplug_request_cb(). Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 5352e19..b85eed4 100644 --- a/hw/acpi/ich9.c

[Qemu-devel] [PATCH v2 04/12] acpi, mem-hotplug: Add unplug request cb for memory device.

2015-02-03 Thread Zhu Guihua
. Add a new bool member named is_removing to MemStatus indicating that the memory slot is being removed. Set it to true in acpi_memory_unplug_request_cb(), and send SCI to guest. Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c | 16 include

Re: [Qemu-devel] [PATCH v2 00/12] QEmu memory hot unplug support

2015-02-04 Thread Zhu Guihua
On Wed, 2015-02-04 at 11:28 +0100, Michael S. Tsirkin wrote: > Re: subject - it's really QEMU - not QEmu. > > you have this in code as well, so I'm guessing you didn't > run your patches through checkpatch.pl. Please do > and fix fallout if any. I do it now, and I find warnings about this. I will

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-02-05 Thread Zhu Guihua
Welcome to test, Thanks. Regards, Zhu > > On Wed, Jan 14, 2015 at 3:44 PM, 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

Re: [Qemu-devel] [RESEND PATCH v4 1/6] acpi, mem-hotplug: Add acpi_memory_slot_status() to get MemStatus

2015-03-18 Thread Zhu Guihua
On 03/16/2015 09:58 PM, Michael S. Tsirkin wrote: On Mon, Mar 16, 2015 at 04:58:13PM +0800, Zhu Guihua wrote: From: Tang Chen Add a new API named acpi_memory_slot_status() to obtain a single memory slot status. Doing this is because this procedure will be used by other functions in the next

Re: [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug

2015-03-23 Thread Zhu Guihua
On 03/16/2015 10:59 PM, Igor Mammedov wrote: [...] diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 1e9ec39..ef847e2 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -29,6 +29,7 @@ External(MEMORY_S

Re: [Qemu-devel] [libvirt] [RFC PATCH v2 00/12] qemu: add support to hot-plug/unplug cpu device

2015-03-24 Thread Zhu Guihua
:53:13 +0800, Zhu Guihua wrote: Hi all, Any comments about this series? I'm not sure whether this series' method to support cpu hotplug in libvirt is reasonable, so could anyone give more suggestions about this function? Thanks. Well, as Dan pointed out in his review for this series an

Re: [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug

2015-03-24 Thread Zhu Guihua
On 03/23/2015 08:47 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 18:59:28 +0800 Zhu Guihua wrote: On 03/16/2015 10:59 PM, Igor Mammedov wrote: [...] diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 1e9ec39..ef847e2 100644 --- a/hw/i386/acpi-dsdt

Re: [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug

2015-03-24 Thread Zhu Guihua
On 03/16/2015 10:59 PM, Igor Mammedov wrote: On Mon, 16 Mar 2015 16:58:18 +0800 Zhu Guihua wrote: This patch adds a new bit to memory hotplug IO port indicating that actually bit was added in 2/6 where is_removing had been added. EJ0 has been evaluated by guest OS. And call pc-dimm unplug

Re: [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug

2015-03-24 Thread Zhu Guihua
On 03/24/2015 06:31 PM, Igor Mammedov wrote: On Tue, 24 Mar 2015 17:38:53 +0800 Zhu Guihua wrote: On 03/16/2015 10:59 PM, Igor Mammedov wrote: On Mon, 16 Mar 2015 16:58:18 +0800 Zhu Guihua wrote: This patch adds a new bit to memory hotplug IO port indicating that actually bit was added

Re: [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug

2015-03-24 Thread Zhu Guihua
On 03/24/2015 06:26 PM, Igor Mammedov wrote: On Tue, 24 Mar 2015 17:34:29 +0800 Zhu Guihua wrote: On 03/23/2015 08:47 PM, Igor Mammedov wrote: On Mon, 23 Mar 2015 18:59:28 +0800 Zhu Guihua wrote: On 03/16/2015 10:59 PM, Igor Mammedov wrote: [...] diff --git a/hw/i386/acpi-dsdt-mem

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

2015-03-27 Thread Zhu Guihua
Add specification about how to use memory hot unplug, and add a flow diagram to explain memory hot unplug process. Signed-off-by: Zhu Guihua --- docs/memory-hotplug.txt | 24 docs/specs/acpi_mem_hotplug.txt | 16 +++- 2 files changed, 35 insertions

[Qemu-devel] [PATCH v5 0/7] QEMU memory hot unplug support

2015-03-27 Thread Zhu Guihua
-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 (4): docs: update documentation for

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

2015-03-27 Thread Zhu Guihua
When memory hot unplug fails, this patch adds support to send QMP event to notify mgmt about this failure. Signed-off-by: Zhu Guihua --- docs/qmp/qmp-events.txt | 17 + hw/acpi/memory_hotplug.c | 8 +++- monitor.c| 1 + qapi/event.json | 14

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

2015-03-27 Thread Zhu Guihua
From: Tang Chen Add a new API named acpi_memory_slot_status() to obtain a single memory slot status. Doing this is because this procedure will be used by other functions in the next coming patches. Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua --- hw/acpi/memory_hotplug.c | 34

  1   2   3   >