RE: [RFC PATCH] vfio/ccw: Move mdev stuff out of struct subchannel

Tian, Kevin
2022-08-18T06:53:37Z

Hi, Eric,

> From: Eric Farman
> Sent: Tuesday, July 26, 2022 11:37 PM
>
> --- a/drivers/s390/cio/vfio_ccw_private.h
> +++ b/drivers/s390/cio/vfio_ccw_private.h
> @@ -111,6 +111,10 @@ struct vfio_ccw_private {
> struct eventfd_ctx *req_trigger;
> struct work_struct io_work;
> struct work_struct crw_work;
> +
> + struct mdev_parent parent;
> + struct mdev_type mdev_type;
> + struct mdev_type *mdev_types[1];
> } __aligned(8);
>

IMHO creating a separate structure to encapsulate parent related
information is far cleaner than mixing both mdev and parent into
one structure.

mdev and parent have different life cycles. mdev is between
mdev probe/remove while parent is between css probe/remove.

Mixing them together prevents further cleanup in vfio core [1]
which you posted in earlier series and also other upcoming
improvements [2].

Thanks
Kevin

[1] https://lore.kernel.org/all/20220602171948.2790690-16-farman@linux.ibm.com/
[2] https://listman.redhat.com/archives/libvir-list/2022-August/233482.html