On Fri, Jan 25, 2019 at 02:17:01PM -0500, Michael S. Tsirkin wrote:
> On Fri, Jan 25, 2019 at 03:12:45PM +0000, Stefan Hajnoczi wrote:
> > Based on the Linux guest driver code and the lack of more evidence in
> > the spec, I'm pretty sure data[] doesn't need to be padded to 512 bytes
> > for discard/write zero requests.
> 
> OK. Must devices support such padding?

I see no reason to require padding.  Host APIs and physical storage
controllers do not require it.

> > > Looking at the QEMU sources, it seems like it can deal with both and
> > > always sets the status right behind the last byte:
> > > 
> > >     req->in = (void *)in_iov[in_num - 1].iov_base
> > >               + in_iov[in_num - 1].iov_len
> > >               - sizeof(struct virtio_blk_inhdr);
> > > 
> > > Anyway, I think the virtio spec should be clearer here to avoid bad
> > > implementations in the future, so maybe Changpeng or Michael could
> > > update the spec here a little bit?
> > 
> > Yep, good point.  VIRTIO 1.1 is available for public comments, so I've
> > CCed the list.
> > 
> > Stefan
> 
> Thanks!
> Care creating a github issue? And maybe proposing a spec patch.

Okay.  I will do this on Wednesday 30th of January.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to