Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-03-02 Thread Ladi Prosek
On Wed, Mar 2, 2016 at 10:56 AM, Amit Shah wrote: > On (Wed) 10 Feb 2016 [16:53:25], Ladi Prosek wrote: >> Requests are now created in the RngBackend parent class and the >> code path is shared by both rng-egd and rng-random. >> >> This commit fixes the rng-random

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-03-02 Thread Amit Shah
On (Wed) 10 Feb 2016 [16:53:25], Ladi Prosek wrote: > Requests are now created in the RngBackend parent class and the > code path is shared by both rng-egd and rng-random. > > This commit fixes the rng-random implementation which currently > processes only one request at a time and simply

[Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Ladi Prosek
Requests are now created in the RngBackend parent class and the code path is shared by both rng-egd and rng-random. This commit fixes the rng-random implementation which currently processes only one request at a time and simply discards all but the most recent one. In the guest this manifests as

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Ladi Prosek
> > > On 10/02/2016 16:53, Ladi Prosek wrote: > > +req->size = size; > > +req->receive_entropy = receive_entropy; > > +req->opaque = opaque; > > +req->data = g_malloc(req->size); > > + > > +k->request_entropy(s, req); > > + > > +s->requests =

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 17:40, Ladi Prosek wrote: >> >> >> On 10/02/2016 16:53, Ladi Prosek wrote: >>> +req->size = size; >>> +req->receive_entropy = receive_entropy; >>> +req->opaque = opaque; >>> +req->data = g_malloc(req->size); >>> + >>> +k->request_entropy(s,

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Paolo Bonzini
On 10/02/2016 16:53, Ladi Prosek wrote: > +req->size = size; > +req->receive_entropy = receive_entropy; > +req->opaque = opaque; > +req->data = g_malloc(req->size); > + > +k->request_entropy(s, req); > + > +s->requests = g_slist_append(s->requests,