From patchwork Mon Oct 1 18:41:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 188331 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 E90252C00ED for ; Tue, 2 Oct 2012 04:43:02 +1000 (EST) Received: from localhost ([::1]:35937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIkxJ-0000dd-4G for incoming@patchwork.ozlabs.org; Mon, 01 Oct 2012 14:43:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIkx9-0000dX-Tb for qemu-devel@nongnu.org; Mon, 01 Oct 2012 14:42:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIkx5-0003IF-SB for qemu-devel@nongnu.org; Mon, 01 Oct 2012 14:42:51 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:53788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIkx5-0003Hq-Lw for qemu-devel@nongnu.org; Mon, 01 Oct 2012 14:42:47 -0400 Received: from /spool/local by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Oct 2012 12:42:46 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 1 Oct 2012 12:42:43 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id C79971FF004B for ; Mon, 1 Oct 2012 12:42:37 -0600 (MDT) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q91IfsXv181034 for ; Mon, 1 Oct 2012 12:41:54 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q91IfsCT029431 for ; Mon, 1 Oct 2012 12:41:54 -0600 Received: from titi.austin.rr.com (sig-9-65-98-149.mts.ibm.com [9.65.98.149]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q91IfpBm029242; Mon, 1 Oct 2012 12:41:52 -0600 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Mon, 1 Oct 2012 13:41:51 -0500 Message-Id: <1349116911-18550-1-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.5.4 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12100118-2876-0000-0000-000000A41BBD X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.110.152 Cc: Anthony Liguori , Alex Barcelo , Alex Williamson Subject: [Qemu-devel] [PATCH] vfio_pci: fix build on 32-bit systems 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 We cannot cast directly from pointer to uint64. Cc: Alex Williamson Cc: Alex Barcelo Reported-by: Alex Barcelo Signed-off-by: Anthony Liguori Acked-by: Alex Williamson --- hw/vfio_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index a24558a..a1eeced 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -768,7 +768,7 @@ static int vfio_dma_map(VFIOContainer *container, target_phys_addr_t iova, struct vfio_iommu_type1_dma_map map = { .argsz = sizeof(map), .flags = VFIO_DMA_MAP_FLAG_READ, - .vaddr = (__u64)vaddr, + .vaddr = (__u64)(intptr_t)vaddr, .iova = iova, .size = size, };