2014-10-27 18:08:52

by Antonios Motakis

[permalink] [raw]
Subject: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

Enable building the VFIO PLATFORM driver that allows to use Linux platform
devices with VFIO.

Signed-off-by: Antonios Motakis <[email protected]>
---
drivers/vfio/Kconfig | 1 +
drivers/vfio/Makefile | 1 +
drivers/vfio/platform/Kconfig | 9 +++++++++
drivers/vfio/platform/Makefile | 4 ++++
4 files changed, 15 insertions(+)
create mode 100644 drivers/vfio/platform/Kconfig
create mode 100644 drivers/vfio/platform/Makefile

diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
index a0abe04..962fb80 100644
--- a/drivers/vfio/Kconfig
+++ b/drivers/vfio/Kconfig
@@ -27,3 +27,4 @@ menuconfig VFIO
If you don't know what to do here, say N.

source "drivers/vfio/pci/Kconfig"
+source "drivers/vfio/platform/Kconfig"
diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
index 0b035b1..dadf0ca 100644
--- a/drivers/vfio/Makefile
+++ b/drivers/vfio/Makefile
@@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
obj-$(CONFIG_VFIO_PCI) += pci/
+obj-$(CONFIG_VFIO_PLATFORM) += platform/
diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
new file mode 100644
index 0000000..c51af17
--- /dev/null
+++ b/drivers/vfio/platform/Kconfig
@@ -0,0 +1,9 @@
+config VFIO_PLATFORM
+ tristate "VFIO support for platform devices"
+ depends on VFIO && EVENTFD && ARM
+ help
+ Support for platform devices with VFIO. This is required to make
+ use of platform devices present on the system using the VFIO
+ framework.
+
+ If you don't know what to do here, say N.
diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
new file mode 100644
index 0000000..279862b
--- /dev/null
+++ b/drivers/vfio/platform/Makefile
@@ -0,0 +1,4 @@
+
+vfio-platform-y := vfio_platform.o vfio_platform_common.o
+
+obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
--
2.1.1


2014-11-12 09:52:35

by Hongbo Zhang

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

On 28 October 2014 02:07, Antonios Motakis
<[email protected]> wrote:
>
> Enable building the VFIO PLATFORM driver that allows to use Linux platform
> devices with VFIO.
>
> Signed-off-by: Antonios Motakis <[email protected]>
> ---
> drivers/vfio/Kconfig | 1 +
> drivers/vfio/Makefile | 1 +
> drivers/vfio/platform/Kconfig | 9 +++++++++
> drivers/vfio/platform/Makefile | 4 ++++
> 4 files changed, 15 insertions(+)
> create mode 100644 drivers/vfio/platform/Kconfig
> create mode 100644 drivers/vfio/platform/Makefile
>
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index a0abe04..962fb80 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -27,3 +27,4 @@ menuconfig VFIO
> If you don't know what to do here, say N.
>
> source "drivers/vfio/pci/Kconfig"
> +source "drivers/vfio/platform/Kconfig"
> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
> index 0b035b1..dadf0ca 100644
> --- a/drivers/vfio/Makefile
> +++ b/drivers/vfio/Makefile
> @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
> obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
> obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
> obj-$(CONFIG_VFIO_PCI) += pci/
> +obj-$(CONFIG_VFIO_PLATFORM) += platform/
> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
> new file mode 100644
> index 0000000..c51af17
> --- /dev/null
> +++ b/drivers/vfio/platform/Kconfig
> @@ -0,0 +1,9 @@
> +config VFIO_PLATFORM
> + tristate "VFIO support for platform devices"
> + depends on VFIO && EVENTFD && ARM

Hi Antonios,
Is this only for ARM? how about X86 and PowerPC?
On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
Access Management Unit), and I am trying to use this VFIO framework on
it.

