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

2023-12-19 Thread Yishai Hadas
://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/Makefile| 2

[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 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-19 Thread Yishai Hadas
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 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-19 Thread Yishai Hadas
. 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/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 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 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 4/9] virtio-pci: Introduce admin commands

2023-12-19 Thread Yishai Hadas
y the 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 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 0/9] Introduce a vfio driver over virtio devices

2023-12-19 Thread Yishai Hadas
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 virtio-pci: Introduce admin commands Yishai Hadas

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

2023-12-18 Thread Yishai Hadas
://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/Makefile| 2

[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 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-18 Thread Yishai Hadas
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 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-18 Thread Yishai Hadas
. 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/virtio

[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 4/9] virtio-pci: Introduce admin commands

2023-12-18 Thread Yishai Hadas
y the 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 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 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 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 0/9] Introduce a vfio driver over virtio devices

2023-12-18 Thread Yishai Hadas
(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: Initialize the supported admin commands virtio-pci: Introduce APIs to exec

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

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 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-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-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

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

2023-12-14 Thread Yishai Hadas
://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/vfio/pci/virtio

[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 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-14 Thread Yishai Hadas
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 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-14 Thread Yishai Hadas
will 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 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 4/9] virtio-pci: Introduce admin commands

2023-12-14 Thread Yishai Hadas
y the 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 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 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 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
(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: Initialize the supported admin commands virtio-pci: Introduce A

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

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 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-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 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

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

2023-12-07 Thread Yishai Hadas
/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/vfio/pci/virtio

[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 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 Hadas

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

2023-12-07 Thread Yishai Hadas
will 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 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 4/9] virtio-pci: Introduce admin commands

2023-12-07 Thread Yishai Hadas
y the 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 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 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 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 0/9] Introduce a vfio driver over virtio devices

2023-12-07 Thread Yishai Hadas
ion virtqueue virtio-pci: Introduce admin virtqueue virtio-pci: Introduce admin command sending function virtio-pci: Introduce admin commands Yishai Hadas (5): virtio-pci: Initialize the supported admin commands virtio-pci: Introduce APIs to execute legacy IO admin commands vfio/pci: Exp

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 V6 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-06 Thread Yishai Hadas
/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 + drivers/vfio

[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 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/vfio/pci

[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
will 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 4/9] virtio-pci: Introduce admin commands

2023-12-06 Thread Yishai Hadas
y the 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 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 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 0/9] Introduce a vfio driver over virtio devices

2023-12-06 Thread Yishai Hadas
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 virtio-pci: Introduce admin commands Yis

[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 V5 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-05 Thread Yishai Hadas
/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 + drivers/vfio

[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 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/vfio/pci

[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 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-12-05 Thread Yishai Hadas
will 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
y the 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 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 0/9] Introduce a vfio driver over virtio devices

2023-12-05 Thread Yishai Hadas
uce admin virtqueue virtio-pci: Introduce admin command sending function virtio-pci: Introduce admin commands Yishai Hadas (5): virtio-pci: Initialize the supported admin commands virtio-pci: Introduce APIs to execute legacy IO admin commands vfio/pci: Expose vfio_pci_core_setup_bar

[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 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

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

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 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 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

[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/vfio/pci

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

2023-11-29 Thread Yishai Hadas
will 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 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 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 0/9] Introduce a vfio driver over virtio devices

2023-11-29 Thread Yishai Hadas
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: Initialize the supported admin commands virtio-pci: Introduce APIs to execute legacy IO admin comma

[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

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 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/vfio/pci

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

2023-11-13 Thread Yishai Hadas
/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 + drivers/vfio

[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 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-11-13 Thread Yishai Hadas
will 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 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 4/9] virtio-pci: Introduce admin commands

2023-11-13 Thread Yishai Hadas
y the 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 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 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 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 0/9] Introduce a vfio driver over virtio devices

2023-11-13 Thread Yishai Hadas
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 virtio-pci: Introduce admin commands Yis