]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Introduce virtio-pmem <memory/> model
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Dec 2020 14:24:17 +0000 (15:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Jan 2021 10:53:33 +0000 (11:53 +0100)
commit173733b7a8d85feb6bba32410b3fb5d078f26783
tree09a7e0ddc4826e525e03a7eb1a4534e75e376270
parentf06c1d908f7a12833d9f75b1ece68b4d11dba338
conf: Introduce virtio-pmem <memory/> model

The virtio-pmem is a virtio variant of NVDIMM and just like
NVDIMM virtio-pmem also allows accessing host pages bypassing
guest page cache. The difference is that if a regular file is
used to back guest's NVDIMM (model='nvdimm') the persistence of
guest writes might not be guaranteed while with virtio-pmem it
is.

To express this new model at domain XML level, I've chosen the
following:

  <memory model='virtio-pmem' access='shared'>
    <source>
      <path>/tmp/virtio_pmem</path>
    </source>
    <target>
      <size unit='KiB'>524288</size>
    </target>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
  </memory>

Another difference between NVDIMM and virtio-pmem is that while
the former supports NUMA node locality the latter doesn't. And
also, the latter goes onto PCI bus and not into a DIMM module.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
17 files changed:
docs/formatdomain.rst
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/domain_validate.c
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain_address.c
src/qemu/qemu_domain_address.h
src/qemu/qemu_hotplug.c
src/qemu/qemu_validate.c
src/security/security_apparmor.c
src/security/security_dac.c
src/security/security_selinux.c
tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/memory-hotplug-virtio-pmem.x86_64-latest.xml [new symlink]
tests/qemuxml2xmltest.c