virtio: config space endian-ness cleanup
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest38 patches 9 repliesIn review
- v224 patches 44 repliesSuperseded
- v11 patch 2 repliesSuperseded
Changes in v3 from the cover letter
- convert a couple of missing devices
- add APIs for accessing config space as LE, use that in modern devices and in balloon.
- code comments in vdpa_sim explaining use of transitional APIs
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/38 | virtio_balloon: fix sparse warningdrivers/ | +1 | 0 replies | |
| 2/38 | virtio_ring: sparse warning fixupinclude/ | +9 | 0 replies | |
| 3/38 | virtio: allow __virtioXX, __leXX in config spaceinclude/ | +48 | 0 replies | |
| 4/38 | virtio_9p: correct tags for config space fieldsinclude/ | +2 | 0 replies | |
| 5/38 | virtio_balloon: correct tags for config space fieldsinclude/ | +5 | 0 replies | |
| 6/38 | virtio_blk: correct tags for config space fieldsinclude/ | +13 | 1 reply | |
| 7/38 | virtio_console: correct tags for config space fieldsinclude/ | +4 | 0 replies | |
| 8/38 | virtio_crypto: correct tags for config space fieldsinclude/ | +13 | 0 replies | |
| 9/38 | virtio_fs: correct tags for config space fieldsinclude/ | +1 | 0 replies | |
| 10/38 | virtio_gpu: correct tags for config space fieldsinclude/ | +4 | 1 reply | |
| 11/38 | virtio_input: correct tags for config space fieldsinclude/ | +9 | 0 replies | |
| 12/38 | virtio_iommu: correct tags for config space fieldsinclude/ | +6 | 0 replies | |
| 13/38 | virtio_mem: correct tags for config space fieldsinclude/ | +7 | 0 replies | |
| 14/38 | virtio_net: correct tags for config space fieldsinclude/ | +4 | 0 replies | |
| 15/38 | virtio_pmem: correct tags for config space fieldsinclude/ | +2 | 0 replies | |
| 16/38 | virtio_scsi: correct tags for config space fieldsdrivers/ include/ | +12 | 0 replies | |
| 17/38 | virtio_config: disallow native type fieldsinclude/ | +2 | 0 replies | |
| 18/38 | mlxbf-tmfifo: sparse tags for config accessdrivers/ | +10 | 1 reply | |
| 19/38 | vdpa: make sure set_features is invoked for legacydrivers/ include/ | +35 | 0 replies | |
| 20/38 | vhost/vdpa: switch to new helpersdrivers/ | +3 | 0 replies | |
| 21/38 | virtio_vdpa: legacy features handlingdrivers/ | +3 | 0 replies | |
| 22/38 | vdpa_sim: fix endian-ness of config spacedrivers/ | +28 | 0 replies | |
| 23/38 | virtio_config: cread/write cleanupinclude/ | +19 | 0 replies | |
| 24/38 | virtio_config: rewrite using _Genericinclude/ | +77 | 0 replies | |
| 25/38 | virtio_config: disallow native type fields (again)include/ | +2 | 0 replies | |
| 26/38 | virtio_config: LE config space accessorsinclude/ | +65 | 0 replies | |
| 27/38 | virtio_caif: correct tags for config space fieldsinclude/ | +3 | 0 replies | |
| 28/38 | virtio_config: add virtio_cread_le_featureinclude/ | +10 | 0 replies | |
| 29/38 | virtio_balloon: use LE config space accessesdrivers/ | +9 | 0 replies | |
| 30/38 | virtio_input: convert to LE accessorsdrivers/ | +16 | 1 reply | |
| 31/38 | virtio_fs: convert to LE accessorsfs/ | +2 | 1 reply | |
| 32/38 | virtio_crypto: convert to LE accessorsdrivers/ | +23 | 0 replies | |
| 33/38 | virtio_pmem: convert to LE accessorsdrivers/ | +2 | 1 reply | |
| 34/38 | drm/virtio: convert to LE accessorsdrivers/ | +8 | 1 reply | |
| 35/38 | virtio_mem: convert to LE accessorsdrivers/ | +15 | 1 reply | |
| 36/38 | virtio-iommu: convert to LE accessorsdrivers/ | +17 | 0 replies | |
| 37/38 | virtio_config: drop LE option from config spaceinclude/ | +2 | 0 replies | |
| 38/38 | virtio_net: use LE accessors for speed/duplexdrivers/ include/ | +6 | 1 reply |
Reviews trailers per patch
22 of 38 patches have a Reviewed-by or Acked-by.
| Patch | Cornelia Huck | David Hildenbrand | Vivek Goyal | Gerd Hoffmann | Jean-Philippe Brucker | Stefano Garzarella | Andy Shevchenko | Ira Weiny |
|---|---|---|---|---|---|---|---|---|
| 1/38 | R-b R-b | A-b | ||||||
| 2/38 | A-b | |||||||
| 3/38 | A-b | |||||||
| 4/38 | R-b | |||||||
| 5/38 | R-b | A-b | ||||||
| 6/38 | R-b | R-b | ||||||
| 7/38 | R-b | |||||||
| 8/38 | R-b | |||||||
| 9/38 | R-b | A-b A-b | ||||||
| 10/38 | R-b | R-b | ||||||
| 11/38 | R-b | R-b R-b | ||||||
| 12/38 | R-b | R-b R-b | ||||||
| 13/38 | R-b | A-b | ||||||
| 14/38 | ||||||||
| 15/38 | R-b | |||||||
| 16/38 | R-b | |||||||
| 17/38 | ||||||||
| 18/38 | A-b | A-b | ||||||
| 19/38 | ||||||||
| 20/38 | ||||||||
| 21/38 | ||||||||
| 22/38 | ||||||||
| 23/38 | ||||||||
| 24/38 | ||||||||
| 25/38 | ||||||||
| 26/38 | ||||||||
| 27/38 | ||||||||
| 28/38 | ||||||||
| 29/38 | ||||||||
| 30/38 | R-b | |||||||
| 31/38 | A-b | |||||||
| 32/38 | ||||||||
| 33/38 | A-b | |||||||
| 34/38 | R-b | |||||||
| 35/38 | A-b | |||||||
| 36/38 | ||||||||
| 37/38 | ||||||||
| 38/38 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.
Cover letter [PATCH v3 00/38] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are not tagged with the correct endian-ness so it's easy to make mistakes like instanciating config space in native endian-ness.
Further, LE-only devices (e.g. modern-style) add unnecessary overhead by using generic transitional-style config space accesses.
The following patches adding sparse tagging and then using that to correctly access config space as either transitional or LE are my tree.
Lightly tested.
I also start with a version using gcc extensions, then switch to _Generic. This is helpful for backports to older kernels/older
distros: _Generic patch can just be skipped there.
changes from v2:
- convert a couple of missing devices
- add APIs for accessing config space as LE, use that in modern devices and in balloon.
- code comments in vdpa_sim explaining use of transitional APIs
Michael S. Tsirkin (38):
virtio_balloon: fix sparse warning
virtio_ring: sparse warning fixup
virtio: allow __virtioXX, __leXX in config space
virtio_9p: correct tags for config space fields
virtio_balloon: correct tags for config space fields
virtio_blk: correct tags for config space fields
virtio_console: correct tags for config space fields
virtio_crypto: correct tags for config space fields
virtio_fs: correct tags for config space fields
virtio_gpu: correct tags for config space fields
virtio_input: correct tags for config space fields
virtio_iommu: correct tags for config space fields
virtio_mem: correct tags for config space fields
virtio_net: correct tags for config space fields
virtio_pmem: correct tags for config space fields
virtio_scsi: correct tags for config space fields
virtio_config: disallow native type fields
mlxbf-tmfifo: sparse tags for config access
vdpa: make sure set_features is invoked for legacy vhost/vdpa: switch to new helpers
virtio_vdpa: legacy features handling
vdpa_sim: fix endian-ness of config space
virtio_config: cread/write cleanup
virtio_config: rewrite using _Generic
virtio_config: disallow native type fields (again)
virtio_config: LE config space accessors
virtio_caif: correct tags for config space fields
virtio_config: add virtio_cread_le_feature
virtio_balloon: use LE config space accesses
virtio_input: convert to LE accessors
virtio_fs: convert to LE accessors
virtio_crypto: convert to LE accessors
virtio_pmem: convert to LE accessors drm/virtio: convert to LE accessors
virtio_mem: convert to LE accessors
virtio-iommu: convert to LE accessors
virtio_config: drop LE option from config space
virtio_net: use LE accessors for speed/duplex
drivers/crypto/virtio/virtio_crypto_core.c | 46 ++--- drivers/gpu/drm/virtio/virtgpu_kms.c | 16 +- drivers/iommu/virtio-iommu.c | 34 ++-- drivers/net/virtio_net.c | 9 +- drivers/nvdimm/virtio_pmem.c | 4 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 13 +- drivers/scsi/virtio_scsi.c | 4 +- drivers/vdpa/vdpa.c | 1 + drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +++- drivers/vhost/vdpa.c | 8 +- drivers/virtio/virtio_balloon.c | 28 ++-- drivers/virtio/virtio_input.c | 32 ++-- drivers/virtio/virtio_mem.c | 30 ++-- drivers/virtio/virtio_vdpa.c | 9 +- fs/fuse/virtio_fs.c | 4 +- include/linux/vdpa.h | 34 ++++ include/linux/virtio_caif.h | 6 +- include/linux/virtio_config.h | 186 +++++++++++++++------ include/linux/virtio_ring.h | 19 +-- include/uapi/linux/virtio_9p.h | 4 +- include/uapi/linux/virtio_balloon.h | 10 +- include/uapi/linux/virtio_blk.h | 26 +-- include/uapi/linux/virtio_console.h | 8 +- include/uapi/linux/virtio_crypto.h | 26 +-- include/uapi/linux/virtio_fs.h | 2 +- include/uapi/linux/virtio_gpu.h | 8 +- include/uapi/linux/virtio_input.h | 18 +- include/uapi/linux/virtio_iommu.h | 12 +- include/uapi/linux/virtio_mem.h | 14 +- include/uapi/linux/virtio_net.h | 8 +- include/uapi/linux/virtio_pmem.h | 4 +- include/uapi/linux/virtio_scsi.h | 20 +-- 32 files changed, 405 insertions(+), 271 deletions(-)
Signature · 1 line
MST