Skip to content

virtio: alignment issues

Michael S. Tsirkin dri-devel kvm linux-block linux-crypto linux-remoteproc lkml netdev platform-driver-x86 virtualization 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest19 patches 4 repliesIn review
  2. v719 patches 2 repliesSuperseded
  3. v612 patches 1 replySuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v512 patches1 replySuperseded
v412 patches0 repliesSuperseded
v32 patches0 repliesSuperseded
v22 patches2 repliesSuperseded

Changes in v8 from the cover letter

typo fix

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19tools/virtio: define aligned attributetools/virtio/linux/compiler.h+1 -00 replies
2/19tools/virtio: make asm/barrier.h self containedtools/virtio/asm/barrier.h+1 -00 replies
3/19tools/virtio: define __KERNEL__tools/virtio/Makefile+1 -10 replies
4/19virtio: add VIRTIO_RING_NO_LEGACYdrivers/virtio/virtio_pci_modern.c include/uapi/linux/virtio_ring.h+5 -00 replies
5/19virtgpu: pull in uaccess.hdrivers/gpu/drm/virtio/virtgpu_ioctl.c+1 -00 replies
6/19virtio-rng: pull in slab.hdrivers/char/hw_random/virtio-rng.c+1 -00 replies
7/19remoteproc: pull in slab.hdrivers/remoteproc/remoteproc_sysfs.c+1 -01 reply
8/19virtio_input: pull in slab.hdrivers/virtio/virtio_input.c+1 -00 replies
9/19virtio: stop using legacy struct vring in kerneldrivers/block/virtio_blk.c include/linux/virtio.h include/linux/virtio_ring.h +2 more+28 -111 reply
10/19vhost: force spec specified alignment on typesdrivers/vhost/vhost.h include/linux/virtio_ring.h+24 -60 replies
11/19virtio: add legacy init/size APIsinclude/linux/virtio_ring.h+18 -00 replies
12/19virtio_ring: switch to virtio_legacy_init/sizedrivers/virtio/virtio_ring.c+9 -60 replies
13/19tools/virtio: switch to virtio_legacy_init/sizetools/virtio/ringtest/virtio_ring_0_9.c tools/virtio/virtio_test.c tools/virtio/vringh_test.c+15 -150 replies
14/19vop: switch to virtio_legacy_init/sizedrivers/misc/mic/vop/vop_main.c drivers/misc/mic/vop/vop_vringh.c+8 -50 replies
15/19remoteproc: switch to virtio_legacy_init/sizedrivers/remoteproc/remoteproc_core.c drivers/remoteproc/remoteproc_virtio.c+2 -21 reply
16/19mellanox: switch to virtio_legacy_init/sizedrivers/platform/mellanox/mlxbf-tmfifo.c+3 -30 replies
17/19vhost: option to fetch descriptors through an independent structdrivers/vhost/vhost.c drivers/vhost/vhost.h+312 -10 replies
18/19vhost: use batched version by defaultdrivers/vhost/vhost.c drivers/vhost/vhost.h+2 -2530 replies
19/19vhost: batching fetchesdrivers/vhost/test.c drivers/vhost/vhost.c drivers/vhost/vhost.h+47 -70 replies

Reviews trailers per patch

5 of 19 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoAshutosh DixitBjorn AnderssonStefan Hajnoczi
1/19
2/19
3/19
4/19
5/19
6/19
7/19A-b
8/19
9/19R-b
10/19
11/19
12/19
13/19
14/19A-b
15/19A-b
16/19A-b
17/19
18/19
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v8 thread

Cover letter [PATCH v8 00/19] virtio: alignment issues

This is an alternative to
vhost: force spec specified alignment on types
which is a bit safer as it does not change UAPI. I still think it's best to change the UAPI header as well, we can do that as a follow-up cleanup.

changes from v7:
typo fix
changes from v6:
add missing header includes all over the place
changes from v5:
ack for mellanox patch
fixup to remoteproc
changes from v4:
fixup to issues reported by kbuild
changes from v3:
tools/virtio fixes
a bunch more cleanups that now become possible

Changes from v2:
don't change struct name, instead add ifndef so kernel does not see the legacy UAPI version.

Jason, can you pls ack one of the approaches?

Matej Genci (1):
virtio: add VIRTIO_RING_NO_LEGACY

Michael S. Tsirkin (18):
tools/virtio: define aligned attribute
tools/virtio: make asm/barrier.h self contained tools/virtio: define __KERNEL__
virtgpu: pull in uaccess.h
virtio-rng: pull in slab.h
remoteproc: pull in slab.h
virtio_input: pull in slab.h
virtio: stop using legacy struct vring in kernel
vhost: force spec specified alignment on types
virtio: add legacy init/size APIs
virtio_ring: switch to virtio_legacy_init/size tools/virtio: switch to virtio_legacy_init/size
vop: switch to virtio_legacy_init/size
remoteproc: switch to virtio_legacy_init/size
mellanox: switch to virtio_legacy_init/size
vhost: option to fetch descriptors through an independent struct
vhost: use batched version by default
vhost: batching fetches

 drivers/block/virtio_blk.c               |   1 +
 drivers/char/hw_random/virtio-rng.c      |   1 +
 drivers/gpu/drm/virtio/virtgpu_ioctl.c   |   1 +
 drivers/misc/mic/vop/vop_main.c          |   5 +-
 drivers/misc/mic/vop/vop_vringh.c        |   8 +-
 drivers/platform/mellanox/mlxbf-tmfifo.c |   6 +-
 drivers/remoteproc/remoteproc_core.c     |   2 +-
 drivers/remoteproc/remoteproc_sysfs.c    |   1 +
 drivers/remoteproc/remoteproc_virtio.c   |   2 +-
 drivers/vhost/test.c                     |   2 +-
 drivers/vhost/vhost.c                    | 271 +++++++++++++++--------
 drivers/vhost/vhost.h                    |  23 +-
 drivers/virtio/virtio_input.c            |   1 +
 drivers/virtio/virtio_pci_modern.c       |   1 +
 drivers/virtio/virtio_ring.c             |  15 +-
 include/linux/virtio.h                   |   1 -
 include/linux/virtio_ring.h              |  46 ++++
 include/linux/vringh.h                   |   1 +
 include/uapi/linux/virtio_ring.h         |  30 ++-
 tools/virtio/Makefile                    |   2 +-
 tools/virtio/asm/barrier.h               |   1 +
 tools/virtio/linux/compiler.h            |   1 +
 tools/virtio/ringtest/virtio_ring_0_9.c  |   6 +-
 tools/virtio/virtio_test.c               |   6 +-
 tools/virtio/vringh_test.c               |  18 +-
 25 files changed, 311 insertions(+), 141 deletions(-)
Signature · 1 line
MST