summaryrefslogtreecommitdiffstats
path: root/hw/acpi/memory_hotplug.c
diff options
context:
space:
mode:
authorZhu Guihua2015-05-13 11:21:36 +0200
committerMichael S. Tsirkin2015-06-03 18:19:16 +0200
commitca9b46bcecc0f06882eec1b152b71f93a066da79 (patch)
tree2032515389c77fe993967b79f864f33d751d2274 /hw/acpi/memory_hotplug.c
parentvirtio: 64bit features fixups. (diff)
downloadqemu-ca9b46bcecc0f06882eec1b152b71f93a066da79.tar.gz
qemu-ca9b46bcecc0f06882eec1b152b71f93a066da79.tar.xz
qemu-ca9b46bcecc0f06882eec1b152b71f93a066da79.zip
acpi: add acpi_send_gpe_event() to rise sci for hotplug
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.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'hw/acpi/memory_hotplug.c')
-rw-r--r--hw/acpi/memory_hotplug.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 34cef1e5c3..2ff0d5ce1b 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -241,8 +241,7 @@ void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st,
mdev->is_inserting = true;
/* do ACPI magic */
- ar->gpe.sts[0] |= ACPI_MEMORY_HOTPLUG_STATUS;
- acpi_update_sci(ar, irq);
+ acpi_send_gpe_event(ar, irq, ACPI_MEMORY_HOTPLUG_STATUS);
return;
}
@@ -260,8 +259,7 @@ void acpi_memory_unplug_request_cb(ACPIREGS *ar, qemu_irq irq,
mdev->is_removing = true;
/* Do ACPI magic */
- ar->gpe.sts[0] |= ACPI_MEMORY_HOTPLUG_STATUS;
- acpi_update_sci(ar, irq);
+ acpi_send_gpe_event(ar, irq, ACPI_MEMORY_HOTPLUG_STATUS);
}
void acpi_memory_unplug_cb(MemHotplugState *mem_st,