Ok, then we can simply forbid increasing the avail_idx in this case?
Basically, it's a question of whether or not it's better to done it in
the level of virtio instead of vhost. I'm pretty sure if we expose
sufficient information, it could be done without touching vhost-user.
And we won't deal with e.g migration and other cases.
OK, I get your point. That's indeed an alternative way. But this feature seems
to be only useful to vhost-user backend.
I admit I could not think of a use case other than vhost-user.
I'm not sure whether it make sense to
touch virtio protocol for this feature.
Some possible advantages:
- Feature could be determined and noticed by user or management layer.
- There's no need to invent ring layout specific protocol to record in
flight descriptors. E.g if my understanding is correct, for this series
and for the example above, it still can not work for packed virtqueue
since descriptor id is not sufficient (descriptor could be overwritten
by used one). You probably need to have a (partial) copy of descriptor
ring for this.
- No need to deal with migration, all information was in guest memory.