qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu.
@ 2015-03-11  5:59 Rusty Russell
  2015-03-11  5:59 ` [Qemu-devel] [PATCH 1/2] virtio: make it clear that "len" for a used descriptor is len written Rusty Russell
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Rusty Russell @ 2015-03-11  5:59 UTC (permalink / raw)
  To: QEMU Developers, Michael S. Tsirkin; +Cc: Rusty Russell

The virtio 'used' ring describes descriptors which have been used.  It
also says how many bytes have been written to the ring.  For some cases,
this value is ignored by Linux guests, thus errors have not been noticed.
I was working on increasing the checking in Linux when I noticed this
behaviour.

The first patch changes the 'len' formal parameter name to 'len_written' to
make the API clearer, and adds an assert(). The second fixes block writes.

Cheers,
Rusty.
PS.  It's based on MST's virtio-1.0 tree, but should be easily ported.

Rusty Russell (2):
  virtio: make it clear that "len" for a used descriptor is len written.
  virtio-blk: fix length calculations for write operations.

 hw/block/virtio-blk.c      |  9 ++++++++-
 hw/virtio/virtio.c         | 19 ++++++++++++-------
 include/hw/virtio/virtio.h |  4 ++--
 3 files changed, 22 insertions(+), 10 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-03-20  1:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11  5:59 [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu Rusty Russell
2015-03-11  5:59 ` [Qemu-devel] [PATCH 1/2] virtio: make it clear that "len" for a used descriptor is len written Rusty Russell
2015-03-11  5:59 ` [Qemu-devel] [PATCH 2/2] virtio-blk: fix length calculations for write operations Rusty Russell
2015-03-11  6:48   ` Michael S. Tsirkin
2015-03-11 11:34     ` Rusty Russell
2015-03-11  6:19 ` [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu Michael S. Tsirkin
2015-03-11  6:47   ` Fam Zheng
2015-03-11  6:50     ` Michael S. Tsirkin
2015-03-11 11:36       ` Rusty Russell
2015-03-11 12:39         ` Michael S. Tsirkin
2015-03-12  1:04           ` Rusty Russell
2015-03-12  6:35             ` Michael S. Tsirkin
2015-03-13  1:17               ` Rusty Russell
2015-03-13 13:49                 ` Michael S. Tsirkin
2015-03-16  3:14                   ` Rusty Russell
2015-03-16  5:03                     ` Michael S. Tsirkin
2015-03-16 15:37                       ` Cornelia Huck
2015-03-20  0:59                       ` Rusty Russell
2015-03-18 12:32 ` Michael S. Tsirkin

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).