>
> + help
> + Support for platform devices with VFIO. This is required to make
> + use of platform devices present on the system using the VFIO
> + framework.
> +
> + If you don't know what to do here, say N.
> diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
> new file mode 100644
> index 0000000..279862b
> --- /dev/null
> +++ b/drivers/vfio/platform/Makefile
> @@ -0,0 +1,4 @@
> +
> +vfio-platform-y := vfio_platform.o vfio_platform_common.o
> +
> +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
> --
> 2.1.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2014-11-12 09:57:50

by Antonios Motakis

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

Hello Hongbo,

On Wed, Nov 12, 2014 at 10:52 AM, Hongbo Zhang <[email protected]> wrote:
> On 28 October 2014 02:07, Antonios Motakis
> <[email protected]> wrote:
>>
>> Enable building the VFIO PLATFORM driver that allows to use Linux platform
>> devices with VFIO.
>>
>> Signed-off-by: Antonios Motakis <[email protected]>
>> ---
>> drivers/vfio/Kconfig | 1 +
>> drivers/vfio/Makefile | 1 +
>> drivers/vfio/platform/Kconfig | 9 +++++++++
>> drivers/vfio/platform/Makefile | 4 ++++
>> 4 files changed, 15 insertions(+)
>> create mode 100644 drivers/vfio/platform/Kconfig
>> create mode 100644 drivers/vfio/platform/Makefile
>>
>> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
>> index a0abe04..962fb80 100644
>> --- a/drivers/vfio/Kconfig
>> +++ b/drivers/vfio/Kconfig
>> @@ -27,3 +27,4 @@ menuconfig VFIO
>> If you don't know what to do here, say N.
>>
>> source "drivers/vfio/pci/Kconfig"
>> +source "drivers/vfio/platform/Kconfig"
>> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
>> index 0b035b1..dadf0ca 100644
>> --- a/drivers/vfio/Makefile
>> +++ b/drivers/vfio/Makefile
>> @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
>> obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
>> obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
>> obj-$(CONFIG_VFIO_PCI) += pci/
>> +obj-$(CONFIG_VFIO_PLATFORM) += platform/
>> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
>> new file mode 100644
>> index 0000000..c51af17
>> --- /dev/null
>> +++ b/drivers/vfio/platform/Kconfig
>> @@ -0,0 +1,9 @@
>> +config VFIO_PLATFORM
>> + tristate "VFIO support for platform devices"
>> + depends on VFIO && EVENTFD && ARM
>
> Hi Antonios,
> Is this only for ARM? how about X86 and PowerPC?
> On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
> Access Management Unit), and I am trying to use this VFIO framework on
> it.
>

In principle it should be working on any platform with such devices;
as long as you have a VFIO IOMMU driver for the PAMU (on ARM we use
VFIO PLATFORM for the device, with VFIO IOMMU TYPE1 for the IOMMU).

So if you have a suitable IOMMU driver for your target, feel free to
test it, and let us know of the results.

>>
>> + help
>> + Support for platform devices with VFIO. This is required to make
>> + use of platform devices present on the system using the VFIO
>> + framework.
>> +
>> + If you don't know what to do here, say N.
>> diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
>> new file mode 100644
>> index 0000000..279862b
>> --- /dev/null
>> +++ b/drivers/vfio/platform/Makefile
>> @@ -0,0 +1,4 @@
>> +
>> +vfio-platform-y := vfio_platform.o vfio_platform_common.o
>> +
>> +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
>> --
>> 2.1.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/

2014-11-12 10:39:03

by Hongbo Zhang

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

On 12 November 2014 18:05, [email protected]
<[email protected]> wrote:
> Hi,
>
>
>
> This is not yet supported on Freescale PowerPC. I am still in process of
> upstreaming the FSL PAMU specific patches for same.
>
> Initial plan is to test with PCIe devices and then with Platform devices.
>

I see there is already driver/iommu/fsl_pamu.c, doesn't it work?
Could you explain briefly what is wrong? I've heard that the vfio pci
works on powerpc platforms
Thanks.

