search for: avail_flags_shadow

Displaying 20 results from an estimated 75 matches for "avail_flags_shadow".

2016 Aug 31
0
[PATCH v2] virtio_ring: Make interrupt suppression spec compliant
...hanged, 9 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index e383ecd..926ecb7 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -732,7 +732,8 @@ void virtqueue_disable_cb(struct virtqueue *_vq) if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { vq->avail_flags_shadow |= VRING_AVAIL_F_NO_INTERRUPT; - vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); + if (!vq->event) + vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shad...
2016 Aug 31
0
[PATCH v2] virtio_ring: Make interrupt suppression spec compliant
...hanged, 9 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index e383ecd..926ecb7 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -732,7 +732,8 @@ void virtqueue_disable_cb(struct virtqueue *_vq) if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { vq->avail_flags_shadow |= VRING_AVAIL_F_NO_INTERRUPT; - vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); + if (!vq->event) + vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shad...
2015 Nov 11
2
[PATCH] virtio_ring: Shadow available ring flags & index
...io_ring.c b/drivers/virtio/virtio_ring.c index 096b857..6262015 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -80,6 +80,12 @@ struct vring_virtqueue { /* Last used index we've seen. */ u16 last_used_idx; + /* Last written value to avail->flags */ + u16 avail_flags_shadow; + + /* Last written value to avail->idx in guest byte order */ + u16 avail_idx_shadow; + /* How to notify other side. FIXME: commonalize hcalls! */ bool (*notify)(struct virtqueue *vq); @@ -235,13 +241,14 @@ static inline int virtqueue_add(struct virtqueue *_vq, /* Put entry in availa...
2015 Nov 11
2
[PATCH] virtio_ring: Shadow available ring flags & index
...io_ring.c b/drivers/virtio/virtio_ring.c index 096b857..6262015 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -80,6 +80,12 @@ struct vring_virtqueue { /* Last used index we've seen. */ u16 last_used_idx; + /* Last written value to avail->flags */ + u16 avail_flags_shadow; + + /* Last written value to avail->idx in guest byte order */ + u16 avail_idx_shadow; + /* How to notify other side. FIXME: commonalize hcalls! */ bool (*notify)(struct virtqueue *vq); @@ -235,13 +241,14 @@ static inline int virtqueue_add(struct virtqueue *_vq, /* Put entry in availa...
2018 Dec 07
0
[RFC 3/3] virtio_ring: use new vring flags
...sizeof(struct vring_desc); j++) @@ -715,7 +721,8 @@ static void *virtqueue_get_buf_ctx_split(struct virtqueue *_vq, /* If we expect an interrupt for the next entry, tell host * by writing event index and flush out the write before * the read in the next get_buf call. */ - if (!(vq->split.avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) + if (!(vq->split.avail_flags_shadow & + BIT(VRING_SPLIT_AVAIL_F_NO_INTERRUPT))) virtio_store_mb(vq->weak_barriers, &vring_used_event(&vq->split.vring), cpu_to_virtio16(_vq->vdev, vq->last_used_idx)); @@ -730,8 +737,10 @@...
2015 Nov 11
0
[PATCH] virtio_ring: Shadow available ring flags & index
...index 096b857..6262015 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -80,6 +80,12 @@ struct vring_virtqueue { > /* Last used index we've seen. */ > u16 last_used_idx; > > + /* Last written value to avail->flags */ > + u16 avail_flags_shadow; > + > + /* Last written value to avail->idx in guest byte order */ > + u16 avail_idx_shadow; > + > /* How to notify other side. FIXME: commonalize hcalls! */ > bool (*notify)(struct virtqueue *vq); > > @@ -235,13 +241,14 @@ static inline int virtqueue_add(struct vi...
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...this queue */ - struct vring vring; + /* Is this a packed ring? */ + bool packed; /* Can we use weak barriers? */ bool weak_barriers; @@ -87,11 +91,39 @@ struct vring_virtqueue { /* Last used index we've seen. */ u16 last_used_idx; - /* Last written value to avail->flags */ - u16 avail_flags_shadow; + union { + /* Available for split ring */ + struct { + /* Actual memory layout for this queue. */ + struct vring vring; - /* Last written value to avail->idx in guest byte order */ - u16 avail_idx_shadow; + /* Last written value to avail->flags */ + u16 avail_flags_shadow; + +...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...this queue */ - struct vring vring; + /* Is this a packed ring? */ + bool packed; /* Can we use weak barriers? */ bool weak_barriers; @@ -86,11 +90,39 @@ struct vring_virtqueue { /* Last used index we've seen. */ u16 last_used_idx; - /* Last written value to avail->flags */ - u16 avail_flags_shadow; + union { + /* Available for split ring */ + struct { + /* Actual memory layout for this queue. */ + struct vring vring; - /* Last written value to avail->idx in guest byte order */ - u16 avail_idx_shadow; + /* Last written value to avail->flags */ + u16 avail_flags_shadow; + +...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...d ring? */ > + bool packed; > > /* Can we use weak barriers? */ > bool weak_barriers; > @@ -87,11 +91,39 @@ struct vring_virtqueue { > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Last written value to avail-...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...d ring? */ > + bool packed; > > /* Can we use weak barriers? */ > bool weak_barriers; > @@ -87,11 +91,39 @@ struct vring_virtqueue { > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Last written value to avail-...
2018 Dec 07
7
[RFC 0/3] virtio_ring: define flags as shifts consistently
This is a follow up of the discussion in this thread: https://patchwork.ozlabs.org/patch/1001015/#2042353 Tiwei Bie (3): virtio_ring: define flags as shifts consistently virtio_ring: add VIRTIO_RING_NO_LEGACY virtio_ring: use new vring flags drivers/virtio/virtio_ring.c | 100 ++++++++++++++++++------------- include/uapi/linux/virtio_ring.h | 61 +++++++++++++------ 2 files changed,
2018 Dec 07
7
[RFC 0/3] virtio_ring: define flags as shifts consistently
This is a follow up of the discussion in this thread: https://patchwork.ozlabs.org/patch/1001015/#2042353 Tiwei Bie (3): virtio_ring: define flags as shifts consistently virtio_ring: add VIRTIO_RING_NO_LEGACY virtio_ring: use new vring flags drivers/virtio/virtio_ring.c | 100 ++++++++++++++++++------------- include/uapi/linux/virtio_ring.h | 61 +++++++++++++------ 2 files changed,
2018 Apr 10
0
[RFC v2] virtio: support packed ring
.../* Head of free buffer list. */ > - unsigned int free_head; > /* Number we've added since last sync. */ > unsigned int num_added; > > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Head of free buffer list. */...
2018 Apr 13
0
[RFC v2] virtio: support packed ring
.../* Head of free buffer list. */ > - unsigned int free_head; > /* Number we've added since last sync. */ > unsigned int num_added; > > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Head of free buffer list. */...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...packed ring? */ > + bool packed; > > /* Can we use weak barriers? */ > bool weak_barriers; > @@ -86,11 +90,39 @@ struct vring_virtqueue { > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Last written value to avail-&...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...packed ring? */ > + bool packed; > > /* Can we use weak barriers? */ > bool weak_barriers; > @@ -86,11 +90,39 @@ struct vring_virtqueue { > /* Last used index we've seen. */ > u16 last_used_idx; > > - /* Last written value to avail->flags */ > - u16 avail_flags_shadow; > + union { > + /* Available for split ring */ > + struct { > + /* Actual memory layout for this queue. */ > + struct vring vring; > > - /* Last written value to avail->idx in guest byte order */ > - u16 avail_idx_shadow; > + /* Last written value to avail-&...
2018 May 22
9
[RFC v5 0/5] virtio: support packed ring
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost (RFC v4): https://lkml.org/lkml/2018/5/16/501 Both of ping and netperf worked as expected w/ EVENT_IDX disabled. Ping worked as expected w/ EVENT_IDX enabled, but netperf didn't (A hack has been added in the driver to
2018 May 22
9
[RFC v5 0/5] virtio: support packed ring
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost (RFC v4): https://lkml.org/lkml/2018/5/16/501 Both of ping and netperf worked as expected w/ EVENT_IDX disabled. Ping worked as expected w/ EVENT_IDX enabled, but netperf didn't (A hack has been added in the driver to
2021 May 26
2
[PATCH v3 3/4] virtio: fix up virtio_disable_cb
...dex we've seen. */ u16 last_used_idx; + /* Hint for event idx: already triggered no need to disable. */ + bool event_triggered; + union { /* Available for split ring */ struct { @@ -739,7 +742,10 @@ static void virtqueue_disable_cb_split(struct virtqueue *_vq) if (!(vq->split.avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { vq->split.avail_flags_shadow |= VRING_AVAIL_F_NO_INTERRUPT; - if (!vq->event) + if (vq->event) + /* TODO: this is a hack. Figure out a cleaner value to write. */ + vring_used_event(&vq->split.vring) = 0x0; + else vq->split.vring....
2018 Apr 01
8
[RFC v2] virtio: support packed ring
...ost publishes avail event idx */ bool event; - /* Head of free buffer list. */ - unsigned int free_head; /* Number we've added since last sync. */ unsigned int num_added; /* Last used index we've seen. */ u16 last_used_idx; - /* Last written value to avail->flags */ - u16 avail_flags_shadow; + union { + /* Available for split ring */ + struct { + /* Actual memory layout for this queue. */ + struct vring vring; - /* Last written value to avail->idx in guest byte order */ - u16 avail_idx_shadow; + /* Head of free buffer list. */ + unsigned int free_head; + + /* Last wri...