summaryrefslogtreecommitdiff
path: root/src/qemu/qemu.conf
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2013-04-29 13:15:26 -0400
committerLaine Stump <laine@laine.org>2013-04-29 21:52:28 -0400
commit6e13860cb46e74c94ee67477942693d8757cf5de (patch)
tree95732a5443cb21a92f797e5bd13ec02ed0c9828a /src/qemu/qemu.conf
parentdfb48349408b234cbba5edb7f4f4726d7cf7a1f2 (diff)
downloadlibvirt-6e13860cb46e74c94ee67477942693d8757cf5de.tar.gz
qemu: add vfio devices to cgroup ACL when appropriate
PCIO device assignment using VFIO requires read/write access by the qemu process to /dev/vfio/vfio, and /dev/vfio/nn, where "nn" is the VFIO group number that the assigned device belongs to (and can be found with the function virPCIDeviceGetVFIOGroupDev) /dev/vfio/vfio can be accessible to any guest without danger (according to vfio developers), so it is added to the static ACL. The group device must be dynamically added to the cgroup ACL for each vfio hostdev in two places: 1) for any devices in the persistent config when the domain is started (done during qemuSetupCgroup()) 2) at device attach time for any hotplug devices (done in qemuDomainAttachHostDevice) The group device must be removed from the ACL when a device it "hot-unplugged" (in qemuDomainDetachHostDevice()) Note that USB devices are already doing their own cgroup setup and teardown in the hostdev-usb specific function. I chose to make the new functions generic and call them in a common location though. We can then move the USB-specific code (which is duplicated in two locations) to this single location. I'll be posting a followup patch to do that.
Diffstat (limited to 'src/qemu/qemu.conf')
-rw-r--r--src/qemu/qemu.conf2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 87bdf70d8d..0f0a24c20e 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -241,7 +241,7 @@
# "/dev/null", "/dev/full", "/dev/zero",
# "/dev/random", "/dev/urandom",
# "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
-# "/dev/rtc","/dev/hpet"
+# "/dev/rtc","/dev/hpet", "/dev/vfio/vfio"
#]