search for: virtio_ring_no_legacy

Displaying 20 results from an estimated 36 matches for "virtio_ring_no_legacy".

2018 Dec 07
1
[RFC 2/3] virtio_ring: add VIRTIO_RING_NO_LEGACY
On Fri, Dec 07, 2018 at 04:48:41PM +0800, Tiwei Bie wrote: > Introduce VIRTIO_RING_NO_LEGACY to support disabling legacy > macros and layout definitions. > > Suggested-by: Michael S. Tsirkin <mst at redhat.com> > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > --- > VRING_AVAIL_ALIGN_SIZE, VRING_USED_ALIGN_SIZE and VRING_DESC_ALIGN_SIZE > are not pre-v...
2018 Dec 07
0
[RFC 2/3] virtio_ring: add VIRTIO_RING_NO_LEGACY
Introduce VIRTIO_RING_NO_LEGACY to support disabling legacy macros and layout definitions. Suggested-by: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- VRING_AVAIL_ALIGN_SIZE, VRING_USED_ALIGN_SIZE and VRING_DESC_ALIGN_SIZE are not pre-virtio 1.0, but can also be disabled...
2019 Sep 11
0
[PATCH v2] virtio: add VIRTIO_RING_NO_LEGACY
...inux/virtio_ring.h b/include/uapi/linux/virtio_ring.h > index 4c4e24c291a5..efe5a421b4ea 100644 > --- a/include/uapi/linux/virtio_ring.h > +++ b/include/uapi/linux/virtio_ring.h > @@ -118,6 +118,8 @@ struct vring_used { > struct vring_used_elem ring[]; > }; > > +#ifndef VIRTIO_RING_NO_LEGACY > + > struct vring { > unsigned int num; > > @@ -128,6 +130,8 @@ struct vring { > struct vring_used *used; > }; > > +#endif /* VIRTIO_RING_NO_LEGACY */ > + > /* Alignment requirements for vring elements. > * When using pre-virtio 1.0 layout, these fa...
2019 Sep 11
0
[PATCH v2] virtio: add VIRTIO_RING_NO_LEGACY
...inux/virtio_ring.h b/include/uapi/linux/virtio_ring.h > index 4c4e24c291a5..efe5a421b4ea 100644 > --- a/include/uapi/linux/virtio_ring.h > +++ b/include/uapi/linux/virtio_ring.h > @@ -118,6 +118,8 @@ struct vring_used { > struct vring_used_elem ring[]; > }; > > +#ifndef VIRTIO_RING_NO_LEGACY > + > struct vring { > unsigned int num; > > @@ -128,6 +130,8 @@ struct vring { > struct vring_used *used; > }; > > +#endif /* VIRTIO_RING_NO_LEGACY */ > + > /* Alignment requirements for vring elements. > * When using pre-virtio 1.0 layout, these fa...
2020 Apr 06
0
[PATCH v4 04/12] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2020 Apr 06
0
[PATCH v5 04/12] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2020 Apr 06
0
[PATCH v6 04/12] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2020 Apr 07
0
[PATCH v7 04/19] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2020 Apr 07
0
[PATCH v8 04/19] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2020 Apr 06
0
[PATCH v4 04/12] virtio: add VIRTIO_RING_NO_LEGACY
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 7abcc50838b8..db93cedd262f 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #define VIRTIO_PCI_NO_LEGACY +#define VIRTIO_RING_NO_LEGACY #include "virtio_pci_common.h" /* diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 559f42e73315..9223c3a5c46a 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -135,6 +135,8 @@ struct vring { #define VRING_US...
2019 Sep 06
0
[PATCH] virtio: add VIRTIO_RING_NO_LEGACY
...uapi/linux/virtio_ring.h > +++ b/include/uapi/linux/virtio_ring.h > @@ -164,6 +164,8 @@ struct vring { > #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) > #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num]) > > +#ifndef VIRTIO_RING_NO_LEGACY > + > static inline void vring_init(struct vring *vr, unsigned int num, void *p, > unsigned long align) > { > @@ -181,6 +183,8 @@ static inline unsigned vring_size(unsigned int num, unsigned long align) > + sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * n...
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, 103 insertions(+), 58 deletions(-) -- 2.17.1
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, 103 insertions(+), 58 deletions(-) -- 2.17.1
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...EXT 0 > > #define VRING_PACKED_DESC_F_WRITE 1 > > #define VRING_PACKED_DESC_F_INDIRECT 2 > > As we aren't sharing code I think I prefer the second form. > Maybe add VRING_NO_LEGACY so people can audit their code > for assumptions? Maybe it's better to name it as VIRTIO_RING_NO_LEGACY which is more consistent with the names in other files. > > We also want to guard layout definitions at the end of that file > I think. Do you mean guard the definitions of `struct vring` and `struct vring_packed` with _NO_LEGACY? > > > > > > > > > > &...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...EXT 0 > > #define VRING_PACKED_DESC_F_WRITE 1 > > #define VRING_PACKED_DESC_F_INDIRECT 2 > > As we aren't sharing code I think I prefer the second form. > Maybe add VRING_NO_LEGACY so people can audit their code > for assumptions? Maybe it's better to name it as VIRTIO_RING_NO_LEGACY which is more consistent with the names in other files. > > We also want to guard layout definitions at the end of that file > I think. Do you mean guard the definitions of `struct vring` and `struct vring_packed` with _NO_LEGACY? > > > > > > > > > > &...
2020 Apr 20
2
[PATCH v3] virtio: force spec specified alignment on types
...vail_t *avail; - struct vring_used *used; + vring_used_t *used; }; -/* Alignment requirements for vring elements. - * When using pre-virtio 1.0 layout, these fall out naturally. - */ -#define VRING_AVAIL_ALIGN_SIZE 2 -#define VRING_USED_ALIGN_SIZE 4 -#define VRING_DESC_ALIGN_SIZE 16 - #ifndef VIRTIO_RING_NO_LEGACY /* The standard layout for the ring is a continuous chunk of memory which looks -- MST
2020 Apr 20
2
[PATCH v3] virtio: force spec specified alignment on types
...vail_t *avail; - struct vring_used *used; + vring_used_t *used; }; -/* Alignment requirements for vring elements. - * When using pre-virtio 1.0 layout, these fall out naturally. - */ -#define VRING_AVAIL_ALIGN_SIZE 2 -#define VRING_USED_ALIGN_SIZE 4 -#define VRING_DESC_ALIGN_SIZE 16 - #ifndef VIRTIO_RING_NO_LEGACY /* The standard layout for the ring is a continuous chunk of memory which looks -- MST
2020 Apr 22
2
[PATCH v4] virtio: force spec specified alignment on types
...vail_t *avail; - struct vring_used *used; + vring_used_t *used; }; -/* Alignment requirements for vring elements. - * When using pre-virtio 1.0 layout, these fall out naturally. - */ -#define VRING_AVAIL_ALIGN_SIZE 2 -#define VRING_USED_ALIGN_SIZE 4 -#define VRING_DESC_ALIGN_SIZE 16 - #ifndef VIRTIO_RING_NO_LEGACY /* The standard layout for the ring is a continuous chunk of memory which looks -- MST
2020 Apr 22
2
[PATCH v4] virtio: force spec specified alignment on types
...vail_t *avail; - struct vring_used *used; + vring_used_t *used; }; -/* Alignment requirements for vring elements. - * When using pre-virtio 1.0 layout, these fall out naturally. - */ -#define VRING_AVAIL_ALIGN_SIZE 2 -#define VRING_USED_ALIGN_SIZE 4 -#define VRING_DESC_ALIGN_SIZE 16 - #ifndef VIRTIO_RING_NO_LEGACY /* The standard layout for the ring is a continuous chunk of memory which looks -- MST
2018 Dec 07
0
[RFC 0/3] virtio_ring: define flags as shifts consistently
...this thread: > https://patchwork.ozlabs.org/patch/1001015/#2042353 How was this tested? I'd suggest building virtio before and after the changes, stripped binary should be exactly the same. > 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, 103 insertions(+), 58 deletions(-) > > -- > 2.17.1