From: Stefan Hajnoczi <stefanha@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] virtio-blk: Something bizarre with VIRTIO_BLK_T_GET_ID
Date: Wed, 1 Aug 2012 11:31:29 +0100 [thread overview]
Message-ID: <CAJSP0QW+javPq6d79tfbAx6hgAseBoCenci5=7xUZTDhjcd_TA@mail.gmail.com> (raw)
In-Reply-To: <1343816872.2362.2.camel@pasglop>
On Wed, Aug 1, 2012 at 11:27 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2012-08-01 at 11:16 +0100, Stefan Hajnoczi wrote:
>
>> The len field is mostly informational. The virtio device driver
>> inside the guest may make use of it. In many cases it doesn't so an
>> incorrect len value has no effect. In
>> drivers/block/virtio_blk.c:blk_done() the len variable is unused.
>
> Right but arguably the guest reading more than the len passed back into
> the descriptor is itself a bug :-)
>
>> QEMU should call cpu_physical_memory_unmap() with the correct size
>> value in hw/virtio.c:virtqueue_fill() so that the memory dirty bitmap
>> is kept up-to-date. This is the only bad side-effect I can see here.
>
> With the current guest driver ... another one adhering strictly to the
> spec might get bitten :-) Anyway, it's minor, but probably somebody
> should fix. I don't have time right now, but if you don't beat me to it
> I might try to give it a spin tomorrow.
Added to my TODO list but I probably won't get a chance before
tomorrow either because I need to focus on QEMU 1.2 soft freeze.
Stefan
next prev parent reply other threads:[~2012-08-01 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 4:54 [Qemu-devel] virtio-blk: Something bizarre with VIRTIO_BLK_T_GET_ID Benjamin Herrenschmidt
2012-08-01 10:16 ` Stefan Hajnoczi
2012-08-01 10:27 ` Benjamin Herrenschmidt
2012-08-01 10:31 ` Stefan Hajnoczi [this message]
2012-08-01 22:03 ` Anthony Liguori
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='CAJSP0QW+javPq6d79tfbAx6hgAseBoCenci5=7xUZTDhjcd_TA@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=benh@kernel.crashing.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).