On Tue, Oct 04, 2016 at 05:07:16PM +0200, Michal Privoznik wrote: > On 29.09.2016 10:56, Jaroslav Safka wrote: > > This first change introduces xml parsing support for preallocated > > shared file descriptor based memory backing. > > It allows vhost-user to be used without hugepages. > > > > New xml elements: > > <memoryBacking> > > <source type='file|anonymous' path='/path/to/qemu/' /> I'm pretty sure I said previously that path should *not* be present in the XML, as that is a linux-ism / internal impl detail not appropriate to expose. > > <access Mode='shared|private'/> > > <allocation mode='immediate|ondemand'/> > > </memoryBacking> > > Okay, this is definitely interesting approach (not only because while > reviewing this, I've found an old branch in my git where I've started to > work on this). > > Frankly, I don't know if this is a good API or not. Historically, we > required Dan's ACK on XML schema :-) It is mostly ok, but what I think is missing though is integration with the existing logic in this area. eg we have a access mode attribute on the NUMA cell: <cell id='1' cpus='4-7' memory='512000' unit='KiB' memAccess='shared'/> if this attribute is *not* specified on the NUMA cell, then the parser should be auto-filling it based on the top level <access mode> element. And of course test files to demonstrate that is working. > > --- > > docs/schemas/domaincommon.rng | 37 +++++ > > src/conf/domain_conf.c | 149 ++++++++++++++++----- > > src/conf/domain_conf.h | 34 +++++ > > .../qemuxml2argv-memorybacking-set.xml | 32 +++++ > > .../qemuxml2argv-memorybacking-unset.xml | 32 +++++ > > .../qemuxml2xmlout-memorybacking-set.xml | 40 ++++++ > > .../qemuxml2xmlout-memorybacking-unset.xml | 40 ++++++ > > tests/qemuxml2xmltest.c | 3 + > > 8 files changed, 334 insertions(+), 33 deletions(-) > > 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 > > You need to update the docs too. formatdomain.html.in to be more precise. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list