virtio — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
[PATCH RFC] VIRTIO_F_PARTIAL_ORDER for page fault handling
On Tue, 11 Aug 2020 04:23:13 -0400
"Michael S. Tsirkin" <[email protected]> wrote:
> On Mon, Aug 10, 2020 at 06:59:28PM +0200, Cornelia Huck wrote:
>
> On Mon, 10 Aug 2020 12:15:15 -0400
> > "Michael S. Tsirkin" <[email protected]> wrote:
> >
> diff --git a/split-ring.tex b/split-ring.tex
> >
> index 123ac9f..cf197f8 100644
> > > --- a/split-ring.tex
> > > +++ b/split-ring.tex
> > > @@ -398,10 +398,11 @@ \subsection{The Virtqueue Used Ring}\label{sec:Basic Facilities of a Virtio Devi
> >
>
le16 avail_event; /* Only if VIRTIO_F_EVENT_IDX */
> > > };
> > >
> > > -/* le32 is used here for ids for padding reasons. */
> >
> struct virtq_used_elem {
> > >
/* Index of start of used descriptor chain. */
> > > -
le32 id;
> > > +
le16 id;
> > > +#define VIRTQ_USED_ELEM_F_FLUSH 0x8000
> > > +
le16 flags;
> >
>
> This is a bit confusing for legacy, as this will only work for
>
> little-endian. The flags field will only be used for non-legacy, but I
>
> think the id field should still be treated as 32 bit for legacy.
> > (We have a wholesale "it's guest endian when legacy" further up.)
>
> True. How do you suggest handling this? Just say that id is
> OR with VIRTQ_USED_ELEM_F_FLUSH ? Or maybe just add
> struct virtq_used_elem_legacy?
I think introducing a legacy struct is the least confusing option.
>
>
> > >
/* Total length of the descriptor chain which was used (written to) */
> >
>
le32 len;
> > > };
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]