diff options
author | Zhu Guihua <zhugh.fnst@cn.fujitsu.com> | 2015-04-27 16:47:21 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-04-27 21:09:07 +0200 |
commit | c06b2ffb02bfcc642c67300d2c4dffd5aa54932b (patch) | |
tree | 92df290e7b207f928e8e50cf298be347a391294e /hw/i386/acpi-build.c | |
parent | 660e8ec70065c8b1fd68b2cb137de16d831959f4 (diff) | |
download | qemu-c06b2ffb02bfcc642c67300d2c4dffd5aa54932b.zip qemu-c06b2ffb02bfcc642c67300d2c4dffd5aa54932b.tar.gz qemu-c06b2ffb02bfcc642c67300d2c4dffd5aa54932b.tar.bz2 |
acpi: add hardware implementation for memory hot unplug
- 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 <imammedo@redhat.com>
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>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4202d76..967448a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -879,6 +879,12 @@ build_ssdt(GArray *table_data, GArray *linker, aml_append(field, /*(read) 1 if has a insert event. (write) 1 to clear event */ aml_named_field(stringify(MEMORY_SLOT_INSERT_EVENT), 1)); + aml_append(field, + /* (read) 1 if has a remove event. (write) 1 to clear event */ + aml_named_field(stringify(MEMORY_SLOT_REMOVE_EVENT), 1)); + aml_append(field, + /* initiates device eject, write only */ + aml_named_field(stringify(MEMORY_SLOT_EJECT), 1)); aml_append(scope, field); field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), aml_dword_acc, @@ -923,6 +929,12 @@ build_ssdt(GArray *table_data, GArray *linker, ))); aml_append(dev, method); + method = aml_method("_EJ0", 1); + s = BASEPATH stringify(MEMORY_SLOT_EJECT_METHOD); + aml_append(method, aml_return(aml_call2( + s, aml_name("_UID"), aml_arg(0)))); + aml_append(dev, method); + aml_append(sb_scope, dev); } |