Skip to contentSkip to conversation

virtio,vdpa,vhost: features, fixes

GIT PULL Merged Michael S. Tsirkin 4 participants 6 messages Sep 9, 2021 – Sep 12, 2021

Subsystems (4)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

The following changes since commit 7d2a07b769330c34b4deabeed939325c77a7ec2f:

Linux 5.14 (2021-08-29 15:04:50 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 7bc7f61897b66bef78bb5952e3d1e9f3aaf9ccca:

Documentation: Add documentation for VDUSE (2021-09-06 07:20:58 -0400)

----------------------------------------------------------------
virtio,vdpa,vhost: features, fixes

vduse driver supporting blk
virtio-vsock support for end of record with SEQPACKET
vdpa: mac and mq support for ifcvf and mlx5
vdpa: management netlink for ifcvf virtio-i2c, gpio dt bindings

misc fixes, cleanups

NB: when merging this with
b542e383d8c0 ("eventfd: Make signal recursion protection a task bit") from Linus' tree, replace eventfd_signal_count with eventfd_signal_allowed, and drop the export of eventfd_wake_count from ("eventfd: Export eventfd_wake_count to modules").

----------------------------------------------------------------
Arseny Krasnov (6):
virtio/vsock: rename 'EOR' to 'EOM' bit. virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOR' bit. vhost/vsock: support MSG_EOR bit processing virtio/vsock: support MSG_EOR bit processing
af_vsock: rename variables in receive loop
vsock_test: update message bounds test for MSG_EOR

Cai Huoqing (2):
vhost scsi: Convert to SPDX identifier
vdpa: Make use of PFN_PHYS/PFN_UP/PFN_DOWN helper macro

Eli Cohen (6):
vdpa/mlx5: Remove redundant header file inclusion vdpa/mlx5: function prototype modifications in preparation to control VQ vdpa/mlx5: Decouple virtqueue callback from struct mlx5_vdpa_virtqueue vdpa/mlx5: Ensure valid indices are provided
vdpa/mlx5: Add support for control VQ and MAC setting vdpa/mlx5: Add multiqueue support

Max Gurtovoy (1):
virtio-blk: remove unneeded "likely" statements

Viresh Kumar (5):
dt-bindings: virtio: Add binding for virtio devices
dt-bindings: i2c: Add bindings for i2c-virtio
dt-bindings: gpio: Add bindings for gpio-virtio
uapi: virtio_ids: Sync ids with specification
virtio: Bind virtio device to device-tree node

Xianting Tian (1):
virtio-balloon: Use virtio_find_vqs() helper

Xie Yongji (14):
vdpa_sim: Use iova_shift() for the size passed to alloc_iova()
iova: Export alloc_iova_fast() and free_iova_fast()
eventfd: Export eventfd_wake_count to modules
file: Export receive_fd() to modules
vdpa: Fix some coding style issues
vdpa: Add reset callback in vdpa_config_ops
vhost-vdpa: Handle the failure of vdpa_reset()
vhost-iotlb: Add an opaque pointer for vhost IOTLB
vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()
vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()
vdpa: Support transferring virtual addressing during DMA mapping
vduse: Implement an MMU-based software IOTLB
vduse: Introduce VDUSE - vDPA Device in Userspace
Documentation: Add documentation for VDUSE

Zhu Lingshan (4):
vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id vDPA/ifcvf: implement management netlink framework for ifcvf vDPA/ifcvf: detect and use the onboard number of queues directly vDPA/ifcvf: enable multiqueue and control vq

 .../devicetree/bindings/gpio/gpio-virtio.yaml      |   59 +
 .../devicetree/bindings/i2c/i2c-virtio.yaml        |   51 +
 Documentation/devicetree/bindings/virtio/mmio.yaml |    3 +-
 .../devicetree/bindings/virtio/virtio-device.yaml  |   41 +
 Documentation/userspace-api/index.rst              |    1 +
 Documentation/userspace-api/ioctl/ioctl-number.rst |    1 +
 Documentation/userspace-api/vduse.rst              |  233 +++
 drivers/block/virtio_blk.c                         |    4 +-
 drivers/iommu/iova.c                               |    2 +
 drivers/vdpa/Kconfig                               |   11 +
 drivers/vdpa/Makefile                              |    1 +
 drivers/vdpa/ifcvf/ifcvf_base.c                    |    8 +-
 drivers/vdpa/ifcvf/ifcvf_base.h                    |   25 +-
 drivers/vdpa/ifcvf/ifcvf_main.c                    |  257 ++-
 drivers/vdpa/mlx5/core/mlx5_vdpa.h                 |   26 +-
 drivers/vdpa/mlx5/core/mr.c                        |   81 +-
 drivers/vdpa/mlx5/core/resources.c                 |   35 +
 drivers/vdpa/mlx5/net/mlx5_vnet.c                  |  555 ++++++-
 drivers/vdpa/vdpa.c                                |    9 +-
 drivers/vdpa/vdpa_sim/vdpa_sim.c                   |   29 +-
 drivers/vdpa/vdpa_user/Makefile                    |    5 +
 drivers/vdpa/vdpa_user/iova_domain.c               |  545 +++++++
 drivers/vdpa/vdpa_user/iova_domain.h               |   73 +
 drivers/vdpa/vdpa_user/vduse_dev.c                 | 1641 ++++++++++++++++++++
 drivers/vdpa/virtio_pci/vp_vdpa.c                  |   17 +-
 drivers/vhost/iotlb.c                              |   20 +-
 drivers/vhost/scsi.c                               |   14 +-
 drivers/vhost/vdpa.c                               |  188 ++-
 drivers/vhost/vsock.c                              |   28 +-
 drivers/virtio/virtio.c                            |   57 +-
 drivers/virtio/virtio_balloon.c                    |    4 +-
 fs/eventfd.c                                       |    1 +
 fs/file.c                                          |    6 +
 include/linux/file.h                               |    7 +-
 include/linux/vdpa.h                               |   62 +-
 include/linux/vhost_iotlb.h                        |    3 +
 include/uapi/linux/vduse.h                         |  306 ++++
 include/uapi/linux/virtio_ids.h                    |   12 +
 include/uapi/linux/virtio_vsock.h                  |    3 +-
 net/vmw_vsock/af_vsock.c                           |   10 +-
 net/vmw_vsock/virtio_transport_common.c            |   23 +-
 tools/testing/vsock/vsock_test.c                   |    8 +-
 42 files changed, 4136 insertions(+), 329 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-virtio.yaml
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-virtio.yaml
 create mode 100644 Documentation/devicetree/bindings/virtio/virtio-device.yaml
 create mode 100644 Documentation/userspace-api/vduse.rst
 create mode 100644 drivers/vdpa/vdpa_user/Makefile
 create mode 100644 drivers/vdpa/vdpa_user/iova_domain.c
 create mode 100644 drivers/vdpa/vdpa_user/iova_domain.h
 create mode 100644 drivers/vdpa/vdpa_user/vduse_dev.c
 create mode 100644 include/uapi/linux/vduse.h

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#1 lore raw
Quoted 6 lines · Michael S. Tsirkin

NB: when merging this with
b542e383d8c0 ("eventfd: Make signal recursion protection a task bit") from Linus' tree, replace eventfd_signal_count with eventfd_signal_allowed, and drop the export of eventfd_wake_count from ("eventfd: Export eventfd_wake_count to modules").

What? No. That can't be right.

Do you mean "replace eventfd_signal_count with !eventfd_signal_allowed()"?

Because if I read the logic correctly, the issue is that 'vduse_vq_kick()' will call eventfd_signal().

Which it must not do it eventfd_signal_allowed() returns false.

So if eventfd_signal_allowed() is _not_ set, the code needs to defer it to the workqueue.

No?

Side note: I was _this_ close to just not pulling this. The commits were all from after the merge window opened, and I got this pull request in the latter half of the second week of the merge window.

Your "explanations" for this pull are also not any language I recognize, or even remotely human-readable.

WTF does "vduse driver supporting blk" mean, and how is that supposed to explain anything at all?

That is NOT how these things are supposed to work. AT ALL.

So you are hereby put on notice: next time I get this kind of half-arsed garbage pull request, I won't spend the energy on trying to figure out what is actually going on. I will just throw it in the trash.

Because honestly, that's where this pull request belonged.

Linus
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw
Quoted 16 lines · Linus Torvalds
Quoted 6 lines · Michael S. Tsirkin

NB: when merging this with
b542e383d8c0 ("eventfd: Make signal recursion protection a task bit") from Linus' tree, replace eventfd_signal_count with eventfd_signal_allowed, and drop the export of eventfd_wake_count from ("eventfd: Export eventfd_wake_count to modules").

What? No. That can't be right.

Do you mean "replace eventfd_signal_count with !eventfd_signal_allowed()"?

Because if I read the logic correctly, the issue is that 'vduse_vq_kick()' will call eventfd_signal().

Quoted 7 lines

Which it must not do it eventfd_signal_allowed() returns false.

So if eventfd_signal_allowed() is _not_ set, the code needs to defer it to the workqueue.

No?

Yes, that's my fault. I just check how the eventfd_signal_allowed() works in fs/aio.c (also needs a fix) when I see the fix for the merge conflicts. Sorry for that.

Thanks,
Yongji

author maintainer
#3 lore raw
In reply to Linus Torvalds
Quoted 8 lines · Linus Torvalds

So you are hereby put on notice: next time I get this kind of half-arsed garbage pull request, I won't spend the energy on trying to figure out what is actually going on. I will just throw it in the trash.

Because honestly, that's where this pull request belonged.

Linus

OK so I was worrying about these patches anyway, and that is why I put them on top. So I just sent GIT PULL V2 which includes all the same commits except for the last 13 patches, so they all have been in linux-next.

It's in the tag for_linus_v2 - the point of keeping for_linus intact was so anyone can compare these two.

Hope that clarifies rather than confuses things even more.

Mea culpa, etc.

Signature · 6 lines
MST

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#4 lore raw
Quoted 3 lines · Michael S. Tsirkin

It's in the tag for_linus_v2 - the point of keeping for_linus intact was so anyone can compare these two.

Well, since I had already spent the effort in trying to figure things out, I had merged the original branch.

I just didn't _like_ having to spend that effort, particularly not the weekend before I do rc1.

This has not been one of those smooth merge windows that we occasionally have.

Linus

merge bot Merged
#5 lore raw
In reply to Michael S. Tsirkin
The pull request you sent on Thu, 9 Sep 2021 09:56:08 -0400:

The pull request you sent on Thu, 9 Sep 2021 09:56:08 -0400:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/78e709522d2c012cb0daad2e668506637bffb7c2

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html