From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYcM-0005K5-Ec for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:57:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEYcK-0002Lx-SD for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:57:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYcK-0002Lo-Mg for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:57:36 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 350AC8E934 for ; Mon, 13 Jul 2015 07:57:36 +0000 (UTC) Date: Mon, 13 Jul 2015 10:57:33 +0300 From: "Michael S. Tsirkin" Message-ID: <20150713105605-mutt-send-email-mst@redhat.com> References: <1436520840-28742-1-git-send-email-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436520840-28742-1-git-send-email-pagupta@redhat.com> 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: Pankaj Gupta Cc: amit.shah@redhat.com, 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) > > vrng->vq = virtio_add_queue(vdev, 8, handle_input); > vrng->quota_remaining = vrng->conf.max_bytes; > - > vrng->rate_limit_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, > check_rate_limit, vrng); 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? -- MST