qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️)
@ 2023-04-27  9:08 Maciej S. Szmigiero
  2023-04-27  9:08 ` [PATCH v4 1/3] error: define g_autoptr() cleanup function for the Error type Maciej S. Szmigiero
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maciej S. Szmigiero @ 2023-04-27  9:08 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Eduardo Habkost
  Cc: Michael S . Tsirkin, Marcel Apfelbaum, Alex Bennée,
	Thomas Huth, Marc-André Lureau, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Eric Blake, Markus Armbruster,
	David Hildenbrand, qemu-devel

From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>

This is a continuation of v3 patch series located here:
https://lore.kernel.org/qemu-devel/cover.1677274611.git.maciej.szmigiero@oracle.com/

Since v3 was just a rebase a more detailed description of this driver is
available in the cover letter of v2:
https://lore.kernel.org/qemu-devel/cover.1672878904.git.maciej.szmigiero@oracle.com/

Changes from v3:
* Convert the driver to directly take just a single memory backend,

* Remove virtual DIMMs support, make the driver directly implement
TYPE_MEMORY_DEVICE interface,

* Allow hot-adding just parts of that single memory backend instead of
always adding the whole backend,

* Integrate the hot-add functionality transparently into the ballooning
interface instead of having a dedicated QMP hot-add command,

* Additional comments and minor cleanups.


Updated example usage:
* Add "-device vmbus-bridge,id=vmbus-bridge \
  -object memory-backend-ram,id=mem1,size=256G \
  -device hv-balloon,id=hvb,memdev=mem1"
  to the QEMU command line and set "maxmem" value to something large,
  like 1T.

The examples below assume that the guest boot memory size was 4 GiB.

* Use QEMU HMP "balloon" command to resize guest up to 8 GiB:
  balloon 8192
  This will cause the driver to hot-add the first 4 GiB of the memory
  backend.

* Use the ballooning interface to ask the guest to give out as much
  memory as possible:
  balloon 1

* Use the ballooning interface to resize the guest up again to 10 GiB:
  balloon 10240
  This will cause the driver to first return all ballooned out pages
  to the guest and then hot-add next 2 GiB of the memory backend.

* Further ballooning interface monitor commands can be used to resize
  the guest up and down appropriately.

* The current guest size can be queried by issuing the "info balloon" command.
  This is useful to know what is happening, since large ballooning or
  unballooning operations take some time to complete.

 Kconfig.host                     |    3 +
 configure                        |   36 +
 hw/hyperv/Kconfig                |    5 +
 hw/hyperv/hv-balloon.c           | 2040 ++++++++++++++++++++++++++++++
 hw/hyperv/meson.build            |    1 +
 hw/hyperv/trace-events           |   16 +
 include/hw/hyperv/dynmem-proto.h |  423 +++++++
 include/qapi/error.h             |    2 +
 meson.build                      |    4 +-
 qapi/machine.json                |   25 +
 10 files changed, 2554 insertions(+), 1 deletion(-)
 create mode 100644 hw/hyperv/hv-balloon.c
 create mode 100644 include/hw/hyperv/dynmem-proto.h



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

end of thread, other threads:[~2023-04-29 17:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27  9:08 [PATCH v4 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️) Maciej S. Szmigiero
2023-04-27  9:08 ` [PATCH v4 1/3] error: define g_autoptr() cleanup function for the Error type Maciej S. Szmigiero
2023-04-27  9:08 ` [PATCH v4 2/3] Add Hyper-V Dynamic Memory Protocol definitions Maciej S. Szmigiero
2023-04-27  9:08 ` [PATCH v4 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon) Maciej S. Szmigiero
2023-04-28 22:59   ` Philippe Mathieu-Daudé
2023-04-29 17:15     ` Maciej S. Szmigiero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).