On 02/02/2017 02:27 PM, Jaroslav Safka wrote:
Hi,
we would like to introduce 3 new elements source,access and allocation in memoryBacking
element.
For now it was made for numa topology.
<memoryBacking>
<source type="file|anonymous"/>
<access mode="shared|private"/>
<allocation mode="immediate|ondemand"/>
</memoryBacking>
If allocation is immediate then -mem-prealloc should be added to the qemu commanline.
If source is file then
-object memory-backend-file,id=mem,size=1024M,mem-path=*lib dir path* -numa
node,memdev=mem Will be added to the qemu commandline
If access is shared then the "share=on" parameter will be added to the
memory-backend-file e.g.
-object memory-backend-file,id=mem,size=1024M,mem-path=/var/lib/libvirt/qemu,share=on
The access mode can be overriden by specifying token memAccess in numa cell.
The mem-path can be defined by new config parameter memory_backing_dir.
PS: the sometime failing test qemuhotplug was failing also before this patch :)
Jaroslav Safka (4):
qemu,conf: Rename virNumaMemAccess to virDomainMemoryAccess
qemu_conf: Add param memory_backing_dir
conf: Add new xml elements for file memorybacking support
qemu: Add args generation for file memory backing
docs/formatdomain.html.in | 9 ++
docs/schemas/domaincommon.rng | 30 +++++
src/conf/domain_conf.c | 133 ++++++++++++++++-----
src/conf/domain_conf.h | 22 ++++
src/conf/numa_conf.c | 15 +--
src/conf/numa_conf.h | 14 +--
src/qemu/libvirtd_qemu.aug | 3 +
src/qemu/qemu.conf | 4 +
src/qemu/qemu_command.c | 55 ++++++---
src/qemu/qemu_conf.c | 9 ++
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_process.c | 2 +-
src/qemu/test_libvirtd_qemu.aug.in | 1 +
.../qemuxml2argv-fd-memory-no-numa-topology.args | 21 ++++
.../qemuxml2argv-fd-memory-no-numa-topology.xml | 27 +++++
.../qemuxml2argv-fd-memory-numa-topology.args | 24 ++++
.../qemuxml2argv-fd-memory-numa-topology.xml | 30 +++++
.../qemuxml2argv-fd-memory-numa-topology2.args | 27 +++++
.../qemuxml2argv-fd-memory-numa-topology2.xml | 31 +++++
.../qemuxml2argv-fd-memory-numa-topology3.args | 30 +++++
.../qemuxml2argv-fd-memory-numa-topology3.xml | 32 +++++
.../qemuxml2argv-memorybacking-set.xml | 24 ++++
.../qemuxml2argv-memorybacking-unset.xml | 24 ++++
tests/qemuxml2argvtest.c | 13 ++
.../qemuxml2xmlout-memorybacking-set.xml | 32 +++++
.../qemuxml2xmlout-memorybacking-unset.xml | 32 +++++
tests/qemuxml2xmltest.c | 3 +
27 files changed, 584 insertions(+), 65 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-topology.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-topology.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memorybacking-set.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memorybacking-unset.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-memorybacking-set.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-memorybacking-unset.xml
Looking good. ACK to all of them. However, please send a patch (as a
reply to this cover letter) that updates docs/news.xml. Only after that
it is possible to push these.
Michal