docs: update documentation for memory hot unplug

Add specification about how to use memory hot unplug, and add
a flow diagram to explain memory hot unplug process.

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>
This commit is contained in:
Zhu Guihua 2015-04-27 16:47:15 +08:00 committed by Michael S. Tsirkin
parent 850d00700b
commit 4fccb4834d
2 changed files with 61 additions and 4 deletions

View file

@ -2,7 +2,7 @@ QEMU<->ACPI BIOS memory hotplug interface
--------------------------------------
ACPI BIOS GPE.3 handler is dedicated for notifying OS about memory hot-add
events.
and hot-remove events.
Memory hot-plug interface (IO port 0xa00-0xa17, 1-4 byte access):
---------------------------------------------------------------
@ -42,3 +42,43 @@ Selecting memory device slot beyond present range has no effect on platform:
ignored
- read accesses to memory hot-plug registers not documented above return
all bits set to 1.
Memory hot remove process diagram:
----------------------------------
+-------------++-----------------------++------------------+
|1.QEMU||2.QEMU||3.QEMU|
|device_del+---->+deviceunplugrequest+----->+SendSCItoguest,|
|||cb||returncontrolto|
+-------------++-----------------------+|management|
+------------------+
+---------------------------------------------------------------------+
+---------------------++-------------------------+
|OSPM:|removeevent|OSPM:|
|sendEjectRequest,||Scanmemorydevices|
|clearremoveevent+<-------------+foreventflags|
||||
+---------------------++-------------------------+
|
|
+---------v--------++-----------------------+
|GuestOS:|success|OSPM:|
|processEjection+----------->+Execute_EJ0method, |
|request ||setejectbitinflags|
+------------------++-----------------------+
|failure|
vv
+------------------------++-----------------------+
|OSPM:||QEMU:|
|setOSTevent&status||calldeviceunplugcb|
|fields|||
+------------------------++-----------------------+
||
vv
+------------------++-------------------+
|QEMU:||QEMU:|
|SendOSTQMPevent||Senddevicedeleted|
|||QMPevent|
+------------------+||
+-------------------+