From patchwork Mon Jan 7 18:40:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fred.konrad@greensocs.com X-Patchwork-Id: 210075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A46C52C0093 for ; Tue, 8 Jan 2013 06:43:39 +1100 (EST) Received: from localhost ([::1]:49981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHf9-000666-4r for incoming@patchwork.ozlabs.org; Mon, 07 Jan 2013 13:43:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHeR-00053e-4f for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsHeQ-0005up-30 for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:23 -0500 Received: from greensocs.com ([87.106.252.221]:52918 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHeP-0005uh-Tx for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:42:22 -0500 Received: from localhost (unknown [127.0.0.1]) by s15328186.onlinehome-server.info (Postfix) with ESMTP id 5C5E2400091; Mon, 7 Jan 2013 18:42:21 +0000 (UTC) Received: from s15328186.onlinehome-server.info ([127.0.0.1]) by localhost (s15328186.onlinehome-server.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JypCJTcOPNPP; Mon, 7 Jan 2013 19:42:18 +0100 (CET) Received: by s15328186.onlinehome-server.info (Postfix, from userid 491) id B32C9439E38; Mon, 7 Jan 2013 19:42:12 +0100 (CET) Received: from compaq.katmai.xl.cx.katmai.xl.cx (lan31-11-83-155-143-136.fbx.proxad.net [83.155.143.136]) by s15328186.onlinehome-server.info (Postfix) with ESMTPSA id 50241439E4D; Mon, 7 Jan 2013 19:42:11 +0100 (CET) From: fred.konrad@greensocs.com To: qemu-devel@nongnu.org, aliguori@us.ibm.com Date: Mon, 7 Jan 2013 19:40:45 +0100 Message-Id: <1357584074-10852-33-git-send-email-fred.konrad@greensocs.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1357584074-10852-1-git-send-email-fred.konrad@greensocs.com> References: <1357584074-10852-1-git-send-email-fred.konrad@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 87.106.252.221 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 Subject: [Qemu-devel] [PATCH 32/61] virtio-balloon : show the VirtIOBalloon structure. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: KONRAD Frederic As we discuss with anthony and andreas, this structure must be showed to avoid two memory allocations for virtio-balloon-x. Signed-off-by: KONRAD Frederic --- hw/virtio-balloon.c | 12 ------------ hw/virtio-balloon.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 3040bc6..3ea1790 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -27,18 +27,6 @@ #include #endif -typedef struct VirtIOBalloon -{ - VirtIODevice vdev; - VirtQueue *ivq, *dvq, *svq; - uint32_t num_pages; - uint32_t actual; - uint64_t stats[VIRTIO_BALLOON_S_NR]; - VirtQueueElement stats_vq_elem; - size_t stats_vq_offset; - DeviceState *qdev; -} VirtIOBalloon; - static VirtIOBalloon *to_virtio_balloon(VirtIODevice *vdev) { return (VirtIOBalloon *)vdev; diff --git a/hw/virtio-balloon.h b/hw/virtio-balloon.h index b1828f4..0cd211e 100644 --- a/hw/virtio-balloon.h +++ b/hw/virtio-balloon.h @@ -52,4 +52,15 @@ typedef struct VirtIOBalloonStat { uint64_t val; } QEMU_PACKED VirtIOBalloonStat; +typedef struct VirtIOBalloon { + VirtIODevice vdev; + VirtQueue *ivq, *dvq, *svq; + uint32_t num_pages; + uint32_t actual; + uint64_t stats[VIRTIO_BALLOON_S_NR]; + VirtQueueElement stats_vq_elem; + size_t stats_vq_offset; + DeviceState *qdev; +} VirtIOBalloon; + #endif