| @@ -152,7 +152,12 @@ struct vring_virtqueue { · 151 unmodified lines |
| 152 | 152 | /* Available for packed ring */ |
| 153 | 153 | struct { |
| 154 | 154 | /* Actual memory layout for this queue. */ |
| 155 | | − struct vring_packed vring; |
| 155 | + struct { |
| 156 | + unsigned int num; |
| 157 | + struct vring_packed_desc *desc; |
| 158 | + struct vring_packed_desc_event *driver; |
| 159 | + struct vring_packed_desc_event *device; |
| 160 | + } vring; |
| 156 | 161 | |
| 157 | 162 | /* Driver ring wrap counter. */ |
| 158 | 163 | bool avail_wrap_counter; |
| @@ -1609,6 +1614,9 @@ static struct virtqueue *vring_create_virtqueue_packed( · 1450 unmodified lines |
| 1609 | 1614 | !context; |
| 1610 | 1615 | vq->event = virtio_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX); |
| 1611 | 1616 | |
| 1617 | + if (virtio_has_feature(vdev, VIRTIO_F_ORDER_PLATFORM)) |
| 1618 | + vq->weak_barriers = false; |
| 1619 | + |
| 1612 | 1620 | vq->packed.ring_dma_addr = ring_dma_addr; |
| 1613 | 1621 | vq->packed.driver_event_dma_addr = driver_event_dma_addr; |
| 1614 | 1622 | vq->packed.device_event_dma_addr = device_event_dma_addr; |
| @@ -2079,6 +2087,9 @@ struct virtqueue *__vring_new_virtqueue(unsigned int index, · 464 unmodified lines |
| 2079 | 2087 | !context; |
| 2080 | 2088 | vq->event = virtio_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX); |
| 2081 | 2089 | |
| 2090 | + if (virtio_has_feature(vdev, VIRTIO_F_ORDER_PLATFORM)) |
| 2091 | + vq->weak_barriers = false; |
| 2092 | + |
| 2082 | 2093 | vq->split.queue_dma_addr = 0; |
| 2083 | 2094 | vq->split.queue_size_in_bytes = 0; |
| 2084 | 2095 | |
| @@ -2213,6 +2224,8 @@ void vring_transport_features(struct virtio_device *vdev) · 128 unmodified lines |
| 2213 | 2224 | break; |
| 2214 | 2225 | case VIRTIO_F_RING_PACKED: |
| 2215 | 2226 | break; |
| 2227 | + case VIRTIO_F_ORDER_PLATFORM: |
| 2228 | + break; |
| 2216 | 2229 | default: |
| 2217 | 2230 | /* We don't understand this bit. */ |
| 2218 | 2231 | __virtio_clear_bit(vdev, i); |