>
>
> Thanks
>
> -Bharat
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Hongbo Zhang
> Sent: Wednesday, November 12, 2014 3:08 PM
> To: Antonios Motakis
> Cc: open list:VFIO DRIVER; [email protected]; [email protected];
> open list; [email protected]; [email protected];
> [email protected]
> Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module
> to Kconfig
>
>
>
>
>
>
>
> On 28 October 2014 02:07, Antonios Motakis
> <[email protected]> wrote:
>
> Enable building the VFIO PLATFORM driver that allows to use Linux platform
> devices with VFIO.
>
> Signed-off-by: Antonios Motakis <[email protected]>
> ---
> drivers/vfio/Kconfig | 1 +
> drivers/vfio/Makefile | 1 +
> drivers/vfio/platform/Kconfig | 9 +++++++++
> drivers/vfio/platform/Makefile | 4 ++++
> 4 files changed, 15 insertions(+)
> create mode 100644 drivers/vfio/platform/Kconfig
> create mode 100644 drivers/vfio/platform/Makefile
>
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index a0abe04..962fb80 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -27,3 +27,4 @@ menuconfig VFIO
> If you don't know what to do here, say N.
>
> source "drivers/vfio/pci/Kconfig"
> +source "drivers/vfio/platform/Kconfig"
> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
> index 0b035b1..dadf0ca 100644
> --- a/drivers/vfio/Makefile
> +++ b/drivers/vfio/Makefile
> @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
> obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
> obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
> obj-$(CONFIG_VFIO_PCI) += pci/
> +obj-$(CONFIG_VFIO_PLATFORM) += platform/
> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
> new file mode 100644
> index 0000000..c51af17
> --- /dev/null
> +++ b/drivers/vfio/platform/Kconfig
> @@ -0,0 +1,9 @@
> +config VFIO_PLATFORM
> + tristate "VFIO support for platform devices"
> + depends on VFIO && EVENTFD && ARM
>
>
>
> Hi Antonios,
>
> Is this only for ARM? how about X86 and PowerPC?
>
> On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral Access
> Management Unit), and I am trying to use this VFIO framework on it.
>
>
>
> + help
> + Support for platform devices with VFIO. This is required to make
> + use of platform devices present on the system using the VFIO
> + framework.
> +
> + If you don't know what to do here, say N.
> diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
> new file mode 100644
> index 0000000..279862b
> --- /dev/null
> +++ b/drivers/vfio/platform/Makefile
> @@ -0,0 +1,4 @@
> +
> +vfio-platform-y := vfio_platform.o vfio_platform_common.o
> +
> +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
> --
> 2.1.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>

2014-11-12 11:00:21

by Bhushan Bharat

[permalink] [raw]
Subject: RE: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig



> -----Original Message-----
> From: Hongbo Zhang [mailto:[email protected]]
> Sent: Wednesday, November 12, 2014 4:09 PM
> To: Bhushan Bharat-R65777
> Cc: Antonios Motakis; open list:VFIO DRIVER; [email protected];
> [email protected]; open list; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to
> Kconfig
>
> On 12 November 2014 18:05, [email protected]
> <[email protected]> wrote:
> > Hi,
> >
> >
> >
> > This is not yet supported on Freescale PowerPC. I am still in process
> > of upstreaming the FSL PAMU specific patches for same.
> >
> > Initial plan is to test with PCIe devices and then with Platform devices.
> >
>
> I see there is already driver/iommu/fsl_pamu.c, doesn't it work?

We need VFIO iommu driver for same.

> Could you explain briefly what is wrong? I've heard that the vfio pci works on
> powerpc platforms.

Yes, patches are in Freescale internal git repository. But those patches are yet to be upstreamed. I have started working on same.

Thanks
-Bharat

