From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHeb-0005Rb-0W for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsHeZ-0005xd-Tu for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:32 -0500 Received: from greensocs.com ([87.106.252.221]:52982 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHeZ-0005xZ-Nv for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:31 -0500 From: fred.konrad@greensocs.com Date: Mon, 7 Jan 2013 19:40:51 +0100 Message-Id: <1357584074-10852-39-git-send-email-fred.konrad@greensocs.com> In-Reply-To: <1357584074-10852-1-git-send-email-fred.konrad@greensocs.com> References: <1357584074-10852-1-git-send-email-fred.konrad@greensocs.com> Subject: [Qemu-devel] [PATCH 38/61] virtio-rng : show the VirtIORNG structure. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, aliguori@us.ibm.com Cc: kwolf@redhat.com, peter.maydell@linaro.org, e.voevodin@samsung.com, mst@redhat.com, mark.burton@greensocs.com, agraf@suse.de, amit.shah@redhat.com, aneesh.kumar@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, afaerber@suse.de, fred.konrad@greensocs.com From: KONRAD Frederic As we discuss with anthony and andreas, this structure must be showed to avoid two memory allocations for virtio-rng-x. Signed-off-by: KONRAD Frederic --- hw/virtio-rng.c | 19 ------------------- hw/virtio-rng.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c index e063127..d79aa46 100644 --- a/hw/virtio-rng.c +++ b/hw/virtio-rng.c @@ -15,25 +15,6 @@ #include "virtio-rng.h" #include "qemu/rng.h" -typedef struct VirtIORNG { - VirtIODevice vdev; - - DeviceState *qdev; - - /* Only one vq - guest puts buffer(s) on it when it needs entropy */ - VirtQueue *vq; - - VirtIORNGConf *conf; - - RngBackend *rng; - - /* We purposefully don't migrate this state. The quota will reset on the - * destination as a result. Rate limiting is host state, not guest state. - */ - QEMUTimer *rate_limit_timer; - int64_t quota_remaining; -} VirtIORNG; - static bool is_guest_ready(VirtIORNG *vrng) { if (virtio_queue_ready(vrng->vq) diff --git a/hw/virtio-rng.h b/hw/virtio-rng.h index f42d748..3711c97 100644 --- a/hw/virtio-rng.h +++ b/hw/virtio-rng.h @@ -25,4 +25,23 @@ struct VirtIORNGConf { RndRandom *default_backend; }; +typedef struct VirtIORNG { + VirtIODevice vdev; + + DeviceState *qdev; + + /* Only one vq - guest puts buffer(s) on it when it needs entropy */ + VirtQueue *vq; + + VirtIORNGConf *conf; + + RngBackend *rng; + + /* We purposefully don't migrate this state. The quota will reset on the + * destination as a result. Rate limiting is host state, not guest state. + */ + QEMUTimer *rate_limit_timer; + int64_t quota_remaining; +} VirtIORNG; + #endif -- 1.7.11.7