|
@@ -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 |
|
|
|
+ +------------------+ | |
|
|
|
+ +-------------------+
|