libvirt/docs
Michal Privoznik f931cb7f21 conf: Introduce virtio-mem <memory/> model
The virtio-mem is paravirtualized mechanism of adding/removing
memory to/from a VM. A virtio-mem-pci device is split into blocks
of equal size which are then exposed (all or only a requested
portion of them) to the guest kernel to use as regular memory.
Therefore, the device has two important attributes:

  1) block-size, which defines the size of a block
  2) requested-size, which defines how much memory (in bytes)
     is the device requested to expose to the guest.

The 'block-size' is configured on command line and immutable
throughout device's lifetime. The 'requested-size' can be set on
the command line too, but also is adjustable via monitor. In
fact, that is how management software places its requests to
change the memory allocation. If it wants to give more memory to
the guest it changes 'requested-size' to a bigger value, and if it
wants to shrink guest memory it changes the 'requested-size' to a
smaller value. Note, value of zero means that guest should
release all memory offered by the device. Of course, guest has to
cooperate. Therefore, there is a third attribute 'size' which is
read only and reflects how much memory the guest still has. This
can be different to 'requested-size', obviously. Because of name
clash, I've named it 'current' and it is dealt with in future
commits (it is a runtime information anyway).

In the backend, memory for virtio-mem is backed by usual objects:
memory-backend-{ram,file,memfd} and their size puts the cap on
the amount of memory that a virtio-mem device can offer to a
guest. But we are already able to express this info using <size/>
under <target/>.

Therefore, we need only two more elements to cover 'block-size'
and 'requested-size' attributes. This is the XML I've came up
with:

  <memory model='virtio-mem'>
    <source>
      <nodemask>1-3</nodemask>
      <pagesize unit='KiB'>2048</pagesize>
    </source>
    <target>
      <size unit='KiB'>2097152</size>
      <node>0</node>
      <block unit='KiB'>2048</block>
      <requested unit='KiB'>1048576</requested>
    </target>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
  </memory>

I hope by now it is obvious that:

  1) 'requested-size' must be an integer multiple of
     'block-size', and
  2) virtio-mem-pci device goes onto PCI bus and thus needs PCI
     address.

