From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWejm-0007cx-CG for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWejh-0001EK-60 for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:59:02 -0400 Received: from ozlabs.org ([203.10.76.45]:49777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWejg-0001DU-Ru for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:58:57 -0400 From: Rusty Russell Date: Thu, 17 Oct 2013 14:23:39 +1030 Message-Id: <1381982022-19291-5-git-send-email-rusty@rustcorp.com.au> In-Reply-To: <1381982022-19291-1-git-send-email-rusty@rustcorp.com.au> References: <1381982022-19291-1-git-send-email-rusty@rustcorp.com.au> Subject: [Qemu-devel] [PATCH 4/7] hw/net/virtio-balloon: use virtio wrappers to access page frame numbers. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc Zyngier , qemu-devel@nongnu.org Cc: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori --- hw/virtio/virtio-balloon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 9504877..97c4ac5 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -30,6 +30,7 @@ #endif #include "hw/virtio/virtio-bus.h" +#include "hw/virtio/virtio-access.h" static void balloon_page(void *addr, int deflate) { @@ -192,7 +193,7 @@ static void virtio_balloon_handle_output(VirtIODevice *vdev, VirtQueue *vq) ram_addr_t pa; ram_addr_t addr; - pa = (ram_addr_t)ldl_p(&pfn) << VIRTIO_BALLOON_PFN_SHIFT; + pa = (ram_addr_t)virtio_ldl_p(&pfn) << VIRTIO_BALLOON_PFN_SHIFT; offset += 4; /* FIXME: remove get_system_memory(), but how? */ -- 1.8.1.2