On Thu, Feb 12, 2015 at 12:14:52PM +1030, Rusty Russell wrote:
> Hi all,
>
> I was reading through the spec, and realized that it doesn't
> explicitly ban chaining of indirect descriptors. After virtio-15, it
> says:
>
> An indirect descriptor without next field
> (with flags&VRING_DESC_F_NEXT off) signals the end of the descriptor.
>
> This *implies* that there can't be a "next" after an indirect, but
> doesn't explicitly say that a driver shouldn't do that. That was the
> intent, so I suggest adding to 2.4.5.3.1 Driver Requirements: Indirect
> Descriptors:
>
> The driver MUST NOT set the VIRTQ_DESC_F_NEXT flag on a
> descriptor with the VIRTQ_DESC_F_INDIRECT flag set.
I agree, explicit is good.
Will you open an issue for that?
> Also, the spec allows this combination of direct and indirect descs:
>
> [direct desc]->[direct desc]->[indirect desc]
>
> Whereas lguest assumes the indirect desc comes first. Nobody does this,
> but we should either specify that the device MUST handle it, or that
> the driver MUST NOT do it...
>
> Cheers,
> Rusty.
It does not look very useful, but from a quick look at qemu
code it does seem to support it, so are we sure no one does it?
--
MST