Re: [PATCH] qemu: Call qemuSetupHostdevCGroup later during hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 14, 2013 at 03:04:13PM +0100, Jiri Denemark wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1025108
> 
> So far qemuSetupHostdevCGroup was called very early during hotplug, even
> before we knew the device we were about to hotplug was actually
> available. By calling the function later, we make sure QEMU won't be
> allowed to access devices used by other domains.
> 
> Another important effect of this change is that hopluging USB devices
> specified by vendor and product (but not by their USB address) works
> again. This was broken since v1.0.5-171-g7d763ac, when the call to
> qemuFindHostdevUSBDevice was moved after the call to
> qemuSetupHostdevCGroup, which then used an uninitialized USB address.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_hotplug.c | 36 +++++++++++++++++++++++++++---------
>  1 file changed, 27 insertions(+), 9 deletions(-)

I won't nack the patch for this, but wanted to point out that we should
expand the qemuhotplugtest.c file to use an LD_PRELOAD to mock out the
cgroups filesystem. Then we can validate that the cgroups setup is being
done correctly for each hotplug operation we test.

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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]