All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, seabios@seabios.org,
	gleb@redhat.com, kevin@koconnor.net, avi@redhat.com,
	anthony@codemonkey.ws, imammedo@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH v2 00/21] ACPI memory hotplug
Date: Thu, 12 Jul 2012 20:04:56 +0000	[thread overview]
Message-ID: <CAAu8pHszqONgosH5fSnL-VLzede0uKm=Z48wLsy3pj-eZx_sTg@mail.gmail.com> (raw)
In-Reply-To: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com>

On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis
<vasilis.liaskovitis@profitbricks.com> wrote:
> This is v2 of the ACPI memory hotplug prototype for x86_64 target.

I think the concept of DIMMs (what about SIMMs? SODIMMs? I liked
memslot) would be useful for most targets, but hotplugging may be
limited to x86 only. It would be nice to keep these two separate or as
loosely coupled as possible.

>
> Changes v1->v2
>
> - memory map is automatically calculated for hotplug dimms. Dimms are added from
> top-of-memory skipping the pci hole at [PCI_HOLE_START, 4G).
> - Renamed from "-memslot" to "-dimm". Commands changed to "dimm_add", "dimm_del".
> - Seabios ejection array reduced to a byte. Use extraction macros for dimm ssdt.
> - additional SRAT paravirt info does not break previous SRAT fw_cfg layout.
> - Documentation of new acpi_piix4 registers and paravirt data.
> - add ACPI _OST support for _OST enabled guests. This allows qemu to receive
> notification for success / failure of memory hot-add and hot-remove operations.
> Guest needs to support _OST (https://lkml.org/lkml/2012/6/25/321)
> - add monitor info command to report total guest memory (initial + hot-added)
> - add command line options and monitor commands for batch dimm creation/population
>
> Overview:
>
> Dimm devices are modeled with a new qemu command line
>
> "-dimm id=name,size=sz,node=pxm,populated=on|off"
>
> As already mentioned, the starting physical address for all dimms is calculated
> automatically from top of memory, skipping the pci hole at [PCI_HOLE_START, 4G).
> Node is defining numa proximity for this dimm. When not defined it defaults
> to zero.
> "-dimm id=dimm0,size=512M,node=0,populated=off"
> will define a 512M memory slot belonging to numa node 0.
>
> Dimms are added or removed with a new hmp command "dimm_add/dimm_del":
> Hot-add syntax: "dimm_add id"
> Hot-remove syntax: "dimm_del id"
>
> Issues:
>
> - Live migration works as long as populated field is changed to "on" for
> hotplugged dimms at the destination qemu command line (patch 12/21 lifts
> this requirement). The DimmState structure does not yet define a
> VMStateDescription, but i assume this is the preferred way to pass state
> for migration.
>
> - Dimms 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 is still needed, probably attaching memory
> devices as children-links of an acpi-capable device (in the pc case acpi_piix4)
> instead of the system bus (TBD). Then device_add/device_del instead of new
> commands can hopefully be used.
>
> Comments/review welcome.
>
> series is based on uq/master for qemu-kvm, and master for seabios. Can be found
> also at:
> http://github.com/vliaskov/qemu-kvm/commits/memhp-v2
> http://github.com/vliaskov/seabios/commits/memhp-v2
>
> Vasilis Liaskovitis (14):
>   dimm: Implement memory device abstraction
>   acpi_piix4: Implement memory device hotplug registers
>   pc: calculate dimm physical addresses and adjust memory map
>   pc: Add dimm paravirt SRAT info
>   Implement "-dimm" command line option
>   Implement dimm_add and dimm_del commands for hmp and qmp
>   fix live-migration when "populated=on" is missing
>   Implement memory hotplug notification lists
>   acpi_piix4: _OST dimm support
>   acpi_piix4: Update dimm state on VM reboot
>   acpi_piix4: Update dimm bitmap state on hot-remove fail
>   Implement "info memtotal" and "query-memtotal"
>   Implement -dimms, -dimmspop command line options
>   Implement mem_increase, mem_decrease hmp/qmp commands
>
>  arch_init.c                 |   23 ++-
>  docs/specs/acpi_hotplug.txt |   46 +++++
>  docs/specs/fwcfg.txt        |   28 +++
>  hmp-commands.hx             |   67 +++++++
>  hmp.c                       |   24 +++
>  hmp.h                       |    2 +
>  hw/Makefile.objs            |    2 +-
>  hw/acpi_piix4.c             |  131 ++++++++++++-
>  hw/dimm.c                   |  449 +++++++++++++++++++++++++++++++++++++++++++
>  hw/dimm.h                   |   72 +++++++
>  hw/pc.c                     |   94 +++++++++-
>  hw/pc.h                     |    6 +
>  hw/pc_piix.c                |   18 ++-
>  monitor.c                   |   35 ++++
>  monitor.h                   |    5 +
>  qapi-schema.json            |   38 ++++
>  qemu-config.c               |   70 +++++++
>  qemu-options.hx             |   15 ++
>  qmp-commands.hx             |  137 +++++++++++++
>  sysemu.h                    |    1 +
>  vl.c                        |  122 ++++++++++++-
>  21 files changed, 1368 insertions(+), 17 deletions(-)
>  create mode 100644 docs/specs/acpi_hotplug.txt
>  create mode 100644 docs/specs/fwcfg.txt
>  create mode 100644 hw/dimm.c
>  create mode 100644 hw/dimm.h
>
> Vasilis Liaskovitis (7):
>   Add ACPI_EXTRACT_DEVICE* macros
>   Add SSDT memory device support
>   acpi-dsdt: Implement functions for memory hotplug.
>   acpi: generate hotplug memory devices.
>   pciinit: Fix pcimem_start value
>   acpi_dsdt: Support _OST dimm method
>   acpi_dsdt: Revert internal dimm state on _OST failure
>
>  Makefile              |    2 +-
>  src/acpi-dsdt.dsl     |  120 ++++++++++++++++++++++++++++++++++++-
>  src/acpi.c            |  158 +++++++++++++++++++++++++++++++++++++++++++++++--
>  src/pciinit.c         |    2 +-
>  src/ssdt-mem.dsl      |   69 +++++++++++++++++++++
>  tools/acpi_extract.py |   28 +++++++++
>  6 files changed, 369 insertions(+), 10 deletions(-)
>  create mode 100644 src/ssdt-mem.dsl
>

WARNING: multiple messages have this Message-ID (diff)
From: Blue Swirl <blauwirbel@gmail.com>
To: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
Cc: kvm@vger.kernel.org, gleb@redhat.com, seabios@seabios.org,
	qemu-devel@nongnu.org, kevin@koconnor.net, avi@redhat.com,
	anthony@codemonkey.ws, imammedo@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH v2 00/21] ACPI memory hotplug
