From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44318 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POT4y-0002iD-TJ for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POT4x-00026J-RK for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:41:28 -0500 Received: from cantor.suse.de ([195.135.220.2]:59221 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POT4x-000268-MR for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:41:27 -0500 Message-ID: <4CF8C997.7030408@suse.de> Date: Fri, 03 Dec 2010 11:42:31 +0100 From: Hannes Reinecke MIME-Version: 1.0 References: <1291328663.15305.105.camel@haakon2.linux-iscsi.org> <4CF8C57F.7020209@redhat.com> In-Reply-To: <4CF8C57F.7020209@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: megasas: Usage of is_write in megasas_map_sgl() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , qemu-devel , "Nicholas A. Bellinger" , Gerd Hoffmann , Paolo Bonzini , Christoph Hellwig On 12/03/2010 11:25 AM, Kevin Wolf wrote: > Am 02.12.2010 23:24, schrieb Nicholas A. Bellinger: >> The usage of a inverted is_write with cpu_physical_memory_map() also >> seems to be the case in dma-helpers.c:dma_brdv_cb(): >> >> mem = cpu_physical_memory_map(cur_addr, &cur_len, !dbs->is_write); >> >> After changing to an inverted is_write in megasas.v3/megasas-upstream-v1 >> code, this still does *not* seem to make a difference wrt to the 64-bit >> Win7 case, and the same BSOD appears.. In any event, we should verify >> this with QEMU folks in terms of what the proper usage of is_write for >> cpu_physical_memory_map(). Gerd and Kevin comments here..? > > I haven't looked at the SCSI code, but the dma-helpers.c one is easy to > explain: If you read from the disk, you write to memory. > But the main point here is: When should we set the 'is_write' parameter? Both reading and writing will go into memory, so from that point we always would need to set this ... And some documentation about this parameter would be really beneficial. Cheers, Hannes