Then there is a limitation that the minimal 'block-size' is
transparent huge page size (I'll leave this without explanation).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-10-01 11:02:53 +02:00
..
fonts meson: add rule to build and install only web documentation 2020-08-03 09:27:06 +02:00
gitdm gitdm: add more individual contributors 2020-09-25 16:00:06 +02:00
go meson: Use 'rst2html5' instead of 'rst2html' everywhere 2021-08-10 16:33:07 +02:00
html meson: add rule to build and install only web documentation 2020-08-03 09:27:06 +02:00
internals meson: Always use the / operator to join paths 2021-08-11 09:16:36 +02:00
js meson: add rule to build and install only web documentation 2020-08-03 09:27:06 +02:00
kbase docs: virtiofs: remove extra slash 2021-09-09 17:53:18 +02:00
logos docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
manpages docs: Expand manpage documentation for nodedev commands 2021-09-16 09:51:03 -05:00
schemas conf: Introduce virtio-mem <memory/> model 2021-10-01 11:02:53 +02:00
404.html.in
acl.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
aclpolkit.rst docs: html.in: Convert aclpolkit to rst 2021-03-15 17:31:35 +01:00
advanced-tests.rst lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
android-chrome-192x192.png
android-chrome-256x256.png
api_extension.rst lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
api.rst docs: html.in: Convert api to rst 2021-03-15 17:31:35 +01:00
apple-touch-icon.png
apps.rst docs: html.in: Convert apps to rst 2021-03-15 17:31:35 +01:00
auditlog.rst docs: html.in: Convert auditlog to rst 2021-03-15 17:31:57 +01:00
auth.rst docs: auth: Fix a couple of stylistic issues 2021-03-23 17:55:06 +01:00
best-practices.rst Prefer https: for Red Hat websites 2020-09-01 21:58:46 +02:00
bindings.rst docs: html.in: Convert bindings to rst 2021-03-15 17:32:27 +01:00
browserconfig.xml
bugs.html.in Prefer https: for Red Hat websites 2020-09-01 21:58:46 +02:00
cgroups.html.in vircgroup: introduce nested cgroup to properly work with systemd 2021-02-10 13:37:12 +01:00
ci.rst docs: switch ci status page to use Go -module repos 2021-06-09 14:48:40 +01:00
coding-style.rst lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
committer-guidelines.rst meson: adjust our documentation to mention meson instead of autoconf 2020-08-03 09:27:09 +02:00
compiling.rst docs/compiling: Add note on how to check minimum meson version 2021-03-16 10:49:33 +01:00
contact.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
contribute.html.in docs: add a link to Gitlab on the contributing page 2021-06-15 12:14:52 +02:00
csharp.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
daemons.rst docs: Small fixes for daemons.rst 2021-06-07 08:05:59 -06:00
dbus.html.in docs: point to GitLab as the primary git hosting 2020-06-03 13:38:33 +02:00
developer-tooling.rst docs: Add developer-tooling.rst 2020-04-08 09:32:35 +02:00
devguide.html.in
docs.html.in docs: xsl: Unify stylability of main container element 2020-11-16 14:04:04 +01:00
downloads.html.in downloads.html: Add a link to GPG key used signing releases 2021-04-09 13:48:54 +02:00
drivers.html.in Add basic driver for the Cloud-Hypervisor 2021-06-04 10:56:06 +01:00
drvbhyve.html.in docs: bhyve: document virtio-9p support 2020-10-12 15:26:00 +04:00
drvch.rst Add basic driver for the Cloud-Hypervisor 2021-06-04 10:56:06 +01:00
drvesx.html.in docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
drvhyperv.html.in docs: drop support for Windows versions prior to 2012R2 2020-11-09 15:26:02 +00:00
drvlxc.html.in docs: Document lxc.conf location 2021-03-12 10:52:41 +01:00
drvnodedev.html.in docs: update nodedev driver docs for new mdev features 2021-09-16 09:54:29 -05:00
drvopenvz.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
drvqemu.rst qemu: Formally deprecate support for qemu < 2.11 2021-05-03 12:14:44 +02:00
drvremote.html.in
drvsecret.html.in docs: fix since version in driver documentation 2020-01-27 17:36:05 +01:00
drvtest.html.in
drvvbox.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
drvvirtuozzo.html.in Virtuozzo URL has been changed 2021-03-24 14:24:55 +03:00
drvvmware.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
drvxen.html.in docs: Document libxl.conf location 2021-03-12 10:52:51 +01:00
errors.html.in
favicon-16x16.png
favicon-32x32.png
favicon.ico
firewall.html.in doc: document new filters and not documented ones 2020-11-04 17:21:45 +01:00
format.html.in docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
formatbackup.rst conf: backup: Format index of 'store' 2020-12-08 15:12:34 +01:00
formatcaps.html.in docs: fix migration_features element name in formatcaps.html.in 2021-09-15 17:00:19 +02:00
formatcheckpoint.rst conf: checkpoint: Don't require <domain> when redefining checkpoints 2020-12-04 16:15:03 +01:00
formatdomain.rst conf: Introduce virtio-mem <memory/> model 2021-10-01 11:02:53 +02:00
formatdomaincaps.html.in docs: Add s390-pv in domain capabilities documentation 2021-07-21 13:30:30 +02:00
formatnetwork.html.in Fix format network dns doc 2021-01-26 14:29:48 +01:00
formatnetworkport.html.in docs: formatnetworkport: Fix typos 2021-04-01 13:32:25 +02:00
formatnode.html.in nodedev: Revert auto-start property for mdevs 2021-05-27 15:38:28 +02:00
formatnwfilter.html.in doc: document new filters and not documented ones 2020-11-04 17:21:45 +01:00
formatsecret.html.in docs: secret: Unify and sanitize examples on how to set secret value 2020-01-28 18:10:36 +01:00
formatsnapshot.html.in conf: snapshot: Add support for <metadata_cache> 2021-01-08 15:27:00 +01:00
formatstorage.html.in storage: add support for QCOW2 cluster_size option 2021-05-21 14:00:43 +02:00
formatstoragecaps.html.in docs: Fix link for virConnectGetStoragePoolCapabilities 2020-12-02 16:15:43 +01:00
formatstorageencryption.html.in docs: support qcow2 format in luks encryption volume 2021-01-05 13:54:11 +01:00
generic.css docs: css: Make definition list 'code' entries bold when converted from rst 2020-08-03 18:41:11 +02:00
glib-adoption.rst docs: glib-adoption: add string arrays and objects 2020-10-02 14:10:44 +02:00
goals.html.in
governance.html.in
hacking.rst Revert "docs: Drop glib-adoption.rst" 2020-10-02 14:10:40 +02:00
hooks.html.in docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
index.html.in docs: use a relative link to the kbase page 2021-02-03 16:33:18 +00:00
internals.html.in
java.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
libvirt-daemon-arch.png
libvirt-daemon-arch.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
libvirt-driver-arch.png
libvirt-driver-arch.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
libvirt-go-xml.rst docs: introduce stubs for new libvirt Go packages 2021-06-07 17:04:14 +01:00
libvirt-go.rst docs: introduce stubs for new libvirt Go packages 2021-06-07 17:04:14 +01:00
libvirt-object-model.png
libvirt-object-model.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
libvirt-virConnect-example.png
libvirt-virConnect-example.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
libvirt.css docs: css: Modify appearance of the kbase directory page 2020-11-16 14:04:04 +01:00
logging.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
main.css
manifest.json
meson.build meson: Use 'rst2html5' instead of 'rst2html' everywhere 2021-08-10 16:33:07 +02:00
migration-managed-direct.png
migration-managed-direct.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
migration-managed-p2p.png
migration-managed-p2p.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
migration-native.png
migration-native.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
migration-tunnel.png
migration-tunnel.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
migration-unmanaged-direct.png
migration-unmanaged-direct.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
migration.html.in docs: migration: remove xenmigr 2021-01-05 13:40:25 +01:00
mobile.css
mstile-150x150.png
newapi.xsl docs: Format @variable properly 2021-09-15 08:37:40 +02:00
newreposetup.rst docs: Document CIRRUS_GITHUB_REPO variable 2020-06-11 12:03:41 +02:00
node.gif
node.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
nss.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
page.xsl docs: add go-import meta tags for new go modules 2021-07-02 15:05:15 +01:00
pci-addresses.rst Fix spelling 2021-04-15 15:42:21 +02:00
pci-hotplug.html.in Prefer https: for libguestfs.org links 2020-09-01 21:58:46 +02:00
php.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
platforms.rst docs/platforms: Drop separate link to qemu-kvm on repology.org 2021-04-12 16:09:41 +02:00
programming-languages.rst Fix capitalization "CLang" -> "Clang" 2020-11-12 15:01:42 +01:00
python.html.in doc/python: Update to Python 3 2020-04-20 14:06:25 +01:00
remote.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
securityprocess.html.in docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
site.xsl docs: fix libvirt go-import metadata in pages and links in 404 page 2020-08-04 17:06:33 +01:00
storage.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
strategy.html.in docs: fix misc spelling errors reported by codespell 2020-10-05 10:28:37 +01:00
structures.svg docs: convert FIG files into SVG format 2020-07-10 16:07:02 +02:00
styleguide.rst docs: Document list-tables as recommended 2020-05-11 13:55:27 +02:00
submitting-patches.rst docs/submitting-patches: add reference to DCO 2020-10-09 09:12:39 +02:00
subsite.xsl docs: fix libvirt go-import metadata in pages and links in 404 page 2020-08-04 17:06:33 +01:00
support.html.in
testapi.html.in docs: point to GitLab as the primary git hosting 2020-06-03 13:38:33 +02:00
testsuites.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
testtck.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
tlscerts.html.in docs: tlscerts: Fix a few broken links 2021-02-16 08:35:09 +01:00
uri.html.in docs: Add 'known_hosts_verify' parameter for libssh(2) connection uris 2021-02-05 16:02:22 +01:00
virshcmdref.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
windows.html.in Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00