>
> >
> >
> > Thanks
> >
> > -Bharat
> >
> >
> >
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Hongbo
> > Zhang
> > Sent: Wednesday, November 12, 2014 3:08 PM
> > To: Antonios Motakis
> > Cc: open list:VFIO DRIVER; [email protected];
> > [email protected]; open list;
> > [email protected]; [email protected];
> > [email protected]
> > Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM
> > module to Kconfig
> >
> >
> >
> >
> >
> >
> >
> > On 28 October 2014 02:07, Antonios Motakis
> > <[email protected]> wrote:
> >
> > Enable building the VFIO PLATFORM driver that allows to use Linux
> > platform devices with VFIO.
> >
> > Signed-off-by: Antonios Motakis <[email protected]>
> > ---
> > drivers/vfio/Kconfig | 1 +
> > drivers/vfio/Makefile | 1 +
> > drivers/vfio/platform/Kconfig | 9 +++++++++
> > drivers/vfio/platform/Makefile | 4 ++++
> > 4 files changed, 15 insertions(+)
> > create mode 100644 drivers/vfio/platform/Kconfig create mode 100644
> > drivers/vfio/platform/Makefile
> >
> > diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index
> > a0abe04..962fb80 100644
> > --- a/drivers/vfio/Kconfig
> > +++ b/drivers/vfio/Kconfig
> > @@ -27,3 +27,4 @@ menuconfig VFIO
> > If you don't know what to do here, say N.
> >
> > source "drivers/vfio/pci/Kconfig"
> > +source "drivers/vfio/platform/Kconfig"
> > diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile index
> > 0b035b1..dadf0ca 100644
> > --- a/drivers/vfio/Makefile
> > +++ b/drivers/vfio/Makefile
> > @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
> > obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
> > obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
> > obj-$(CONFIG_VFIO_PCI) += pci/
> > +obj-$(CONFIG_VFIO_PLATFORM) += platform/
> > diff --git a/drivers/vfio/platform/Kconfig
> > b/drivers/vfio/platform/Kconfig new file mode 100644 index
> > 0000000..c51af17
> > --- /dev/null
> > +++ b/drivers/vfio/platform/Kconfig
> > @@ -0,0 +1,9 @@
> > +config VFIO_PLATFORM
> > + tristate "VFIO support for platform devices"
> > + depends on VFIO && EVENTFD && ARM
> >
> >
> >
> > Hi Antonios,
> >
> > Is this only for ARM? how about X86 and PowerPC?
> >
> > On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
> > Access Management Unit), and I am trying to use this VFIO framework on it.
> >
> >
> >
> > + help
> > + Support for platform devices with VFIO. This is required to make
> > + use of platform devices present on the system using the VFIO
> > + framework.
> > +
> > + If you don't know what to do here, say N.
> > diff --git a/drivers/vfio/platform/Makefile
> > b/drivers/vfio/platform/Makefile new file mode 100644 index
> > 0000000..279862b
> > --- /dev/null
> > +++ b/drivers/vfio/platform/Makefile
> > @@ -0,0 +1,4 @@
> > +
> > +vfio-platform-y := vfio_platform.o vfio_platform_common.o
> > +
> > +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
> > --
> > 2.1.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-kernel" in the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
> >
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-11-12 11:17:20

by Hongbo Zhang

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

On 12 November 2014 19:00, [email protected]
<[email protected]> wrote:
>
>
>> -----Original Message-----
>> From: Hongbo Zhang [mailto:[email protected]]
>> Sent: Wednesday, November 12, 2014 4:09 PM
>> To: Bhushan Bharat-R65777
>> Cc: Antonios Motakis; open list:VFIO DRIVER; [email protected];
>> [email protected]; open list; [email protected];
>> [email protected]; [email protected]
>> Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to
>> Kconfig
>>
>> On 12 November 2014 18:05, [email protected]
>> <[email protected]> wrote:
>> > Hi,
>> >
>> >
>> >
>> > This is not yet supported on Freescale PowerPC. I am still in process
>> > of upstreaming the FSL PAMU specific patches for same.
>> >
>> > Initial plan is to test with PCIe devices and then with Platform devices.
>> >
>>
>> I see there is already driver/iommu/fsl_pamu.c, doesn't it work?
>
> We need VFIO iommu driver for same.
>
>> Could you explain briefly what is wrong? I've heard that the vfio pci works on
>> powerpc platforms.
>
> Yes, patches are in Freescale internal git repository. But those patches are yet to be upstreamed. I have started working on same.