Date: Thu, 12 Jul 2012 20:04:56 +0000	[thread overview]
Message-ID: <CAAu8pHszqONgosH5fSnL-VLzede0uKm=Z48wLsy3pj-eZx_sTg@mail.gmail.com> (raw)
In-Reply-To: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com>

On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis
<vasilis.liaskovitis@profitbricks.com> wrote:
> This is v2 of the ACPI memory hotplug prototype for x86_64 target.

I think the concept of DIMMs (what about SIMMs? SODIMMs? I liked
memslot) would be useful for most targets, but hotplugging may be
limited to x86 only. It would be nice to keep these two separate or as
loosely coupled as possible.

>
> Changes v1->v2
>
> - memory map is automatically calculated for hotplug dimms. Dimms are added from
> top-of-memory skipping the pci hole at [PCI_HOLE_START, 4G).
> - Renamed from "-memslot" to "-dimm". Commands changed to "dimm_add", "dimm_del".
> - Seabios ejection array reduced to a byte. Use extraction macros for dimm ssdt.
> - additional SRAT paravirt info does not break previous SRAT fw_cfg layout.
> - Documentation of new acpi_piix4 registers and paravirt data.
> - add ACPI _OST support for _OST enabled guests. This allows qemu to receive
> notification for success / failure of memory hot-add and hot-remove operations.
> Guest needs to support _OST (https://lkml.org/lkml/2012/6/25/321)
> - add monitor info command to report total guest memory (initial + hot-added)
> - add command line options and monitor commands for batch dimm creation/population
>
> Overview:
>
> Dimm devices are modeled with a new qemu command line
>
> "-dimm id=name,size=sz,node=pxm,populated=on|off"
>
> As already mentioned, the starting physical address for all dimms is calculated
> automatically from top of memory, skipping the pci hole at [PCI_HOLE_START, 4G).
> Node is defining numa proximity for this dimm. When not defined it defaults
> to zero.
> "-dimm id=dimm0,size=512M,node=0,populated=off"
> will define a 512M memory slot belonging to numa node 0.
>
> Dimms are added or removed with a new hmp command "dimm_add/dimm_del":
> Hot-add syntax: "dimm_add id"
> Hot-remove syntax: "dimm_del id"
>
> Issues:
>
> - Live migration works as long as populated field is changed to "on" for
> hotplugged dimms at the destination qemu command line (patch 12/21 lifts
> this requirement). The DimmState structure does not yet define a
> VMStateDescription, but i assume this is the preferred way to pass state
> for migration.
>
> - Dimms 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 is still needed, probably attaching memory
> devices as children-links of an acpi-capable device (in the pc case acpi_piix4)
> instead of the system bus (TBD). Then device_add/device_del instead of new
> commands can hopefully be used.
>
> Comments/review welcome.
>
> series is based on uq/master for qemu-kvm, and master for seabios. Can be found
> also at:
> http://github.com/vliaskov/qemu-kvm/commits/memhp-v2
> http://github.com/vliaskov/seabios/commits/memhp-v2
>
> Vasilis Liaskovitis (14):
>   dimm: Implement memory device abstraction
>   acpi_piix4: Implement memory device hotplug registers
>   pc: calculate dimm physical addresses and adjust memory map
>   pc: Add dimm paravirt SRAT info
>   Implement "-dimm" command line option
>   Implement dimm_add and dimm_del commands for hmp and qmp
>   fix live-migration when "populated=on" is missing
>   Implement memory hotplug notification lists
>   acpi_piix4: _OST dimm support
>   acpi_piix4: Update dimm state on VM reboot
>   acpi_piix4: Update dimm bitmap state on hot-remove fail
>   Implement "info memtotal" and "query-memtotal"
>   Implement -dimms, -dimmspop command line options
>   Implement mem_increase, mem_decrease hmp/qmp commands
>
>  arch_init.c                 |   23 ++-
>  docs/specs/acpi_hotplug.txt |   46 +++++
>  docs/specs/fwcfg.txt        |   28 +++
>  hmp-commands.hx             |   67 +++++++
>  hmp.c                       |   24 +++
>  hmp.h                       |    2 +
>  hw/Makefile.objs            |    2 +-
>  hw/acpi_piix4.c             |  131 ++++++++++++-
>  hw/dimm.c                   |  449 +++++++++++++++++++++++++++++++++++++++++++
>  hw/dimm.h                   |   72 +++++++
>  hw/pc.c                     |   94 +++++++++-
>  hw/pc.h                     |    6 +
>  hw/pc_piix.c                |   18 ++-
>  monitor.c                   |   35 ++++
>  monitor.h                   |    5 +
>  qapi-schema.json            |   38 ++++
>  qemu-config.c               |   70 +++++++
>  qemu-options.hx             |   15 ++
>  qmp-commands.hx             |  137 +++++++++++++
>  sysemu.h                    |    1 +
>  vl.c                        |  122 ++++++++++++-
>  21 files changed, 1368 insertions(+), 17 deletions(-)
>  create mode 100644 docs/specs/acpi_hotplug.txt
>  create mode 100644 docs/specs/fwcfg.txt
>  create mode 100644 hw/dimm.c
>  create mode 100644 hw/dimm.h
>
> Vasilis Liaskovitis (7):
>   Add ACPI_EXTRACT_DEVICE* macros
>   Add SSDT memory device support
>   acpi-dsdt: Implement functions for memory hotplug.
>   acpi: generate hotplug memory devices.
>   pciinit: Fix pcimem_start value
>   acpi_dsdt: Support _OST dimm method
>   acpi_dsdt: Revert internal dimm state on _OST failure
>
>  Makefile              |    2 +-
>  src/acpi-dsdt.dsl     |  120 ++++++++++++++++++++++++++++++++++++-
>  src/acpi.c            |  158 +++++++++++++++++++++++++++++++++++++++++++++++--
>  src/pciinit.c         |    2 +-
>  src/ssdt-mem.dsl      |   69 +++++++++++++++++++++
>  tools/acpi_extract.py |   28 +++++++++
>  6 files changed, 369 insertions(+), 10 deletions(-)
>  create mode 100644 src/ssdt-mem.dsl
>

  parent reply	other threads:[~2012-07-12 20:05 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 10:31 [RFC PATCH v2 00/21] ACPI memory hotplug Vasilis Liaskovitis
2012-07-11 10:31 ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 01/21][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 02/21][SeaBIOS] Add SSDT memory device support Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 03/21][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-17  7:23   ` Wen Congyang
2012-07-17  7:23     ` [Qemu-devel] " Wen Congyang
2012-07-20  8:48     ` Vasilis Liaskovitis
2012-07-20  8:48       ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 04/21][SeaBIOS] acpi: generate hotplug memory devices Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:48   ` Wen Congyang
2012-07-11 10:48     ` [Qemu-devel] " Wen Congyang
2012-07-11 16:39     ` Vasilis Liaskovitis
2012-07-11 16:39       ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 11:56   ` Gerd Hoffmann
2012-07-11 11:56     ` [Qemu-devel] " Gerd Hoffmann
2012-07-11 16:45     ` Vasilis Liaskovitis
2012-07-11 16:45       ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-12  7:22       ` Gerd Hoffmann
2012-07-12  7:22         ` [Qemu-devel] " Gerd Hoffmann
2012-07-12  9:09         ` Vasilis Liaskovitis
2012-07-12  9:09           ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 06/21] dimm: Implement memory device abstraction Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-12 19:55   ` Blue Swirl
2012-07-12 19:55     ` [Qemu-devel] " Blue Swirl
2012-07-13 17:39     ` Vasilis Liaskovitis
2012-07-13 17:39       ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 07/21] acpi_piix4: Implement memory device hotplug registers Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 08/21] pc: calculate dimm physical addresses and adjust memory map Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 09/21] pc: Add dimm paravirt SRAT info Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-12 19:48   ` Blue Swirl
2012-07-12 19:48     ` [Qemu-devel] " Blue Swirl
2012-07-13 17:40     ` Vasilis Liaskovitis
2012-07-13 17:40       ` Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 10/21] Implement "-dimm" command line option Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 11/21] Implement dimm_add and dimm_del hmp/qmp commands Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 12/21] fix live-migration when "populated=on" is missing Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 13/21] Implement memory hotplug notification lists Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 14:59   ` Eric Blake
2012-07-11 14:59     ` Eric Blake
2012-07-11 16:47     ` Vasilis Liaskovitis
2012-07-11 16:47       ` Vasilis Liaskovitis
2012-07-11 10:31 ` [RFC PATCH v2 14/21][SeaBIOS] acpi_dsdt: Support _OST dimm method Vasilis Liaskovitis
2012-07-11 10:31   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 15/21] acpi_piix4: _OST dimm support Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 16/21] acpi_piix4: Update dimm state on VM reboot Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 17/21][SeaBIOS] acpi_dsdt: Revert internal dimm state on _OST failure Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 18/21] acpi_piix4: Update dimm bitmap state on hot-remove fail Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 19/21] Implement "info memtotal" and "query-memtotal" Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 15:14   ` Eric Blake
2012-07-11 15:14     ` [Qemu-devel] " Eric Blake
2012-07-11 16:55     ` Vasilis Liaskovitis
2012-07-11 16:55       ` Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 20/21] Implement -dimms, -dimmspop command line options Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 14:55   ` Avi Kivity
2012-07-11 14:55     ` [Qemu-devel] " Avi Kivity
2012-07-11 16:57     ` Vasilis Liaskovitis
2012-07-11 16:57       ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-11 10:32 ` [RFC PATCH v2 21/21] Implement mem_increase, mem_decrease hmp/qmp commands Vasilis Liaskovitis
2012-07-11 10:32   ` [Qemu-devel] " Vasilis Liaskovitis
2012-07-12 20:04 ` Blue Swirl [this message]
2012-07-12 20:04   ` [Qemu-devel] [RFC PATCH v2 00/21] ACPI memory hotplug Blue Swirl
2012-07-13 17:49   ` Vasilis Liaskovitis
2012-07-13 17:49     ` Vasilis Liaskovitis
2012-07-14  9:08     ` Blue Swirl
2012-07-14  9:08       ` [Qemu-devel] " Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAu8pHszqONgosH5fSnL-VLzede0uKm=Z48wLsy3pj-eZx_sTg@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=vasilis.liaskovitis@profitbricks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.