]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix improper initialization of cgroupControllers bitmap
authorLaine Stump <laine@laine.org>
Mon, 12 Sep 2016 17:21:10 +0000 (13:21 -0400)
committerLaine Stump <laine@laine.org>
Mon, 12 Sep 2016 18:40:22 +0000 (14:40 -0400)
commit0276015325a746f2cd26ef0fddfc682cf641423f
treea77bfc80882db243883aa40e24262740744199da
parent94e2be842411b9f8ec9165c8d25c93716c1b30ca
qemu: fix improper initialization of cgroupControllers bitmap

virQEMUDriverConfigNew() always initializes the bitmap in its
cgroupControllers member to -1 (i.e. all 1's).

Prior to commit a9331394, if qemu.conf had a line with
"cgroup_controllers", cgroupControllers would get reset to 0 before
going through a loop setting a bit for each named cgroup controller.
commit a9331394 left out the "reset to 0" part, so cgroupControllers
would always be -1; if you didn't want a controller included, there
was no longer a way to make that happen.

This was discovered by users who were using qemu commandline
passthrough to use the "input-linux" method of directing
keyboard/mouse input to a virtual machine:

 https://www.redhat.com/archives/vfio-users/2016-April/msg00105.html

Here's the first report I found of the problem encountered after
upgrading libvirt beyond v2.0.0:

 https://www.redhat.com/archives/vfio-users/2016-August/msg00053.html

Thanks to sL1pKn07 SpinFlo <sl1pkn07@gmail.com> for bringing the
problem up in IRC, and then taking the time to do a git bisect and
find the patch that started the problem.
src/qemu/qemu_conf.c