All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the used ring
Date: Mon, 27 Apr 2015 16:18:43 +0200	[thread overview]
Message-ID: <553E4543.9080700@redhat.com> (raw)
In-Reply-To: <20150427160216-mutt-send-email-mst@redhat.com>



On 27/04/2015 16:04, Michael S. Tsirkin wrote:
>> > Because virtio-blk uses a response footer and virtio-scsi uses a
>> > response header, fixing virtio-blk is much harder.  You need to add a
>> > new argument to virtqueue_push.  I'd really prefer someone else to do it...
>> > 
>> > Paolo
> OK but what's the desired API?
> Do you know the host length or might any part of iov
> be dirty?

For a 1-sector request and a 2048+1 bytes iov, I know that I've written
bytes 0-511 and byte 2048.

So I have to dirty all 2049 bytes, but the written length should be 512.
 Right now we pass 2049 to virtqueue_push and write 2049 to the written
length, I'd need another argument to pass the 512.

Paolo

  reply	other threads:[~2015-04-27 14:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 12:29 [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the used ring Paolo Bonzini
2015-04-27 13:23 ` Michael S. Tsirkin
2015-04-27 13:28   ` Paolo Bonzini
2015-04-27 14:04     ` Michael S. Tsirkin
2015-04-27 14:18       ` Paolo Bonzini [this message]
2015-04-27 14:20         ` Michael S. Tsirkin

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=553E4543.9080700@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.