(I come from Freescale too, just currently assigned to Linaro)
Oh, yes I now see vfio iommu driver in the internal git repo, but not
in the community one.
It seems I have to select another platform within Linaro to work with.


>
> Thanks
> -Bharat
>
>>
>> >
>> >
>> > Thanks
>> >
>> > -Bharat
>> >
>> >
>> >
>> > From: [email protected]
>> > [mailto:[email protected]] On Behalf Of Hongbo
>> > Zhang
>> > Sent: Wednesday, November 12, 2014 3:08 PM
>> > To: Antonios Motakis
>> > Cc: open list:VFIO DRIVER; [email protected];
>> > [email protected]; open list;
>> > [email protected]; [email protected];
>> > [email protected]
>> > Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM
>> > module to Kconfig
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On 28 October 2014 02:07, Antonios Motakis
>> > <[email protected]> wrote:
>> >
>> > Enable building the VFIO PLATFORM driver that allows to use Linux
>> > platform devices with VFIO.
>> >
>> > Signed-off-by: Antonios Motakis <[email protected]>
>> > ---
>> > drivers/vfio/Kconfig | 1 +
>> > drivers/vfio/Makefile | 1 +
>> > drivers/vfio/platform/Kconfig | 9 +++++++++
>> > drivers/vfio/platform/Makefile | 4 ++++
>> > 4 files changed, 15 insertions(+)
>> > create mode 100644 drivers/vfio/platform/Kconfig create mode 100644
>> > drivers/vfio/platform/Makefile
>> >
>> > diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index
>> > a0abe04..962fb80 100644
>> > --- a/drivers/vfio/Kconfig
>> > +++ b/drivers/vfio/Kconfig
>> > @@ -27,3 +27,4 @@ menuconfig VFIO
>> > If you don't know what to do here, say N.
>> >
>> > source "drivers/vfio/pci/Kconfig"
>> > +source "drivers/vfio/platform/Kconfig"
>> > diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile index
>> > 0b035b1..dadf0ca 100644
>> > --- a/drivers/vfio/Makefile
>> > +++ b/drivers/vfio/Makefile
>> > @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
>> > obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
>> > obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
>> > obj-$(CONFIG_VFIO_PCI) += pci/
>> > +obj-$(CONFIG_VFIO_PLATFORM) += platform/
>> > diff --git a/drivers/vfio/platform/Kconfig
>> > b/drivers/vfio/platform/Kconfig new file mode 100644 index
>> > 0000000..c51af17
>> > --- /dev/null
>> > +++ b/drivers/vfio/platform/Kconfig
>> > @@ -0,0 +1,9 @@
>> > +config VFIO_PLATFORM
>> > + tristate "VFIO support for platform devices"
>> > + depends on VFIO && EVENTFD && ARM
>> >
>> >
>> >
>> > Hi Antonios,
>> >
>> > Is this only for ARM? how about X86 and PowerPC?
>> >
>> > On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
>> > Access Management Unit), and I am trying to use this VFIO framework on it.
>> >
>> >
>> >
>> > + help
>> > + Support for platform devices with VFIO. This is required to make
>> > + use of platform devices present on the system using the VFIO
>> > + framework.
>> > +
>> > + If you don't know what to do here, say N.
>> > diff --git a/drivers/vfio/platform/Makefile
>> > b/drivers/vfio/platform/Makefile new file mode 100644 index
>> > 0000000..279862b
>> > --- /dev/null
>> > +++ b/drivers/vfio/platform/Makefile
>> > @@ -0,0 +1,4 @@
>> > +
>> > +vfio-platform-y := vfio_platform.o vfio_platform_common.o
>> > +
>> > +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
>> > --
>> > 2.1.1
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe
>> > linux-kernel" in the body of a message to [email protected]
>> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>> > Please read the FAQ at http://www.tux.org/lkml/
>> >
>> >

2014-11-13 08:05:16

by Hongbo Zhang

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

