On 20.02.2017 09:49, Marc-André Lureau wrote: > ----- Original Message ----- >> When enabling virgl, qemu opens /dev/dri/render*. So far, we are >> not allowing that in devices cgroup nor creating the file in >> domain's namespace and thus requiring users to set the paths in >> qemu.conf. This, however, is suboptimal as it allows access to >> ALL qemu processes even those which don't have virgl configured. >> Now that we have a way to specify render node that qemu will use >> we can be more cautious and enable just that. >> >> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> >> --- >> >> Technically, this is v2 of: >> >> https://www.redhat.com/archives/libvir-list/2017-February/msg00497.html >> >> diff to v1: >> - now that we have @rendernode for <gl/> which selects just one path (and >> does >> it in predictable fashion) only that path is enabled in the CGgroups and >> created in the namespace. > > That means in practice we are not compatible with older qemu releases, and we make rendernode attribute somehow mandatory for qemu:///system (no automatic selection). Depends on your definition of compatibility :-) Until Friday afternoon (when I pushed your patches), there was no way how to tell qemu which render node to use. Thus users using virgl domains needed to adjust cgroup_device_acl list in qemu.conf anyway and enable whatever device qemu needed for virgl. With my patch, if they select the device at domain XML level, libvirt can do that for them. I think this is in fact the correct solution. The reason why we have that variable in qemu.conf is that libvirt can't possibly know all the paths qemu will ever touch (even though we try hard to do so), simply because the matrix of combinations of paths and possible device configs is endless. > > I'd suggest to let all /dev/dri/render* if rendernode is not specified, but this can be discussed and done in a seperate patch. Frankly, I like this approach better. I mean, the one implemented here. The whole point of devices CGroup is to limit devices that a process (qemu) has access to. And if we don't know simply shrug and allow everything is not ideal IMO. Michal > > Looks good, > > Reviewed-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Thanks, fixed the typo in the subject and pushed. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list