mbox series

[RFC,0/7] support vfio platform PMD

Message ID 20221222232436.643514-1-tduszynski@marvell.com (mailing list archive)
Headers
Series support vfio platform PMD |

Message

Tomasz Duszynski Dec. 22, 2022, 11:24 p.m. UTC
  This series aims to add support for managing vfio platform
devices from userspace application conveniently i.e
without going through the configuration required by vfio
and opencoding everything. Instead convenience helpers
are provided.

vfio platform devices, from the kernel standpoint, are ones
that do not have built-in discovery capabilities and are
behind an IOMMU.

This PMD is backed by both vfio-platform and vfio
kernel drivers and ideally should give access to all
vfio capabilities. As of now, access to memory maps and
DMA are supported.

PMD requires platform bus support [1].

[1] https://lore.kernel.org/dpdk-dev/20221222000106.270619-1-tduszynski@marvell.com/

Tomasz Duszynski (7):
  lib: add helper to read strings from sysfs files
  raw/vfio_platform: add driver skeleton
  raw/vfio_platform: add platform probe and remove
  raw/vfio_platform: support rawdev close
  raw/vfio_platform: support rawdev configure
  raw/vfio_platform: support rawdev device info
  raw/vfio_platform: support DMA map/unmap

 app/test/test_eal_fs.c                        | 108 ++++-
 doc/guides/rawdevs/index.rst                  |   1 +
 doc/guides/rawdevs/vfio_platform.rst          |  24 +
 drivers/raw/meson.build                       |   1 +
 drivers/raw/vfio_platform/meson.build         |  16 +
 .../raw/vfio_platform/rte_pmd_vfio_platform.h | 129 +++++
 drivers/raw/vfio_platform/version.map         |  12 +
 drivers/raw/vfio_platform/vfio_platform.c     | 449 ++++++++++++++++++
 drivers/raw/vfio_platform/vfio_platform.h     |  35 ++
 lib/eal/common/eal_filesystem.h               |   6 +
 lib/eal/unix/eal_filesystem.c                 |  24 +-
 lib/eal/version.map                           |   3 +
 12 files changed, 790 insertions(+), 18 deletions(-)
 create mode 100644 doc/guides/rawdevs/vfio_platform.rst
 create mode 100644 drivers/raw/vfio_platform/meson.build
 create mode 100644 drivers/raw/vfio_platform/rte_pmd_vfio_platform.h
 create mode 100644 drivers/raw/vfio_platform/version.map
 create mode 100644 drivers/raw/vfio_platform/vfio_platform.c
 create mode 100644 drivers/raw/vfio_platform/vfio_platform.h

--
2.25.1
  

Comments

Chenbo Xia Dec. 23, 2022, 7:05 a.m. UTC | #1
> -----Original Message-----
> From: Tomasz Duszynski <tduszynski@marvell.com>
> Sent: Friday, December 23, 2022 7:24 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; jerinj@marvell.com; Tomasz Duszynski
> <tduszynski@marvell.com>
> Subject: [RFC PATCH 0/7] support vfio platform PMD
> 
> This series aims to add support for managing vfio platform
> devices from userspace application conveniently i.e
> without going through the configuration required by vfio
> and opencoding everything. Instead convenience helpers
> are provided.
> 
> vfio platform devices, from the kernel standpoint, are ones
> that do not have built-in discovery capabilities and are
> behind an IOMMU.
> 
> This PMD is backed by both vfio-platform and vfio
> kernel drivers and ideally should give access to all
> vfio capabilities. As of now, access to memory maps and
> DMA are supported.
> 
> PMD requires platform bus support [1].
> 
> [1] https://lore.kernel.org/dpdk-dev/20221222000106.270619-1-
> tduszynski@marvell.com/

I have not looked into all details. But just wondering: why not making this
part of the platform bus. This seems generic and then vendors can have their
own platform drivers.

Thanks,
Chenbo
  
Tomasz Duszynski Jan. 12, 2023, 8:14 a.m. UTC | #2
Hi Chenbo, 

>-----Original Message-----
>From: Xia, Chenbo <chenbo.xia@intel.com>
>Sent: Friday, December 23, 2022 8:05 AM
>To: Tomasz Duszynski <tduszynski@marvell.com>; dev@dpdk.org
>Cc: thomas@monjalon.net; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
>Subject: [EXT] RE: [RFC PATCH 0/7] support vfio platform PMD
>
>External Email
>
>----------------------------------------------------------------------
>> -----Original Message-----
>> From: Tomasz Duszynski <tduszynski@marvell.com>
>> Sent: Friday, December 23, 2022 7:24 AM
>> To: dev@dpdk.org
>> Cc: thomas@monjalon.net; jerinj@marvell.com; Tomasz Duszynski
>> <tduszynski@marvell.com>
>> Subject: [RFC PATCH 0/7] support vfio platform PMD
>>
>> This series aims to add support for managing vfio platform devices
>> from userspace application conveniently i.e without going through the
>> configuration required by vfio and opencoding everything. Instead
>> convenience helpers are provided.
>>
>> vfio platform devices, from the kernel standpoint, are ones that do
>> not have built-in discovery capabilities and are behind an IOMMU.
>>
>> This PMD is backed by both vfio-platform and vfio kernel drivers and
>> ideally should give access to all vfio capabilities. As of now, access
>> to memory maps and DMA are supported.
>>
>> PMD requires platform bus support [1].
>>
>> [1]
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_d
>> pdk-2Ddev_20221222000106.270619-2D1-2D&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xt
>> fQ&r=PZNXgrbjdlXxVEEGYkxIxRndyEUwWU_ad5ce22YI6Is&m=D9rwjUu4gMDK-DA_YvF
>> eU6OBKRUXqZVQ7Nfg3O4xldhUMqQsXQx4AM9La3PpF1Bd&s=L93CKF1oLmgSm7z50nWbVf
>> 4FFDww_noCSxOENlbfXGY&e=
>> tduszynski@marvell.com/
>
>I have not looked into all details. But just wondering: why not making this part of the platform
>bus. This seems generic and then vendors can have their own platform drivers.
>

Valid point. I'll rethink current approach.  

>Thanks,
>Chenbo