[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 029/103] pc: propagate memory hotplug event to ACPI d
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 029/103] pc: propagate memory hotplug event to ACPI device |
Date: |
Tue, 17 Jun 2014 20:37:59 +0300 |
From: Igor Mammedov <address@hidden>
Notify PIIX4_PM/ICH9LPC device about hotplug event,
so that it would send SCI to guest notifying about
newly added memory.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/pc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 538a8db..ffecb33 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1553,6 +1553,7 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int slot;
+ HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
MachineState *machine = MACHINE(hotplug_dev);
@@ -1595,9 +1596,18 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev,
}
trace_mhp_pc_dimm_assigned_slot(slot);
+ if (!pcms->acpi_dev) {
+ error_setg(&local_err,
+ "memory hotplug is not enabled: missing acpi device");
+ goto out;
+ }
+
memory_region_add_subregion(&pcms->hotplug_memory,
addr - pcms->hotplug_memory_base, mr);
vmstate_register_ram(mr, dev);
+
+ hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
+ hhc->plug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
out:
error_propagate(errp, local_err);
}
--
MST
- [Qemu-devel] [PULL 020/103] acpi: memory hotplug ACPI hardware implementation, (continued)
- [Qemu-devel] [PULL 020/103] acpi: memory hotplug ACPI hardware implementation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 021/103] trace: add acpi memory hotplug IO region events, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 022/103] trace: pc: add PC_DIMM slot & address allocation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 012/103] pc: initialize memory hotplug address space, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 024/103] acpi:piix4: add memory hotplug handling, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 023/103] acpi:piix4: allow plug/unlug callbacks handle not only PCI devices, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 025/103] pc: ich9 lpc: make it work with global/compat properties, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 016/103] pc: add memory hotplug handler to PC_MACHINE, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 026/103] acpi:ich9: add memory hotplug handling, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 027/103] pc: migrate piix4 & ich9 MemHotplugState, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 029/103] pc: propagate memory hotplug event to ACPI device,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 030/103] pc: ACPI BIOS: implement memory hotplug interface, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 031/103] pc: add "hotplug-memory-region-size" property to PC_MACHINE, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 028/103] pc: add acpi-device link to PCMachineState, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 033/103] pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX and Q35 machines, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 037/103] virtio: Drop superfluous conditionals around g_strdup(), Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 039/103] ich: get rid of spaces in type name, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 040/103] pc: q35: acpi: report error to user on unsupported unplug request, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 038/103] qtest: fix hex2nib for capital characters, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 032/103] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 041/103] migration: export SELF_ANNOUNCE_ROUNDS, Michael S. Tsirkin, 2014/06/17