All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Christoph Hellwig <hch@lst.de>
Subject: [Qemu-devel] Re: megasas: Usage of is_write in megasas_map_sgl()
Date: Fri, 03 Dec 2010 11:42:31 +0100	[thread overview]
Message-ID: <4CF8C997.7030408@suse.de> (raw)
In-Reply-To: <4CF8C57F.7020209@redhat.com>

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

      reply	other threads:[~2010-12-03 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 22:24 [Qemu-devel] megasas: Usage of is_write in megasas_map_sgl() Nicholas A. Bellinger
2010-12-03 10:25 ` [Qemu-devel] " Kevin Wolf
2010-12-03 10:42   ` Hannes Reinecke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF8C997.7030408@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.