On 12 November 2014 17:57, Antonios Motakis
<[email protected]> wrote:
> Hello Hongbo,
>
> On Wed, Nov 12, 2014 at 10:52 AM, Hongbo Zhang <[email protected]> wrote:
>> On 28 October 2014 02:07, Antonios Motakis
>> <[email protected]> wrote:
>>>
>>> Enable building the VFIO PLATFORM driver that allows to use Linux platform
>>> devices with VFIO.
>>>
>>> Signed-off-by: Antonios Motakis <[email protected]>
>>> ---
>>> drivers/vfio/Kconfig | 1 +
>>> drivers/vfio/Makefile | 1 +
>>> drivers/vfio/platform/Kconfig | 9 +++++++++
>>> drivers/vfio/platform/Makefile | 4 ++++
>>> 4 files changed, 15 insertions(+)
>>> create mode 100644 drivers/vfio/platform/Kconfig
>>> create mode 100644 drivers/vfio/platform/Makefile
>>>
>>> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
>>> index a0abe04..962fb80 100644
>>> --- a/drivers/vfio/Kconfig
>>> +++ b/drivers/vfio/Kconfig
>>> @@ -27,3 +27,4 @@ menuconfig VFIO
>>> If you don't know what to do here, say N.
>>>
>>> source "drivers/vfio/pci/Kconfig"
>>> +source "drivers/vfio/platform/Kconfig"
>>> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
>>> index 0b035b1..dadf0ca 100644
>>> --- a/drivers/vfio/Makefile
>>> +++ b/drivers/vfio/Makefile
>>> @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
>>> obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
>>> obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
>>> obj-$(CONFIG_VFIO_PCI) += pci/
>>> +obj-$(CONFIG_VFIO_PLATFORM) += platform/
>>> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
>>> new file mode 100644
>>> index 0000000..c51af17
>>> --- /dev/null
>>> +++ b/drivers/vfio/platform/Kconfig
>>> @@ -0,0 +1,9 @@
>>> +config VFIO_PLATFORM
>>> + tristate "VFIO support for platform devices"
>>> + depends on VFIO && EVENTFD && ARM
>>
>> Hi Antonios,
>> Is this only for ARM? how about X86 and PowerPC?
>> On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
>> Access Management Unit), and I am trying to use this VFIO framework on
>> it.
>>
>
> In principle it should be working on any platform with such devices;
> as long as you have a VFIO IOMMU driver for the PAMU (on ARM we use
> VFIO PLATFORM for the device, with VFIO IOMMU TYPE1 for the IOMMU).
>

Antonios,
As far as you know, on which ARM platform can I apply your patches directly?
My purpose is to apply you patches[1], and then implement a user space
driver to evaluate the performance.

[1] It is better without manually merging conflicts/dependencies etc,
I am vfio-platform user, not a iommu expert.

> So if you have a suitable IOMMU driver for your target, feel free to
> test it, and let us know of the results.
>
>>>
>>> + help
>>> + Support for platform devices with VFIO. This is required to make
>>> + use of platform devices present on the system using the VFIO
>>> + framework.
>>> +
>>> + If you don't know what to do here, say N.
>>> diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
>>> new file mode 100644
>>> index 0000000..279862b
>>> --- /dev/null
>>> +++ b/drivers/vfio/platform/Makefile
>>> @@ -0,0 +1,4 @@
>>> +
>>> +vfio-platform-y := vfio_platform.o vfio_platform_common.o
>>> +
>>> +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
>>> --
>>> 2.1.1
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to [email protected]
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at http://www.tux.org/lkml/

2014-11-20 14:10:59

by Antonios Motakis

[permalink] [raw]
Subject: Re: [PATCH v9 03/19] vfio: platform: add the VFIO PLATFORM module to Kconfig

