,maxmem=8G
(2) Hotplug memory
It will fail and reports:
"'DIMM property node has value 0' which exceeds the number of numa nodes: 0"
I rememberd Tang Chen had a patch for this bug, this is what Andrey suggested:
I thnk that there should be no
cases when dimm is plugged (and
reproduce:
(1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G
(2) Hotplug memory
It will fail and reports:
"'DIMM property node has value 0' which exceeds the number of numa nodes: 0"
I rememberd Tang Chen had a patch for this bug, this is what Andrey suggested:
I thnk that there s
On 09/23/2014 04:40 PM, Igor Mammedov wrote:
..
It's fine to use SRAT for these purposes on baremetal NUMA systems since
due to used chipset constrains it's possible statically allocate ranges
for every possible DIMM socket.
However SRAT(which is optional table BTW) entries are not mandatory
On 09/23/2014 06:11 PM, zhanghailiang wrote:
On 2014/9/23 16:58, Tang Chen wrote:
On 09/23/2014 04:40 PM, Igor Mammedov wrote:
..
It's fine to use SRAT for these purposes on baremetal NUMA systems
since
due to used chipset constrains it's possible statically allocate ranges
Hi Igor, Zhang,
On 09/12/2014 09:17 PM, Igor Mammedov wrote:
..
Actually, this patch also fix the bug *when hotplug memory failing in
the place where after pc_dimm_plug but before the end of device_set_realized,
it does not clear the work done by pc_dimm_plug*.
For there is no callback like
On 09/24/2014 07:48 PM, Igor Mammedov wrote:
it to be called for actual device removal and
will allow to separate request and removal handling
phases of x86-CPU devices and also it's a handler
to be called for synchronously removable devices.
Signed-off-by: Igor Mammedov
---
unplug handling fo
On 09/24/2014 07:47 PM, Igor Mammedov wrote:
it would allow transparently switch detection if Bus
is hotpluggable from allow_hotplug field to hotplug_handler
link and drop allow_hotplug field once all users are
converted to hotplug handler API.
Signed-off-by: Igor Mammedov
---
hw/core/qdev.c
On 09/24/2014 07:48 PM, Igor Mammedov wrote:
Check if 'handler' implements HOTPLUG_HANDLER interface
before setting it, if it's not then do nothing and leave
bus not hotpluggable.
That would allow to reuse the same code for creating bus
for example 'scsi_bus_new()' for both hotpluggable and not
From: Hu Tao
Implement device unplug callback for PCMachine. And it now only support
pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced
in previous patches.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 32
1
From: Hu Tao
Implement unrealize function for pc-dimm device. It delete subregion from
hotplug region, and delete ram address range from guest ram list.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/hw/mem
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 25 +
hw/acpi/piix4.c
ister when triggering memory
hot-remove in guest.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 52 ++--
include/hw/acpi/acpi.h | 14 +++
include/hw/acpi/memory_hotplug.h | 1 +
3 files changed, 65 insert
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/ssdt-mem.dsl | 5 +
hw/i386/ssdt-misc.dsl| 15 ++-
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed, 21
ess devices.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
acpi: Add hardware implementation for memory hot unplug.
pc, acpi bios: Add memory hot unplug interface.
monitor: Add memory hot unplug support for device_del command.
Tang Chen (1):
acpi, ich9: Add memory hot unp
From: Hu Tao
Implement find_peripheral_device() to find bus-less device, and call it in
qmp_device_del() so that device_del command will be able to remove memory
device.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
include/qom/object.h | 1 +
qdev-monitor.c | 26
From: Hu Tao
Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine
callback introduced in previous patch.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/core/qdev.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
From: Hu Tao
Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine
callback introduced in previous patch.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/core/qdev.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
From: Hu Tao
Implement unrealize function for pc-dimm device. It delete subregion from
hotplug region, and delete ram address range from guest ram list.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/hw/mem
From: Hu Tao
Implement device unplug callback for PCMachine. And it now only support
pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced
in previous patches.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 32
1
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/ssdt-mem.dsl | 5 +
hw/i386/ssdt-misc.dsl| 15 ++-
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed, 21
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 25 +
hw/acpi/piix4.c
From: Hu Tao
Implement find_peripheral_device() to find bus-less device, and call it in
qmp_device_del() so that device_del command will be able to remove memory
device.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
include/qom/object.h | 1 +
qdev-monitor.c | 26
ister when triggering memory
hot-remove in guest.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 52 ++--
include/hw/acpi/acpi.h | 14 +++
include/hw/acpi/memory_hotplug.h | 1 +
3 files changed, 65 insert
ess devices.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
acpi: Add hardware implementation for memory hot unplug.
pc, acpi bios: Add memory hot unplug interface.
monitor: Add memory hot unplug support for device_del command.
Tang Chen (1):
acpi, ich9: Add memory hot unp
de should be initialized to -1. This is for users who do not use
NUMA.
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 2 +-
include/hw/mem/pc-dimm.h | 2 +-
include/sysemu/sysemu.h | 6 ++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc
de should be initialized to -1. This is for users who do not use
NUMA.
Signed-off-by: Tang Chen
---
Change log v1 -> v2:
1. Simplify the comment.
2. Move the definition of NO_NODE_ID near where it is used.
hw/mem/pc-dimm.c | 7 ++-
include/hw/mem/pc-dimm.h | 2 +-
2 files changed,
piix4_acpi_system_hot_add_init() handles not only memory hot add initialization,
but the whole memory hotplug initialization. So rename it to
piix4_acpi_system_hotplug_init().
Signed-off-by: Tang Chen
---
hw/acpi/piix4.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
ine.
qdev: Add memory hot unplug support for bus-less devices.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
pc, acpi bios: Add memory hot unplug interface.
monitor: Add memory hot unplug support for device_del command.
Tang Chen (2):
acpi, ich9: Add memory hot unp
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 25 +
hw/acpi/piix4.c
From: Hu Tao
Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine
callback introduced in previous patch.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/core/qdev.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
From: Hu Tao
Implement device unplug callback for PCMachine. And it now only support
pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced
in previous patches.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 32
1
Define device insertion OST event and status, and add a function to
handle memory insertion.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 18 ++
include/hw/acpi/acpi.h | 10 +-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/hw/acpi
From: Hu Tao
Implement find_peripheral_device() to find bus-less device, and call it in
qmp_device_del() so that device_del command will be able to remove memory
device.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
include/qom/object.h | 1 +
qdev-monitor.c | 23
ACPI hardware operations. So this patch-set introduces a wait
condition variable to synchronize these two threads.
Tang Chen (4):
Use macro to define ACPI notification event.
Add event handling for memory device insertion.
Introduce wait condition to catch guest OS memory hotplug error.
Handle m
From: Hu Tao
Implement unrealize function for pc-dimm device. It delete subregion from
hotplug region, and delete ram address range from guest ram list.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/hw/mem
vcpu thread after OST status is written to
ACPI register, this patch checks OST status, and report an error to users,
and cancel hotplug progress if necessary.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 83 +---
1 file changed, 79 inser
ing memory
hot-remove in guest.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 62 ++--
include/hw/acpi/acpi.h | 14 +
include/hw/acpi/memory_hotplug.h | 1 +
3 files changed, 74 insertions(+), 3 deletion
signal QEmu when OST
status is written into ACPI register. This is used by the following patch.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/ssdt-mem.dsl | 5 +
hw/i386/ssdt-misc.dsl| 15 ++-
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed, 21
According to ACPI spec, device object notification values define insertion
request (Device Check) as 1, and ejection request as 3.
Use macro to define them.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 7 +--
include/hw/acpi/acpi.h | 5 -
2 files changed, 9 insertions
t for pc machine.
qdev: Add memory hot unplug support for bus-less devices.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
pc, acpi bios: Add memory hot unplug interface.
monitor: Add memory hot unplug support for device_del command.
Tang Chen (6):
acpi, mem-hotp
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/piix4.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/acpi
From: Hu Tao
Implement device unplug callback for PCMachine. And it now only support
pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced
in previous patches.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 31 +++
1 file
Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ed39241..c6580da 10064
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
---
hw/acpi/memory_hotplug.c | 27 +++
1 file
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
---
hw/acpi/memory_hotplug.c | 12
1 file changed, 8 insertions(+), 4 deletions
Add a new bool member named is_removing to MemStatus indicating that
the memory solt is being removed. Set it to true in acpi_memory_unplug_cb(),
and send SCI to guest.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 15 +++
include/hw/acpi/memory_hotplug.h | 3
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/ssdt-mem.dsl | 5 +
hw/i386/ssdt-misc.dsl| 13 -
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed, 19
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
From: Hu Tao
Implement bus-less device hot-remove in qdev_unplug().
For now, only pc-dimm is bus-less device, but this is generic handling
that applies to other devices.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/core/qdev.c | 8
1 file changed, 8 insertions(+)
diff
From: Hu Tao
Implement unrealize function for pc-dimm device. It remove subregion from
hotplug region, and delete ram address range from guest ram list.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/hw/mem
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
docs/specs/acpi_mem_hotplug.txt | 8 ++--
hw/acpi/memory_hotplug.c| 14 +++---
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/docs/specs/acpi_mem_hotplug.txt b/docs/specs/acpi_mem_hotplug.txt
index 1290994..5
From: Hu Tao
Implement find_peripheral_device() to find bus-less device, and call it in
qmp_device_del() so that device_del command will be able to remove memory
device.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
qdev-monitor.c | 46 ++
1
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
---
hw/acpi/memory_hotplug.c | 12
1 file changed, 8 insertions(+), 4 deletions
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/piix4.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/acpi
k.
Hu Tao (4):
acpi, piix4: Add memory hot unplug support for piix4.
pc: Add memory hot unplug support for pc machine.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
pc, acpi bios: Add memory hot unplug interface.
Tang Chen (6):
acpi, mem-hotplug: Use PC_DIMM
Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ed39241..c6580da 10064
Add a new bool member named is_removing to MemStatus indicating that
the memory solt is being removed. Set it to true in acpi_memory_unplug_cb(),
and send SCI to guest.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 15 +++
include/hw/acpi/memory_hotplug.h | 3
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/ssdt-mem.dsl | 5 +
hw/i386/ssdt-misc.dsl| 13 -
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed, 19
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
---
hw/acpi/memory_hotplug.c | 27 +++
1 file
From: Hu Tao
Implement unrealize function for pc-dimm device. It remove subregion from
hotplug region, and delete ram address range from guest ram list.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/mem/pc-dimm.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/hw/mem
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
docs/specs/acpi_mem_hotplug.txt | 8 ++--
hw/acpi/memory_hotplug.c| 14 +++---
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/docs/specs/acpi_mem_hotplug.txt b/docs/specs/acpi_mem_hotplug.txt
index 1290994..5
From: Hu Tao
Implement device unplug callback for PCMachine. And it now only support
pc-dimm hot-remove. The callback will call piix4 or ich9 callbacks introduced
in previous patches.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 31 +++
1 file
On 10/29/2014 05:37 PM, Igor Mammedov wrote:
On Wed, 22 Oct 2014 18:00:02 +0800
Tang Chen wrote:
This patch-set implements memory hot-remove for QEmu.
Rebased on Igor's asynchronize hotplug framework (qemu v2.1.2, the
latest).
Approach: QEmu sets GPE status bit, then triggers SCI to n
Hi Igor,
On 09/04/2014 08:15 PM, Igor Mammedov wrote:
On Wed, 27 Aug 2014 16:08:32 +0800
Tang Chen wrote:
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by
Hi Igor,
On 09/04/2014 08:25 PM, Igor Mammedov wrote:
On Wed, 27 Aug 2014 16:08:33 +0800
Tang Chen wrote:
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
Hi Igor,
On 09/04/2014 09:22 PM, Igor Mammedov wrote:
On Wed, 27 Aug 2014 16:08:35 +0800
Tang Chen wrote:
From: Hu Tao
Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine
callback introduced in previous patch.
subject/commit message doesn't need to me
Hi Igor,
On 09/04/2014 10:20 PM, Igor Mammedov wrote:
..
+
+acpi_handle_ost_event(mdev);
_OST is optional and OSPM doesn't have to call it at all,
it was already discussed on list and using _OST for device removal
was evaluated as not usable.
We use _OST here as supplementary status
provided with -device/device_add command, attempt to
use it or fail command if it's already occupied or falls inside
of an existing DimmDevice memory region.
Signed-off-by: Igor Mammedov
Signed-off-by: Tang Chen
---
hw/i386/pc.c | 16 +++-
hw/mem/dimm.c | 70 +
request cb.
So this patch set introduces these commom functions as part1, and memory
and CPU hot-unplug will come soon as part 2 and 3.
This patch-set is based on QEmu 2.2
Tang Chen (5):
acpi, pc: Add hotunplug request cb for pc machine.
acpi, ich9: Add hotunplug request cb for ich9.
acpi, pc
Memory and CPU hot unplug are both asynchronize procedures.
They both need unplug request cb when the unplug operation happens.
This patch adds hotunplug request cb for ich9, and memory and CPU
hot unplug will base on it.
---
hw/acpi/ich9.c | 7 +++
hw/isa/lpc_ich9.c | 5 +++--
i
Memory and CPU 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 patch adds hotunplug cb for pc machine, and memory and CPU
h
Memory and CPU 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 patch adds hotunplug cb for ich9, and memory and CPU
hot unp
Memory and CPU 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 patch adds hotunplug cb for piix4, and memory and CPU
hot un
Memory and CPU hot unplug are both asynchronous procedures.
They both need unplug request callback to initiate unplug operation.
Add unplug handler to pc machine that will be used by following
CPU and memory unplug patches.
---
hw/i386/pc.c | 8
1 file changed, 8 insertions(+)
diff --gi
following patchset.
[PATCH] Common unplug and unplug request cb for memory and CPU hot-unplug.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg272745.html
Hu Tao (2):
acpi, piix4: Add memory hot unplug request support for piix4.
pc, acpi bios: Add memory hot unplug interface.
Tang Chen (11
Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ed39241..c6580da 10064
Call memory unplug request cb in ich9_pm_device_unplug_request_cb().
---
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 c48d176..841f57d 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -304,8 +304,14 @@ void i
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
---
hw/acpi/memory_hotplug.c | 27 +++
1 file
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
---
hw/acpi/memory_hotplug.c | 16
include/hw/acpi/memory_hotplug.h | 4
2 files
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
---
hw/acpi/memory_hotplug.c | 12
1 file changed, 8 insertions(+), 4 deletions
From: Hu Tao
Call memory unplug request cb in piix4_device_unplug_request_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
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 4407388..f809c3a 100644
--- a/hw
Implement memory unplug request cb for pc-dimm, and call it in
pc_machine_device_unplug_request_cb().
---
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 0f3b1e0..f501f1f 100644
--- a/hw/i386/pc.c
+++
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 | 25 +++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/hw/i386/p
Call memory unplug cb in ich9_pm_device_unplug_cb().
---
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 841f57d..0a8e757 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -317,8 +317,14 @@ void ich9_pm_device_un
Call memory unplug cb in piix4_device_unplug_cb().
---
hw/acpi/piix4.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index f809c3a..4ae4867 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -377,8 +377,16 @@ static void piix
Reset all memory status, and unparent the memory device.
---
hw/acpi/memory_hotplug.c | 16
include/hw/acpi/memory_hotplug.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 3d8e398..2b0c8ca 100644
--- a/hw/
From: Hu Tao
This patch implements MEMORY_SLOT_EJECT_METHOD according to ACPI spec.
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/i386/acpi-dsdt-mem-hotplug.dsl | 11 ++-
hw/i386/ssdt-mem.dsl | 5 +
include/hw/acpi/pc-hotplug.h | 2 ++
3 files changed
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
---
docs/specs/acpi_mem_hotplug.txt | 8 ++--
hw/acpi/memory_hotplug.c| 23
Replace string "slot" in acpi_memory_plug_cb() with MACRO PC_DIMM_SLOT_PROP.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ed39241..c6580da 10064
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
---
hw/acpi/memory_hotplug.c | 27 +++
1 file
Add a new bool member named is_removing to MemStatus indicating that
the memory solt is being removed. Set it to true in acpi_memory_unplug_cb(),
and send SCI to guest.
Signed-off-by: Tang Chen
---
hw/acpi/memory_hotplug.c | 15 +++
include/hw/acpi/memory_hotplug.h | 3
From: Hu Tao
Implement acpi_memory_unplug_cb(), sending an sci to guest to trigger
memory hot-remove, and call it in piix4_device_unplug_cb().
Signed-off-by: Hu Tao
Signed-off-by: Tang Chen
---
hw/acpi/piix4.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/acpi
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
---
hw/acpi/memory_hotplug.c | 12
1 file changed, 8 insertions(+), 4 deletions
Implement ich9_pm_device_unplug_cb() to support memory hot-remove,
calling acpi_memory_unplug_cb(). And itself will be called in
ich9_device_unplug_cb().
Signed-off-by: Tang Chen
---
hw/acpi/ich9.c | 12
hw/isa/lpc_ich9.c | 5 +++--
include/hw/acpi/ich9.h | 2 ++
3
x4.
pc: Add memory hot unplug support for pc machine.
pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.
pc, acpi bios: Add memory hot unplug interface.
Tang Chen (6):
acpi, mem-hotplug: Use PC_DIMM_SLOT_PROP in acpi_memory_plug_cb().
acpi, mem
1 - 100 of 145 matches
Mail list logo