From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSE3j-0007Hj-Uk for qemu-devel@nongnu.org; Thu, 02 Jun 2011 16:00:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSE3h-0003hm-UW for qemu-devel@nongnu.org; Thu, 02 Jun 2011 15:59:59 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:50307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSE3h-0003hZ-FF for qemu-devel@nongnu.org; Thu, 02 Jun 2011 15:59:57 -0400 Received: by fxm2 with SMTP id 2so1033082fxm.4 for ; Thu, 02 Jun 2011 12:59:55 -0700 (PDT) Sender: Eduard - Gabriel Munteanu Date: Thu, 2 Jun 2011 22:59:51 +0300 From: Eduard - Gabriel Munteanu Message-ID: <20110602195951.GA5500@localhost> References: <1307027562-3460-1-git-send-email-david@gibson.dropbear.id.au> <1307027562-3460-2-git-send-email-david@gibson.dropbear.id.au> <4DE7BDB4.1060601@twiddle.net> <20110602173507.GA4735@localhost> <4DE7E475.2010201@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DE7E475.2010201@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 01/14] Generic DMA memory access interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, David Gibson On Thu, Jun 02, 2011 at 12:28:53PM -0700, Richard Henderson wrote: > On 06/02/2011 10:35 AM, Eduard - Gabriel Munteanu wrote: > > My latest patches seem to have fixed that: > > > > + if (plen < *len) { > > + *len = plen; > > + } > > + > > + buf = cpu_physical_memory_map(paddr, len, is_write); > > No, len is (or was in previous patches) dma_addr_t which > is not the same as target_phys_addr_t. > > Which is why plen was used before, because it was the > right type. Ah, indeed, this is a bug. It probably slipped through because the pointers are compatible on x86-64. Thanks for pointing it out. Eduard > r~