[PATCH v1 0/4] virtio: Refactor vhost input stub

Leo Yan posted 4 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231113011642.48176-1-leo.yan@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
docs/system/devices/vhost-user-input.rst |  44 ++++++++
docs/system/devices/vhost-user.rst       |   2 +-
hw/input/meson.build                     |   1 -
hw/input/vhost-user-input.c              | 136 -----------------------
hw/virtio/meson.build                    |   4 +-
hw/virtio/vhost-user-base.c              |  17 +++
hw/virtio/vhost-user-input-pci.c         |   3 -
hw/virtio/vhost-user-input.c             |  58 ++++++++++
include/hw/virtio/virtio-input.h         |   6 +-
9 files changed, 126 insertions(+), 145 deletions(-)
create mode 100644 docs/system/devices/vhost-user-input.rst
delete mode 100644 hw/input/vhost-user-input.c
create mode 100644 hw/virtio/vhost-user-input.c
[PATCH v1 0/4] virtio: Refactor vhost input stub
Posted by Leo Yan 1 year ago
This series is to refactor vhost stub vhost-user-input.

Since vhost input stub requires set_config() callback for communication
event configurations between the backend and the guest, patch 01 is a
preparison for support set_config() callback in vhost-user-base.

The patch 02 is to add documentation for vhost-user-input.

The patch 03 is to move virtio input stub from the input folder to the
virtio folder.

The patch 04 derives vhost-user-input from vhost-user-base.  We reuse
the common code from vhhost-user-base as possible and the input stub is
simplized significantly.

This patch set has been tested with the backend daemon:

  # ./build/contrib/vhost-user-input/vhost-user-input \
		     -p /dev/input/event20 -s /tmp/input.sock

The series is based on "[PATCH v8 0/7] virtio: cleanup
vhost-user-generic and reduce c&p" which introduces vhost-user-base.
Based-on: <20231107180752.3458672-1-alex.bennee@linaro.org>


Leo Yan (4):
  hw/virtio: Support set_config() callback in vhost-user-base
  docs/system: Add vhost-user-input documentation
  hw/virtio: Move vhost-user-input into virtio folder
  hw/virtio: derive vhost-user-input from vhost-user-base

 docs/system/devices/vhost-user-input.rst |  44 ++++++++
 docs/system/devices/vhost-user.rst       |   2 +-
 hw/input/meson.build                     |   1 -
 hw/input/vhost-user-input.c              | 136 -----------------------
 hw/virtio/meson.build                    |   4 +-
 hw/virtio/vhost-user-base.c              |  17 +++
 hw/virtio/vhost-user-input-pci.c         |   3 -
 hw/virtio/vhost-user-input.c             |  58 ++++++++++
 include/hw/virtio/virtio-input.h         |   6 +-
 9 files changed, 126 insertions(+), 145 deletions(-)
 create mode 100644 docs/system/devices/vhost-user-input.rst
 delete mode 100644 hw/input/vhost-user-input.c
 create mode 100644 hw/virtio/vhost-user-input.c

-- 
2.34.1
Re: [PATCH v1 0/4] virtio: Refactor vhost input stub
Posted by Michael S. Tsirkin 1 year ago
On Mon, Nov 13, 2023 at 09:16:38AM +0800, Leo Yan wrote:
> This series is to refactor vhost stub vhost-user-input.
> 
> Since vhost input stub requires set_config() callback for communication
> event configurations between the backend and the guest, patch 01 is a
> preparison for support set_config() callback in vhost-user-base.
> 
> The patch 02 is to add documentation for vhost-user-input.
> 
> The patch 03 is to move virtio input stub from the input folder to the
> virtio folder.
> 
> The patch 04 derives vhost-user-input from vhost-user-base.  We reuse
> the common code from vhhost-user-base as possible and the input stub is
> simplized significantly.
> 
> This patch set has been tested with the backend daemon:
> 
>   # ./build/contrib/vhost-user-input/vhost-user-input \
> 		     -p /dev/input/event20 -s /tmp/input.sock
> 
> The series is based on "[PATCH v8 0/7] virtio: cleanup
> vhost-user-generic and reduce c&p" which introduces vhost-user-base.
> Based-on: <20231107180752.3458672-1-alex.bennee@linaro.org>


That patchset is deferred until after the release, so this one
will be, too. I have tagged it, to help make sure it's not
lost pls ping me after the release.

> 
> Leo Yan (4):
>   hw/virtio: Support set_config() callback in vhost-user-base
>   docs/system: Add vhost-user-input documentation
>   hw/virtio: Move vhost-user-input into virtio folder
>   hw/virtio: derive vhost-user-input from vhost-user-base
> 
>  docs/system/devices/vhost-user-input.rst |  44 ++++++++
>  docs/system/devices/vhost-user.rst       |   2 +-
>  hw/input/meson.build                     |   1 -
>  hw/input/vhost-user-input.c              | 136 -----------------------
>  hw/virtio/meson.build                    |   4 +-
>  hw/virtio/vhost-user-base.c              |  17 +++
>  hw/virtio/vhost-user-input-pci.c         |   3 -
>  hw/virtio/vhost-user-input.c             |  58 ++++++++++
>  include/hw/virtio/virtio-input.h         |   6 +-
>  9 files changed, 126 insertions(+), 145 deletions(-)
>  create mode 100644 docs/system/devices/vhost-user-input.rst
>  delete mode 100644 hw/input/vhost-user-input.c
>  create mode 100644 hw/virtio/vhost-user-input.c
> 
> -- 
> 2.34.1
Re: [PATCH v1 0/4] virtio: Refactor vhost input stub
Posted by Leo Yan 1 year ago
Hi Michael,

On Mon, Nov 13, 2023 at 01:29:49AM -0500, Michael S. Tsirkin wrote:

[...]

> > The series is based on "[PATCH v8 0/7] virtio: cleanup
> > vhost-user-generic and reduce c&p" which introduces vhost-user-base.
> > Based-on: <20231107180752.3458672-1-alex.bennee@linaro.org>
> 
> 
> That patchset is deferred until after the release, so this one
> will be, too. I have tagged it, to help make sure it's not
> lost pls ping me after the release.

Just remind, I have sent v2.

And will monitor mailing list for the release.

Thanks,
Leo