On Thu, Nov 13, 2014 at 9:05 AM, Hongbo Zhang <[email protected]> wrote:
> On 12 November 2014 17:57, Antonios Motakis
> <[email protected]> wrote:
>> Hello Hongbo,
>>
>> On Wed, Nov 12, 2014 at 10:52 AM, Hongbo Zhang <[email protected]> wrote:
>>> On 28 October 2014 02:07, Antonios Motakis
>>> <[email protected]> wrote:
>>>>
>>>> Enable building the VFIO PLATFORM driver that allows to use Linux platform
>>>> devices with VFIO.
>>>>
>>>> Signed-off-by: Antonios Motakis <[email protected]>
>>>> ---
>>>> drivers/vfio/Kconfig | 1 +
>>>> drivers/vfio/Makefile | 1 +
>>>> drivers/vfio/platform/Kconfig | 9 +++++++++
>>>> drivers/vfio/platform/Makefile | 4 ++++
>>>> 4 files changed, 15 insertions(+)
>>>> create mode 100644 drivers/vfio/platform/Kconfig
>>>> create mode 100644 drivers/vfio/platform/Makefile
>>>>
>>>> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
>>>> index a0abe04..962fb80 100644
>>>> --- a/drivers/vfio/Kconfig
>>>> +++ b/drivers/vfio/Kconfig
>>>> @@ -27,3 +27,4 @@ menuconfig VFIO
>>>> If you don't know what to do here, say N.
>>>>
>>>> source "drivers/vfio/pci/Kconfig"
>>>> +source "drivers/vfio/platform/Kconfig"
>>>> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
>>>> index 0b035b1..dadf0ca 100644
>>>> --- a/drivers/vfio/Makefile
>>>> +++ b/drivers/vfio/Makefile
>>>> @@ -3,3 +3,4 @@ obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
>>>> obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
>>>> obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o
>>>> obj-$(CONFIG_VFIO_PCI) += pci/
>>>> +obj-$(CONFIG_VFIO_PLATFORM) += platform/
>>>> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
>>>> new file mode 100644
>>>> index 0000000..c51af17
>>>> --- /dev/null
>>>> +++ b/drivers/vfio/platform/Kconfig
>>>> @@ -0,0 +1,9 @@
>>>> +config VFIO_PLATFORM
>>>> + tristate "VFIO support for platform devices"
>>>> + depends on VFIO && EVENTFD && ARM
>>>
>>> Hi Antonios,
>>> Is this only for ARM? how about X86 and PowerPC?
>>> On Freescale's PowerPC platform, the IOMMU is called PAMU (Peripheral
>>> Access Management Unit), and I am trying to use this VFIO framework on
>>> it.
>>>
>>
>> In principle it should be working on any platform with such devices;
>> as long as you have a VFIO IOMMU driver for the PAMU (on ARM we use
>> VFIO PLATFORM for the device, with VFIO IOMMU TYPE1 for the IOMMU).
>>
>
> Antonios,
> As far as you know, on which ARM platform can I apply your patches directly?
> My purpose is to apply you patches[1], and then implement a user space
> driver to evaluate the performance.
>

In principle, if your target has a working IOMMU in front of a
platform or AMBA device, then you should be able to use this.

In practice, I have tested this on various fast models, and less
extensively on Arndale in the past. Linaro as far as I know has tested
this series on Calxeda devices with an xgmac NIC.

> [1] It is better without manually merging conflicts/dependencies etc,
> I am vfio-platform user, not a iommu expert.
>
>> So if you have a suitable IOMMU driver for your target, feel free to
>> test it, and let us know of the results.
>>
>>>>
>>>> + help
>>>> + Support for platform devices with VFIO. This is required to make
>>>> + use of platform devices present on the system using the VFIO
>>>> + framework.
>>>> +
>>>> + If you don't know what to do here, say N.
>>>> diff --git a/drivers/vfio/platform/Makefile b/drivers/vfio/platform/Makefile
>>>> new file mode 100644
>>>> index 0000000..279862b
>>>> --- /dev/null
>>>> +++ b/drivers/vfio/platform/Makefile
>>>> @@ -0,0 +1,4 @@
>>>> +
>>>> +vfio-platform-y := vfio_platform.o vfio_platform_common.o
>>>> +
>>>> +obj-$(CONFIG_VFIO_PLATFORM) += vfio-platform.o
>>>> --
>>>> 2.1.1
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>>> the body of a message to [email protected]
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>> Please read the FAQ at http://www.tux.org/lkml/