[PATCH V3 vfio 0/9] Introduce a vfio driver over virtio devices

2023-11-13 Thread Yishai Hadas
style in a few places. - Add virtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue virtio-pci: Introduce

[PATCH V3 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-11-13 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH V3 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-11-13 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio/virtio_pci_common.h | 15

[PATCH V3 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-11-13 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Signed-off-by: Yishai Hadas --- drivers/virtio

[PATCH V3 vfio 4/9] virtio-pci: Introduce admin commands

2023-11-13 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 44 + 1 file changed, 44 insertions(+) diff --git a/include/uapi/linux/virtio_pci.h b/

[PATCH V3 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-11-13 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.h | 1 + drivers/virtio

[PATCH V3 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-11-13 Thread Yishai Hadas
be used by the next patches from this series. Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_common.h | 2 + drivers/virtio/virtio_pci_modern.c | 245 + include/linux/virtio_pci_admin.h | 21 +++ 4 files

[PATCH V3 vfio 8/9] vfio/pci: Expose vfio_pci_iowrite/read##size()

2023-11-13 Thread Yishai Hadas
to the BAR is needed. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 10 ++ include/linux/vfio_pci_core.h| 19 +++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c

[PATCH V3 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-11-13 Thread Yishai Hadas
tio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile| 2 + drivers/vfio/pci/virtio/Kconfig | 16 + drivers/vfio/pci/virtio/Makefile | 4

[PATCH V3 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-11-13 Thread Yishai Hadas
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Signed-off-by: Yishai Hadas --- drivers/vfi

Re: [PATCH V3 vfio 0/9] Introduce a vfio driver over virtio devices

2023-11-26 Thread Yishai Hadas
On 13/11/2023 12:06, Michael S. Tsirkin wrote: On Mon, Nov 13, 2023 at 10:02:13AM +0200, Yishai Hadas wrote: This series introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Because of LPC, pls allow a bit more time for review. Thanks! Hi Michael

[PATCH V4 vfio 0/9] Introduce a vfio driver over virtio devices

2023-11-29 Thread Yishai Hadas
for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue virtio-pci: Introduce admin command sending function virtio-pci: Introduce admin commands Yishai Hadas (5): virtio-pci: Initia

[PATCH V4 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-11-29 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH V4 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-11-29 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Signed-off-by: Yishai Hadas --- drivers/virtio

[PATCH V4 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-11-29 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio/virtio_pci_common.h | 15

[PATCH V4 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-11-29 Thread Yishai Hadas
be used by the next patches from this series. Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_common.h | 2 + drivers/virtio/virtio_pci_modern.c | 245 + include/linux/virtio_pci_admin.h | 21 +++ 4 files

[PATCH V4 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-11-29 Thread Yishai Hadas
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Signed-off-by: Yishai Hadas --- drivers/vfi

Re: [PATCH V4 vfio 0/9] Introduce a vfio driver over virtio devices

2023-11-30 Thread Yishai Hadas
On 30/11/2023 12:07, Michael S. Tsirkin wrote: On Wed, Nov 29, 2023 at 04:37:37PM +0200, Yishai Hadas wrote: This series introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1

Re: [PATCH V4 vfio 8/9] vfio/pci: Expose vfio_pci_iowrite/read##size()

2023-12-03 Thread Yishai Hadas
On 30/11/2023 21:20, Alex Williamson wrote: On Wed, 29 Nov 2023 16:37:45 +0200 Yishai Hadas wrote: Expose vfio_pci_iowrite/read##size() to let it be used by drivers. This functionality is needed to enable direct access to some physical BAR of the device with the proper locks/checks in place

Re: [PATCH V4 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-03 Thread Yishai Hadas
On 01/12/2023 0:10, Alex Williamson wrote: On Wed, 29 Nov 2023 16:37:46 +0200 Yishai Hadas wrote: Introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1

Re: [PATCH V4 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-05 Thread Yishai Hadas
On 05/12/2023 1:32, Alex Williamson wrote: On Sun, 3 Dec 2023 16:54:41 +0200 Yishai Hadas wrote: On 01/12/2023 0:10, Alex Williamson wrote: On Wed, 29 Nov 2023 16:37:46 +0200 Yishai Hadas wrote: Introduce a vfio driver over virtio devices to support the legacy interface functionality

[PATCH V5 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-05 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V5 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-05 Thread Yishai Hadas
to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue virtio-pci: Introduce admin command sending function virtio-pci: Introduce admin commands Yishai Hadas (5):

[PATCH V5 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-05 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V5 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-05 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V5 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-05 Thread Yishai Hadas
be used by the next patches from this series. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_common.h | 2 + drivers/virtio/virtio_pci_modern.c | 245 + include/linux

[PATCH V5 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-05 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V5 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-05 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V5 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-05 Thread Yishai Hadas
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Signed-off-by: Yishai Hadas --- drivers/vfi

[PATCH V5 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-05 Thread Yishai Hadas
access to the BAR is needed. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 46 +--- include/linux/vfio_pci_core.h| 19 + 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio

[PATCH V5 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-05 Thread Yishai Hadas
tio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile| 2 + drivers/vfio/pci/virtio/Kconfig | 16 + drivers/vfio/pci/virtio/Makefile | 4

[PATCH V6 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-06 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V6 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-06 Thread Yishai Hadas
_pci_core_close_device() as was pointed by Alex. - Adapt to Vfio multi-line comment style in a few places. - Add virtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for adm

[PATCH V6 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-06 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V6 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-06 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V6 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-06 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V6 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-06 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V6 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-06 Thread Yishai Hadas
be used by the next patches from this series. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_common.h | 2 + drivers/virtio/virtio_pci_modern.c | 245 + include/linux

[PATCH V6 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-06 Thread Yishai Hadas
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Signed-off-by: Yishai Hadas --- drivers/vfi

[PATCH V6 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-06 Thread Yishai Hadas
access to the BAR is needed. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 50 +--- include/linux/vfio_pci_core.h| 19 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio

[PATCH V6 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-06 Thread Yishai Hadas
tio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile| 2 + drivers/vfio/pci/virtio/Kconfig | 16 + drivers/vfio/pci/virtio/Makefile | 4

Re: [PATCH V6 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-07 Thread Yishai Hadas
On 07/12/2023 3:09, Jason Gunthorpe wrote: On Wed, Dec 06, 2023 at 10:38:57AM +0200, Yishai Hadas wrote: +static ssize_t +virtiovf_pci_core_read(struct vfio_device *core_vdev, char __user *buf, + size_t count, loff_t *ppos) +{ + struct virtiovf_pci_core_device

[PATCH V7 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-07 Thread Yishai Hadas
rtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue virtio-pci: Introduce admin command sending function

[PATCH V7 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-07 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V7 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-07 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V7 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-07 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V7 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-07 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V7 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-07 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V7 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-07 Thread Yishai Hadas
be used by the next patches from this series. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_common.h | 2 + drivers/virtio/virtio_pci_modern.c | 245 + include/linux

[PATCH V7 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-07 Thread Yishai Hadas
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai

[PATCH V7 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-07 Thread Yishai Hadas
access to the BAR is needed. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 50 +--- include/linux/vfio_pci_core.h| 19 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/drivers/vfio/pci

[PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-07 Thread Yishai Hadas
tio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile| 2 + drivers/vfio/pci/virtio/Kconfig | 16 + drivers/

Re: [PATCH V7 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-11 Thread Yishai Hadas
On 07/12/2023 12:28, Yishai Hadas wrote: This series introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1]. In some systems, there is a need to

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-13 Thread Yishai Hadas
On 13/12/2023 10:23, Tian, Kevin wrote: From: Yishai Hadas Sent: Thursday, December 7, 2023 6:28 PM Any read/write towards the control parts of the BAR will be captured by the new driver and will be translated into admin commands towards the device. Any data path read/write access (i.e

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
On 14/12/2023 8:07, Tian, Kevin wrote: From: Yishai Hadas Sent: Wednesday, December 13, 2023 8:25 PM On 13/12/2023 10:23, Tian, Kevin wrote: From: Yishai Hadas Sent: Thursday, December 7, 2023 6:28 PM + +static ssize_t virtiovf_pci_read_config(struct vfio_device *core_vdev

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
On 14/12/2023 8:38, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:28:20PM +0200, Yishai Hadas wrote: Introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
On 14/12/2023 11:19, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 11:03:49AM +0200, Yishai Hadas wrote: On 14/12/2023 8:38, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:28:20PM +0200, Yishai Hadas wrote: Introduce a vfio driver over virtio devices to support the legacy interface

[PATCH V8 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-14 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V8 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
Vfio multi-line comment style in a few places. - Add virtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue

[PATCH V8 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-14 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V8 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-14 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V8 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-14 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V8 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-14 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V8 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-14 Thread Yishai Hadas
be used by the next patches from this series. Note: As of some limitations in the legacy driver (e.g. lack of memory barriers in ARM, endian-ness is broken in PPC) the virtio_pci_admin_has_legacy_io() returns false on non X86 systems. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V8 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-14 Thread Yishai Hadas
Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 7 --- include/linux/vfio_pci_core.h| 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c index e27de61ac9fe..a9887fd6de46 100644

[PATCH V8 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-14 Thread Yishai Hadas
access to the BAR is needed. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 50 +--- include/linux/vfio_pci_core.h| 19 2 files changed, 45 insertions(+), 24 deletions(-) diff

[PATCH V8 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
ows. [1] https://github.com/oasis-tcs/virtio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile| 2 + drivers/

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
On 14/12/2023 17:05, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 07:59:05AM -0700, Alex Williamson wrote: On Thu, 14 Dec 2023 11:37:10 +0200 Yishai Hadas wrote: On 14/12/2023 11:19, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 11:03:49AM +0200, Yishai Hadas wrote: On 14/12/2023

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Yishai Hadas
On 14/12/2023 18:15, Alex Williamson wrote: On Thu, 14 Dec 2023 18:03:30 +0200 Yishai Hadas wrote: On 14/12/2023 17:05, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 07:59:05AM -0700, Alex Williamson wrote: On Thu, 14 Dec 2023 11:37:10 +0200 Yishai Hadas wrote: OK, if so, we can come

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-17 Thread Yishai Hadas
On 14/12/2023 18:40, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 06:25:25PM +0200, Yishai Hadas wrote: On 14/12/2023 18:15, Alex Williamson wrote: On Thu, 14 Dec 2023 18:03:30 +0200 Yishai Hadas wrote: On 14/12/2023 17:05, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 07:59:05AM

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-17 Thread Yishai Hadas
On 17/12/2023 14:20, Michael S. Tsirkin wrote: On Sun, Dec 17, 2023 at 12:39:48PM +0200, Yishai Hadas wrote: On 14/12/2023 18:40, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 06:25:25PM +0200, Yishai Hadas wrote: On 14/12/2023 18:15, Alex Williamson wrote: On Thu, 14 Dec 2023 18:03:30

Re: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-17 Thread Yishai Hadas
On 17/12/2023 15:42, Michael S. Tsirkin wrote: On Sun, Dec 17, 2023 at 03:20:30PM +0200, Yishai Hadas wrote: On 17/12/2023 14:20, Michael S. Tsirkin wrote: On Sun, Dec 17, 2023 at 12:39:48PM +0200, Yishai Hadas wrote: On 14/12/2023 18:40, Michael S. Tsirkin wrote: On Thu, Dec 14, 2023 at 06

[PATCH V9 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-18 Thread Yishai Hadas
Vfio multi-line comment style in a few places. - Add virtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio: Define feature bit for administration virtqueue virtio-pci: Introduce admin virtqueue virtio

[PATCH V9 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-18 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V9 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-18 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V9 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-18 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V9 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-18 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V9 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-18 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V9 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-18 Thread Yishai Hadas
hance. For now, only support legacy IO on X86. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/Makefile | 1 + drivers/virtio/virtio_pci_admin_legacy_io.c | 244 drivers/virtio/virtio_pci_common.c | 11 + drivers/v

[PATCH V9 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-18 Thread Yishai Hadas
Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 7 --- include/linux/vfio_pci_core.h| 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c index e27de61ac9fe..a9887fd6de46 100644

[PATCH V9 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-18 Thread Yishai Hadas
access to the BAR is needed. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 50 +--- include/linux/vfio_pci_core.h| 19 2 files changed, 45 insertions(+), 24 deletions(-) diff

[PATCH V9 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-18 Thread Yishai Hadas
ows. [1] https://github.com/oasis-tcs/virtio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefi

[PATCH V10 vfio 0/9] Introduce a vfio driver over virtio devices

2023-12-19 Thread Yishai Hadas
#x27;.close_device' op to vfio_pci_core_close_device() as was pointed by Alex. - Adapt to Vfio multi-line comment style in a few places. - Add virtualizat...@lists.linux-foundation.org in the MAINTAINERS file to be CCed for the new driver as was suggested by Jason. Yishai Feng Liu (4): virtio:

[PATCH V10 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-12-19 Thread Yishai Hadas
virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas

[PATCH V10 vfio 4/9] virtio-pci: Introduce admin commands

2023-12-19 Thread Yishai Hadas
he notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_pci.h | 41 + 1 file changed, 41 insertions(+) diff --git a/in

[PATCH V10 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-12-19 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file

[PATCH V10 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-12-19 Thread Yishai Hadas
, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/virtio.c| 37 +++-- drivers/virtio/virtio_pci_common.c | 3 ++ drivers/virtio

[PATCH V10 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-12-19 Thread Yishai Hadas
Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers

[PATCH V10 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-19 Thread Yishai Hadas
hance. For now, only support legacy IO on X86. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas --- drivers/virtio/Makefile | 1 + drivers/virtio/virtio_pci_admin_legacy_io.c | 244 drivers/virtio/virtio_pci_common.c | 11 + drivers/v

[PATCH V10 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-19 Thread Yishai Hadas
Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 7 --- include/linux/vfio_pci_core.h| 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c index e27de61ac9fe..a9887fd6de46 100644

[PATCH V10 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-19 Thread Yishai Hadas
access to the BAR is needed. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci_rdwr.c | 50 +--- include/linux/vfio_pci_core.h| 19 2 files changed, 45 insertions(+), 24 deletions(-) diff

[PATCH V10 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-19 Thread Yishai Hadas
ows. [1] https://github.com/oasis-tcs/virtio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas --- MAINTAINERS | 7 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefi

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-29 Thread Yishai Hadas
On 28/10/2024 20:17, Alex Williamson wrote: On Sun, 27 Oct 2024 12:07:44 +0200 Yishai Hadas wrote: This series enhances the vfio-virtio driver to support live migration for virtio-net Virtual Functions (VFs) that are migration-capable. What's the status of making virtio-net VFs in

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-29 Thread Yishai Hadas
On 28/10/2024 18:23, Jason Gunthorpe wrote: On Mon, Oct 28, 2024 at 10:13:48AM -0600, Alex Williamson wrote: On Sun, 27 Oct 2024 12:07:44 +0200 Yishai Hadas wrote: If the virtio spec doesn't support partial contexts, what makes it beneficial here? It stil lets the receiver 'warm

[PATCH V1 vfio 5/7] vfio/virtio: Add support for the basic live migration functionality

2024-11-04 Thread Yishai Hadas
he virtio device only stops initiating outgoing requests(e.g. DMA, MSIx, etc.) but still must accept incoming operations. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/virtio/Makefile |2 +- drivers/vfio/pci/virtio/common.h | 104 +++ drivers/vfio/pci/virtio/main.c| 144 ++-- drivers

[PATCH V1 vfio 0/7] Enhance the vfio-virtio driver to support live migration

2024-11-04 Thread Yishai Hadas
the default driver operations (i.e., vfio_device_ops) to use the live migration set, and expand it to include the legacy I/O operations if they are compiled and supported. Yishai Yishai Hadas (7): virtio_pci: Introduce device parts access commands virtio: Extend the admin command to include the r

[PATCH V1 vfio 3/7] virtio: Manage device and driver capabilities via the admin commands

2024-11-04 Thread Yishai Hadas
the driver communicates the functionality and resource limits it plans to utilize. The capability VIRTIO_DEV_PARTS_CAP specifically represents the device's parts resource object limit. Manage the device's parts resource object ID using a common IDA for both get and set operations. Signed-

[PATCH V1 vfio 4/7] virtio-pci: Introduce APIs to execute device parts admin commands

2024-11-04 Thread Yishai Hadas
-by: Yishai Hadas --- drivers/virtio/virtio_pci_common.h | 8 +- drivers/virtio/virtio_pci_modern.c | 348 + include/linux/virtio_pci_admin.h | 11 + 3 files changed, 366 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_pci_common.h b/drivers

[PATCH V1 vfio 7/7] vfio/virtio: Enable live migration once VIRTIO_PCI was configured

2024-11-04 Thread Yishai Hadas
, modify the default driver operations (i.e., vfio_device_ops) to use the live migration set, and extend it to include legacy I/O operations if they are compiled and supported. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/virtio/Kconfig | 4 +- drivers/vfio/pci/virtio/Makefile| 1

[PATCH V1 vfio 6/7] vfio/virtio: Add PRE_COPY support for live migration

2024-11-04 Thread Yishai Hadas
ation time nearly the same. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/virtio/common.h | 4 + drivers/vfio/pci/virtio/migrate.c | 233 +- 2 files changed, 229 insertions(+), 8 deletions(-) diff --git a/drivers/vfio/pci/virtio/common.h b/drivers/vfio/pci/virti

  1   2   >