All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] ACPI memory hotplug
@ 2012-04-19 14:08 Vasilis Liaskovitis
  2012-04-19 14:08 ` [RFC PATCH 1/9][SeaBIOS] Add SSDT memory device support Vasilis Liaskovitis
                   ` (11 more replies)
  0 siblings, 12 replies; 38+ messages in thread
From: Vasilis Liaskovitis @ 2012-04-19 14:08 UTC (permalink / raw)
  To: qemu-devel, kvm, seabios; +Cc: gleb, avi, Vasilis Liaskovitis

This is a prototype for ACPI memory hotplug on x86_64 target. Based on some
earlier work and comments from Gleb.

Memslot devices are modeled with a new qemu command line 

"-memslot id=name,start=start_addr,size=sz,node=pxm"

user is responsible for defining memslots with meaningful start/size values,
e.g. not defining a memory slot over a PCI-hole. Alternatively, the start size
could also be handled/assigned automatically from the specific emulated hardware
(for hw/pc.c PCI hole is currently [below_4g_mem_size, 4G), so hotplugged memory
should start from max(4G, above_4g_mem_size).

Node is defining numa proximity for this memslot. When not defined it defaults
to zero.

e.g. "-memslot id=hot1,start=4294967296,size=536870912,node=0"
will define a 512M memory slot starting at physical address 4G, belonging to numa node 0.

Memory slots are added or removed with a new hmp command "memslot":
Hot-add syntax: "memslot id add"
Hot-remove syntax: "memslot id delete"

- All memslots are initially unpopulated. Memslots are currently modeling only
hotplug-able memory slots i.e. initial system memory is not modeled with
memslots. The concept could be generalized to include all memory though, or it
could more closely follow kvm-memory slots.

- Memslots are abstracted as qdevices attached to the main system bus. However,
memory hotplugging has its own side channel ignoring main_system_bus's hotplug
incapability. A cleaner integration would be needed. What's  the preferred
way of modeling memory devices in qom? Would it be better to attach memory
devices as children-links of an acpi-capable device (in the pc case acpi_piix4)
instead of the system bus?

- Refcounting memory slots has been discussed (but is not included in this 
series yet). Depopulating a memory region happens on a guestOS _EJ callback,
which means the guestOS will not be using the region anymore. However, guest
addresses from the depopulated region need to also be unmapped from the qemu
address space using cpu_physical_memory_unmap(). Does memory_region_del_subregion()
or some other memory API call guarantee that a memoryregion has been unmapped
from qemu's address space?

- What is the expected behaviour of hotplugged memory after a reboot? Is it
supposed to be persistent after reboots? The last 2 patches in the series try to
make hotplugged memslots persistent after reboot by creating and consulting e820
map entries.  A better solution is needed for hot-remove after a reboot, because
e820 entries can be merged.

series is based on uq/master for qemu-kvm, and master for seabios. Can be found
also at:


Vasilis Liaskovitis (9):
  Seabios: Add SSDT memory device support
  Seabios, acpi: Implement acpi-dsdt functions for memory hotplug.
  Seabios, acpi: generate hotplug memory devices.
  Implement memslot device abstraction
  acpi_piix4: Implement memory device hotplug registers and handlers. 
  pc: pass paravirt info for hotplug memory slots to BIOS
  Implement memslot command-line option and memslot hmp monitor command
  pc: adjust e820 map on hot-add and hot-remove
  Seabios, acpi: enable memory devices if e820 entry is present

 Makefile.objs   |    2 +-
 hmp-commands.hx |   15 ++++
 hw/acpi_piix4.c |  103 +++++++++++++++++++++++++++-
 hw/memslot.c    |  201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/memslot.h    |   44 ++++++++++++
 hw/pc.c         |   87 ++++++++++++++++++++++--
 hw/pc.h         |    1 +
 monitor.c       |    8 ++
 monitor.h       |    1 +
 qemu-config.c   |   25 +++++++
 qemu-options.hx |    8 ++
 sysemu.h        |    1 +
 vl.c            |   44 ++++++++++++-
 13 files changed, 528 insertions(+), 12 deletions(-)
 create mode 100644 hw/memslot.c
 create mode 100644 hw/memslot.h

 create mode 100644 src/ssdt-mem.dsl
 src/acpi-dsdt.dsl |   68 ++++++++++++++++++++++-
 src/acpi.c        |  155 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 src/memmap.c      |   15 +++++
 src/ssdt-mem.dsl  |   66 ++++++++++++++++++++++
 4 files changed, 298 insertions(+), 6 deletions(-)
 create mode 100644 src/ssdt-mem.dsl

-- 
1.7.9


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2012-04-26  0:54 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 14:08 [RFC PATCH 0/9] ACPI memory hotplug Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 1/9][SeaBIOS] Add SSDT memory device support Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 2/9][SeaBIOS] Implement acpi-dsdt functions for memory hotplug Vasilis Liaskovitis
2012-04-20 10:55   ` Igor Mammedov
2012-04-20 14:11     ` [Qemu-devel] " Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 3/9][SeaBIOS] acpi: generate hotplug memory devices Vasilis Liaskovitis
2012-04-23 23:37   ` Kevin O'Connor
2012-04-24  8:27     ` Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 4/9] Implement memslot device abstraction Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 5/9] acpi_piix4: Implement memory device hotplug registers Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 6/9] pc: pass paravirt info for hotplug memory slots to BIOS Vasilis Liaskovitis
2012-04-19 14:21   ` Avi Kivity
2012-04-20 10:33   ` Igor Mammedov
2012-04-20 16:35     ` [Qemu-devel] " Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 7/9] Implement memslot command-line option and memslot hmp command Vasilis Liaskovitis
2012-04-19 14:22   ` Avi Kivity
2012-04-19 18:10     ` Vasilis Liaskovitis
2012-04-19 14:08 ` [RFC PATCH 8/9] pc: adjust e820 map on hot-add and hot-remove Vasilis Liaskovitis
2012-04-22 13:58   ` Gleb Natapov
2012-04-23 11:27     ` Vasilis Liaskovitis
2012-04-23 11:30       ` Gleb Natapov
2012-04-19 14:08 ` [RFC PATCH 9/9][SeaBIOS] enable memory devices if e820 entry is present Vasilis Liaskovitis
2012-04-26  0:58   ` [SeaBIOS] [RFC PATCH 9/9] " Wen Congyang
2012-04-19 14:49 ` [Qemu-devel] [RFC PATCH 0/9] ACPI memory hotplug Anthony Liguori
2012-04-19 18:09   ` Vasilis Liaskovitis
2012-04-20 14:20 ` Vasilis Liaskovitis
2012-04-22 13:56 ` Gleb Natapov
2012-04-22 14:06   ` Avi Kivity
2012-04-22 14:09     ` Gleb Natapov
2012-04-22 14:13       ` Avi Kivity
2012-04-22 14:20         ` Gleb Natapov
2012-04-23 12:31           ` Vasilis Liaskovitis
2012-04-24  7:52             ` Gleb Natapov
2012-04-24  8:24               ` Vasilis Liaskovitis
2012-04-24  8:34                 ` Gleb Natapov
2012-04-23 13:31           ` Avi Kivity
2012-04-24  7:21             ` Gleb Natapov
2012-04-24  9:09               ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.