]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Create hugepage path on per domain basis
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Nov 2016 12:21:51 +0000 (13:21 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 8 Dec 2016 14:45:52 +0000 (15:45 +0100)
commitf55afd83b1338e17eae7ec83b792a7fc962edbc3
treeb879cc9f95bb099b77552ce7d74d5e8c05287f08
parent7ed6934f3b925fa53177e0ddf6bd6b75ac5a0116
qemu: Create hugepage path on per domain basis

If you've ever tried running a huge page backed guest under
different user than in qemu.conf, you probably failed. Problem is
even though we have corresponding APIs in the security drivers,
there's no implementation and thus we don't relabel the huge page
path. But even if we did, so far all of the domains share the
same path:

   /hugepageMount/libvirt/qemu

Our only option there would be to set 0777 mode on the qemu dir
which is totally unsafe. Therefore, we can create dir on
per-domain basis, i.e.:

   /hugepageMount/libvirt/qemu/domainName

and chown domainName dir to the user that domain is configured to
run under.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
14 files changed:
src/qemu/qemu_command.c
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages2.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages3.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages5.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.args
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args
tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.args
tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args