On Wed, Nov 07, 2012 at 05:40:44PM +0800, Osier Yang wrote:
Depends on whether "source path" is specified, the command
line
is built like:
* 'path' is specified, with interrupts (/tmp/nahanni is the
ivshmem server socket path)
-chardev socket,path=/tmp/nahanni,id=nahanni
-device ivshmem,chardev=nahanni,size=512m,vectors=8,ioeventfd=on
* 'path' is not specified, without interrupts
-device ivshmem,shm=nahanni,size=512m,vectors=8,ioeventfd=on
* src/qemu/qemu_command.c (New helper qemuBuildMemoryDevStr to
to build args of '-device'; Assign
PCI address for the device; Build
args of '-chardev')
* tests/qemuxml2argvdata/qemuxml2argv-ivshmem.xml: (See below)
* tests/qemuxml2argvdata/qemuxml2argv-ivshmem.args: (See below)
* tests/qemuxml2argvtest.c: (Add tests)
---
src/qemu/qemu_command.c | 85 ++++++++++++++++++++++
tests/qemuxml2argvdata/qemuxml2argv-ivshmem.args | 7 ++
tests/qemuxml2argvdata/qemuxml2argv-ivshmem.xml | 33 +++++++++
tests/qemuxml2argvtest.c | 2 +
4 files changed, 127 insertions(+), 0 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ivshmem.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ivshmem.xml
No changes to SELinux ? I'm reasonably sure the policy should
forbid QEMU from creating the shared memory backing file. For
hugepages, we had to create a per-QEMU directory, label that and
then pass it to QEMU.
This perhaps implies that our XML should not contain the actual
path. Libvirt can just create a path based on the "name" of the
device and set a label of the dir as for hugepages.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|