From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYkv-0008Fl-4I for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEYkq-0006n4-0Y for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:06:29 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:49945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYkp-0006n0-Nu for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:06:23 -0400 Date: Mon, 13 Jul 2015 04:06:22 -0400 (EDT) From: Pankaj Gupta Message-ID: <1564041656.31597912.1436774782857.JavaMail.zimbra@redhat.com> In-Reply-To: <20150713105605-mutt-send-email-mst@redhat.com> References: <1436520840-28742-1-git-send-email-pagupta@redhat.com> <20150713105605-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: amit shah , qemu-devel@nongnu.org > On Fri, Jul 10, 2015 at 03:04:00PM +0530, Pankaj Gupta wrote: > > @@ -196,13 +201,9 @@ static void virtio_rng_device_realize(DeviceState > > *dev, Error **errp) > > =C2=A0 > > =C2=A0 =C2=A0 =C2=A0vrng->vq =3D virtio_add_queue(vdev, 8, handle_input= ); > > =C2=A0 =C2=A0 =C2=A0vrng->quota_remaining =3D vrng->conf.max_bytes; > > - > > =C2=A0 =C2=A0 =C2=A0vrng->rate_limit_timer =3D timer_new_ms(QEMU_CLOCK_= VIRTUAL, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 check_rate_limit, vrng); >=20 > BTW I'm not sure QEMU_CLOCK_VIRTUAL is right here. > We are trying to limit the rate at host. > Does it matter that guest is not running? I think, now we will be serving entropy requests only when Guest send those= . In any case Guest should be up and running. >=20 > -- > MST >=20 >=20