qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v5 00/14] ACPI memory hotplug


From: Hu Tao
Subject: [Qemu-devel] [PATCH v5 00/14] ACPI memory hotplug
Date: Wed, 26 Jun 2013 17:13:23 +0800

It's been quite a while since v4 and lots of changes happend
in qemu and v4 just can't apply anymore. So this series is
basically a rebase. Another purpose is to bring up discussions
to make consensus on some questions since v4, see
http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg01219.html
and http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg05332.html

This series works with seabios counterpart.

changes from v4:

  - rebased on a recent qemu-git
  - based on another series which seperates i440fx refactor from v4.
    http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg03500.html
  - hot-unplug patches not included, as suggested by Vasilis, since
    hot-unplug has some more complications with refcounting memory regions.
  - fix some copy-paste errors in qapi-schema.json.

v4: http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02693.html

Issues:

- hot-remove needs to only unmap the dimm device from guest's view. Freeing the
  memory should happen when the last user of the device (e.g. virtio-blk) unrefs
  the device. A testcase is needed for this.

- Live Migration: Ramblocks are migrated before qdev VMStates are migrated. So
  the DimmDevice is handled diferrently than other devices. Should this be
  reworked ?( DimmDevice structure currently does not define a 
VMStateDescription)
  Live migration works as long as the dimm layout (command line args) are
  identical at the source and destination qemu command line, and destination 
takes
  into account hot-operations that have occured on source. (v3 patch 10/19
  created the DimmDevice that corresponds to an unknown incoming ramblock, e.g.
  for a dimm that was hot-added on source. but has been dropped for the moment).

- A main blocker issue is windows guest functionality. The patchset does not
  work for windows currently.  Testing on win2012 server RC or windows2008
  consumer prerelease, when adding a DIMM, there is a BSOD with ACPI_BIOS_ERROR
  message. After this, the VM keeps rebooting with ACPI_BIOS_ERROR. The windows
  pnpmem driver obviosuly has a problem with the seabios dimm implementation
  (or the seabios dimm implementation is not fully ACPI-compliant). If someone
  can review the seabios patches or has any ideas to debug this, let me know.

- hot-operation notification lists need to be added to migration state.

- If a virtio sg element straddles a ramblock boundary, virtio_map_sg can't
  handle this and qemu exits with "virtio: Trying to map MMIO memory" assertion.
  This was discovered with stress testing in a VM with hotplugged DIMMs. The
  top-most commit in the qemu repo above tries to fix this (803aedf0) but maybe
  you have a better idea. This problem is critical for hot-add upstreaming and
  needs to be solved. Review/discussion on the list/irc is necessary.

- q35 was supposed/rumoured to have native acpi hotplug support, but I haven't
  found it in the spec (and I think other people in the list didn't either). 
Iiuc
  the plan is to support paravirtual memory hotplug for both piix4 and q35.

Hu Tao (5):
  qapi: make visit_type_size fallback to v->type_int()
  Implement dimm device abstraction
  memory: record below_4g_mem_size, above_4g_mem_size
  memory controller: initialize dram controller.
  pc: Add dimm paravirt SRAT info

Vasilis Liaskovitis (9):
  Add SIZE type to qdev properties
  qemu-option: export parse_option_number
  vl: handle "-device dimm"
  acpi_piix4 : Implement memory device hotplug registers
  acpi_ich9 : Implement memory device hotplug registers
  Introduce paravirt interface QEMU_CFG_PCI_WINDOW
  Implement "info memory" and "query-memory"
  balloon: update with hotplugged memory
  Implement dimm-info

 default-configs/x86_64-softmmu.mak |   1 +
 docs/specs/acpi_mem_hotplug.txt    |  14 ++
 docs/specs/fwcfg.txt               |  28 ++++
 hmp-commands.hx                    |   4 +
 hmp.c                              |  25 ++++
 hmp.h                              |   2 +
 hw/Makefile.objs                   |   1 +
 hw/acpi/ich9.c                     |  56 ++++++-
 hw/acpi/piix4.c                    |  72 ++++++++-
 hw/core/qdev-properties.c          |  61 ++++++++
 hw/i386/pc.c                       |  74 +++++++--
 hw/i386/pc_piix.c                  |   1 +
 hw/i386/pc_q35.c                   |  17 ++-
 hw/mem-hotplug/Makefile.objs       |   1 +
 hw/mem-hotplug/dimm.c              | 298 +++++++++++++++++++++++++++++++++++++
 hw/pci-host/piix.c                 |  13 ++
 hw/virtio/virtio-balloon.c         |  13 +-
 include/hw/acpi/ich9.h             |  10 ++
 include/hw/i386/pc.h               |   8 +
 include/hw/mem-hotplug/dimm.h      |  78 ++++++++++
 include/hw/nvram/fw_cfg.h          |   1 +
 include/hw/qdev-properties.h       |   3 +
 include/qemu/option.h              |   4 +
 include/sysemu/sysemu.h            |   1 +
 monitor.c                          |  14 ++
 qapi-schema.json                   |  40 +++++
 qapi/qapi-visit-core.c             |   6 +-
 qmp-commands.hx                    |  22 +++
 util/qemu-option.c                 |   8 +-
 vl.c                               |  60 ++++++++
 30 files changed, 907 insertions(+), 29 deletions(-)
 create mode 100644 docs/specs/acpi_mem_hotplug.txt
 create mode 100644 docs/specs/fwcfg.txt
 create mode 100644 hw/mem-hotplug/Makefile.objs
 create mode 100644 hw/mem-hotplug/dimm.c
 create mode 100644 include/hw/mem-hotplug/dimm.h

-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]