public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server 0/2] close #2949: add virtio-mem support
@ 2022-03-07 11:35 Alexandre Derumier
  2022-03-07 11:36 ` [pve-devel] [PATCH qemu-server 1/2] " Alexandre Derumier
  2022-03-07 11:36 ` [pve-devel] [PATCH qemu-server 2/2] tests: add virtio-mem tests Alexandre Derumier
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Derumier @ 2022-03-07 11:35 UTC (permalink / raw)
  To: pve-devel

This patch add virtio-mem support, through a new maxmemory option.

a 4GB static memory is needed for DMA+boot memory, as this memory
is almost always un-unpluggeable.

1 virtio-mem pci device is setup for each numa node on pci.4 bridge

virtio-mem use a fixed blocksize with 32k max blocksize,
so blocksize is computed from the maxmemory/32000 with a minimum of
2MB to map THP.
(lower blocksize = more chance to unplug memory).

Tested with debian11 guest with kernel 5.10.

more info about virtio-mem:
https://virtio-mem.gitlab.io/

Alexandre Derumier (2):
  add virtio-mem support
  tests: add virtio-mem tests

 PVE/QemuServer.pm                           |   9 +-
 PVE/QemuServer/Memory.pm                    | 130 +++++++++++++++-----
 PVE/QemuServer/PCI.pm                       |   8 ++
 test/cfg2cmd/simple-virtio-mem-big.conf     |  12 ++
 test/cfg2cmd/simple-virtio-mem-big.conf.cmd |  59 +++++++++
 test/cfg2cmd/simple-virtio-mem.conf         |  13 ++
 test/cfg2cmd/simple-virtio-mem.conf.cmd     |  31 +++++
 7 files changed, 233 insertions(+), 29 deletions(-)
 create mode 100644 test/cfg2cmd/simple-virtio-mem-big.conf
 create mode 100644 test/cfg2cmd/simple-virtio-mem-big.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-mem.conf
 create mode 100644 test/cfg2cmd/simple-virtio-mem.conf.cmd

-- 
2.30.2




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

end of thread, other threads:[~2022-03-07 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 11:35 [pve-devel] [PATCH qemu-server 0/2] close #2949: add virtio-mem support Alexandre Derumier
2022-03-07 11:36 ` [pve-devel] [PATCH qemu-server 1/2] " Alexandre Derumier
2022-03-07 11:36 ` [pve-devel] [PATCH qemu-server 2/2] tests: add virtio-mem tests Alexandre Derumier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal