Re: [libvirt] [PATCH 1/2] qemu: Update cgroup on RNG hotplug

2016-11-23 Thread Michal Privoznik
On 23.11.2016 15:20, John Ferlan wrote: > > [...] > >> +int >> +qemuTeardownRNGCgroup(virDomainObjPtr vm, >> + virDomainRNGDefPtr rng) >> +{ >> +qemuDomainObjPrivatePtr priv = vm->privateData; >> +int rv; >> + >> +if (rng->backend == VIR_DOMAIN_RNG_BACKEND_RANDOM)

Re: [libvirt] [PATCH 1/2] qemu: Update cgroup on RNG hotplug

2016-11-23 Thread John Ferlan
[...] > +int > +qemuTeardownRNGCgroup(virDomainObjPtr vm, > + virDomainRNGDefPtr rng) > +{ > +qemuDomainObjPrivatePtr priv = vm->privateData; > +int rv; > + > +if (rng->backend == VIR_DOMAIN_RNG_BACKEND_RANDOM) { > +VIR_DEBUG("Setting Cgroup ACL for RNG de

[libvirt] [PATCH 1/2] qemu: Update cgroup on RNG hotplug

2016-11-18 Thread Michal Privoznik
If users try to hotplug RNG device with a backend different to /dev/random or /dev/urandom the whole operation fails as qemu is unable to access the device. The problem is we don't update device CGroups during the operation. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 62 ++