diff options
author | Zhu Guihua <zhugh.fnst@cn.fujitsu.com> | 2015-04-27 16:47:15 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-04-27 21:07:38 +0200 |
commit | 4fccb4834d0455519ff6d7a81551a8dfd360fefa (patch) | |
tree | 2237d659cf579075ebecd103516af3a989e0d87e /docs/specs | |
parent | 850d00700ba787988b6c5404e8c1a3add7141db1 (diff) |
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>
Diffstat (limited to 'docs/specs')
-rw-r--r-- | docs/specs/acpi_mem_hotplug.txt | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/docs/specs/acpi_mem_hotplug.txt b/docs/specs/acpi_mem_hotplug.txt index 12909940cc..dcc4808918 100644 --- a/docs/specs/acpi_mem_hotplug.txt +++ b/docs/specs/acpi_mem_hotplug.txt @@ -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 +---->+ device unplug request +----->+Send SCI to guest,| + | | | cb | |return control to | + +-------------+ +-----------------------+ |management | + +------------------+ + + +---------------------------------------------------------------------+ + + +---------------------+ +-------------------------+ + | OSPM: | remove event | OSPM: | + | send Eject Request, | | Scan memory devices | + | clear remove event +<-------------+ for event flags | + | | | | + +---------------------+ +-------------------------+ + | + | + +---------v--------+ +-----------------------+ + | Guest OS: | success | OSPM: | + | process Ejection +----------->+ Execute _EJ0 method, | + | request | | set eject bit in flags| + +------------------+ +-----------------------+ + |failure | + v v + +------------------------+ +-----------------------+ + | OSPM: | | QEMU: | + | set OST event & status | | call device unplug cb | + | fields | | | + +------------------------+ +-----------------------+ + | | + v v + +------------------+ +-------------------+ + |QEMU: | |QEMU: | + |Send OST QMP event| |Send device deleted| + | | |QMP event | + +------------------+ | | + +-------------------+ |