Skip to contentSkip to conversation

doc: Clarify IOMMU usage with "uio-pci" kernel module

PATCH Superseded tone.zhang 7 participants 23 messages Sep 4, 2018 – Nov 19, 2018

lore
Share & tools
lore

tone.zhang

author
#0 lore raw

PATCH 1/1 doc: Clarify IOMMU usage with "uio-pci" kernel module

When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices for used DPDK bound to the ``uio-pci`` kernel module, please make
+   sure that the IOMMU is disabled. We can add ``intel_iommu=off`` or ``amd_iommu=off``
+   in ``GRUB_CMDLINE_LINUX`` in grub on x86_64 systems, or add ``iommu.passthrough=1``
+   on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of tone.zhang
Sent: Tuesday, September 4, 2018 4:59 PM
To: [email protected]
Cc: nd <[email protected]>
Subject: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Quoted 8 lines

When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

Quoted 28 lines
---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +3 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices for used DPDK bound to the ``uio-pci`` kernel module, please

make
+ sure that the IOMMU is disabled. We can add ``intel_iommu=off`` or
``amd_iommu=off``
+ in ``GRUB_CMDLINE_LINUX`` in grub on x86_64 systems, or add
``iommu.passthrough=1``

doc/guides/linux_gsg/linux_drivers.rst +2 -0
+   on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional

for platforms that support using VFIO.

--
2.7.4

#2 lore raw
In reply to tone.zhang
Quoted 17 lines · tone.zhang

When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644

doc/guides/linux_gsg/linux_drivers.rst be loaded as shown below: · line 57

Quoted 10 lines
doc/guides/linux_gsg/linux_drivers.rst +7 -0
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices for used DPDK bound to the ``uio-pci`` kernel module, please make
+   sure that the IOMMU is disabled. We can add ``intel_iommu=off`` or ``amd_iommu=off``
+   in ``GRUB_CMDLINE_LINUX`` in grub on x86_64 systems, or add ``iommu.passthrough=1``
+   on arm64 system.
+

I think passthrough mode should work on x86 too. I remember running with iommu=pt setting in the kernel in the past.

/Bruce

#3 lore raw
Quoted 41 lines · Bruce Richardson
Quoted 27 lines · tone.zhang

When binding the devices used by DPDK to the "uio-pci" kernel module,
the IOMMU should be disabled in order not to break the IO transmission
because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64
systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++

 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:

    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:linux_gsg_binding_kernel below.
+.. note::
+

Quoted 8 lines

+   If the devices for used DPDK bound to the ``uio-pci`` kernel module, please make
+   sure that the IOMMU is disabled. We can add ``intel_iommu=off`` or ``amd_iommu=off``
+   in ``GRUB_CMDLINE_LINUX`` in grub on x86_64 systems, or add ``iommu.passthrough=1``
+   on arm64 system.
+

I think passthrough mode should work on x86 too. I remember running with
iommu=pt setting in the kernel in the past.

Quoted 1 line

/Bruce

It does, can confirm.

Signature · 2 lines
Kind regards,
Luca Boccassi
#4 lore raw

-----Original Message-----
From: Luca Boccassi <[email protected]>
Sent: Tuesday, September 4, 2018 6:15 PM
To: Bruce Richardson <[email protected]>; Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Quoted 38 lines · Bruce Richardson
Quoted 25 lines · tone.zhang

When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64
systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++

 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:

    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:linux_gsg_binding_kernel below.
+.. note::
+

Quoted 8 lines

+   If the devices for used DPDK bound to the ``uio-pci`` kernel module, please make
+   sure that the IOMMU is disabled. We can add ``intel_iommu=off`` or ``amd_iommu=off``
+   in ``GRUB_CMDLINE_LINUX`` in grub on x86_64 systems, or add ``iommu.passthrough=1``
+   on arm64 system.
+

I think passthrough mode should work on x86 too. I remember running with iommu=pt setting in the kernel in the past.

Quoted 1 line

/Bruce

It does, can confirm.

--
Kind regards,
Luca Boccassi

@Luca, @Bruce,
Thanks for the comments. I will update the change and push V2. Thanks!

Br,
Tone

#5 lore raw
In reply to tone.zhang

Hi Tone,

Quoted 1 line

if the devices for used DPDK bound to the ``uio-pci`` kernel module,

please make

The three kernel modules which can be used for DPDK binding are vfio-pci, uio_pci_generic and igb_uio. Don't you mean here uio_pci_generic ?

Regards,
Rami Rosen

בתאריך יום ג׳, 4 בספט׳ 2018, 11:59, מאת tone.z

Quoted 22 lines

When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci``

2.7.4

#6 lore raw

Hi Rami,

Yes, I mean “uio_pci_generic” kernel module.

I will update the change accordingly.

Thanks.

Br,
Tone

From: Rami Rosen <[email protected]>
Sent: Wednesday, September 5, 2018 3:55 AM
To: Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Hi Tone,

Quoted 1 line

if the devices for used DPDK bound to the ``uio-pci`` kernel module, please make

The three kernel modules which can be used for DPDK binding are vfio-pci, uio_pci_generic and igb_uio. Don't you mean here uio_pci_generic ?

Regards,
Rami Rosen

בתאריך יום ג׳, 4 בספט׳ 2018, 11:59, מאת tone.z
When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci``

2.7.4

#7 lore raw
Quoted 45 lines · On Wed, 5 Sep 2018 00:20:29 +0000 "Tone Zhang (Arm Technology China)"…

Hi Rami,

Yes, I mean “uio_pci_generic” kernel module.

I will update the change accordingly.

Thanks.

Br,
Tone

From: Rami Rosen <[email protected]>
Sent: Wednesday, September 5, 2018 3:55 AM
To: Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Hi Tone,

Quoted 1 line

if the devices for used DPDK bound to the ``uio-pci`` kernel module, please make

The three kernel modules which can be used for DPDK binding are vfio-pci, uio_pci_generic and igb_uio. Don't you mean here uio_pci_generic ?

Regards,
Rami Rosen

בתאריך יום ג׳, 4 בספט׳ 2018, 11:59, מאת tone.z
When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci``
Quoted 1 line

2.7.4

Also, it would be good if documentation was clear in recommending using VFIO instead if IOMMU is present.

#8 lore raw

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Wednesday, September 5, 2018 5:22 PM
To: Tone Zhang (Arm Technology China) <[email protected]>
Cc: Rami Rosen <[email protected]>; [email protected]; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Quoted 45 lines · On Wed, 5 Sep 2018 00:20:29 +0000 "Tone Zhang (Arm Technology China)"…

Hi Rami,

Yes, I mean “uio_pci_generic” kernel module.

I will update the change accordingly.

Thanks.

Br,
Tone

From: Rami Rosen <[email protected]>
Sent: Wednesday, September 5, 2018 3:55 AM
To: Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: Clarify IOMMU usage with "uio-pci" kernel module

Hi Tone,

Quoted 1 line

if the devices for used DPDK bound to the ``uio-pci`` kernel module, please make

The three kernel modules which can be used for DPDK binding are vfio-pci, uio_pci_generic and igb_uio. Don't you mean here uio_pci_generic ?

Regards,
Rami Rosen

בתאריך יום ג׳, 4 בספט׳ 2018, 11:59, מאת tone.z
When binding the devices used by DPDK to the "uio-pci" kernel module, the IOMMU should be disabled in order not to break the because of the virtual / physical address mapping.

The patch clarifies the IOMMU configuration on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..8f9ec8f 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci``
Quoted 1 line

2.7.4

Also, it would be good if documentation was clear in recommending using VFIO instead if IOMMU is present.

Hi Stephen,

Yes, according to the description of the "UIO" and "VFIO" in the document, I believe that VFIO is recommended.

BTW, I have update the change to V3 (https://patches.dpdk.org/patch/44295/). Please have a review.

Thanks a lot!

Br,
Tone

author
#9 lore raw

PATCH v2 1/1 doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

In reply to tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
author
#10 lore raw

PATCH v3 1/1 doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
#11 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 12 lines

-----Original Message-----
From: tone.zhang <[email protected]>
Sent: Wednesday, September 5, 2018 1:18 PM
To: [email protected]
Cc: Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]; [email protected]; nd <[email protected]>
Subject: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 8 lines

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

Quoted 28 lines
---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +4 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel
 module,
+   please make sure that the IOMMU is disabled. One can add

``intel_iommu=off`` or
+ ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on
x86_64 systems,

doc/guides/linux_gsg/linux_drivers.rst +2 -0
+   or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional

for platforms that support using VFIO.

--
2.7.4

#12 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

In reply to tone.zhang

Hello Bruce, Luca, Rami and Stephen,

Could you please help to review the change?

Any comments are welcome.

Thanks a lot!

Br,
Tone

-----Original Message-----
From: dev <[email protected]> On Behalf Of tone.zhang
Sent: Wednesday, September 5, 2018 1:18 PM
To: [email protected]
Cc: Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]; [email protected]; nd <[email protected]>
Subject: [dpdk-dev] [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -1
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional  for platforms that support using VFIO.
 
--

2.7.4

#13 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 32 lines · Tone Zhang (Arm Technology China)

Hello Bruce, Luca, Rami and Stephen,

Could you please help to review the change?

Any comments are welcome.

Thanks a lot!

Br,
Tone

-----Original Message-----
From: dev <[email protected]> On Behalf Of tone.zhang
Sent: Wednesday, September 5, 2018 1:18 PM
To: [email protected]
Cc: Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]; [email protected]; nd <[email protected]>
Subject: [dpdk-dev] [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..b46fc6a 100644

doc/guides/linux_gsg/linux_drivers.rst be loaded as shown below: · line 57

Quoted 10 lines
doc/guides/linux_gsg/linux_drivers.rst +7 -0
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+

I'm not really an expert in these IOMMU commands, but for the passthrough option on my systems, I've always used "intel_iommu=on iommu=pt", rather than "intel_iommu=pt". Can someone confirm that the latter works ok, as documented here?

/Bruce

#14 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 65 lines · Bruce Richardson
Quoted 46 lines · Tone Zhang (Arm Technology China)

Hello Bruce, Luca, Rami and Stephen,

Could you please help to review the change?

Any comments are welcome.

Thanks a lot!

Br,
Tone

-----Original Message-----
From: dev <[email protected]> On Behalf Of tone.zhang
Sent: Wednesday, September 5, 2018 1:18 PM
To: [email protected]
Cc: Gavin Hu (Arm Technology China) <[email protected]>; bruce.richa [email protected]; [email protected]; [email protected]; nd <nd@arm .com>
Subject: [dpdk-dev] [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++

 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:

    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:linux_gsg_binding_kernel below.
+.. note::
+

Quoted 8 lines

+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+

I'm not really an expert in these IOMMU commands, but for the passthrough
option on my systems, I've always used "intel_iommu=on iommu=pt", rather
than "intel_iommu=pt". Can someone confirm that the latter works ok, as
documented here?

Quoted 1 line

/Bruce

Whops you are right, just checked and we use iommu=pt

Signature · 2 lines
Kind regards,
Luca Boccassi
#15 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Hi Luca and Bruce,

I appreciate for the comments. I ran more test cases in my test bed, and I will update the patch and push v4 soon.

Thanks a lot for your help!

Br,
Tone

-----Original Message-----
From: Luca Boccassi <[email protected]>
Sent: Wednesday, September 19, 2018 7:54 PM
To: Bruce Richardson <[email protected]>; Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; Stephen Hemminger <[email protected]>; nd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 62 lines · Bruce Richardson
Quoted 46 lines · Tone Zhang (Arm Technology China)

Hello Bruce, Luca, Rami and Stephen,

Could you please help to review the change?

Any comments are welcome.

Thanks a lot!

Br,
Tone

-----Original Message-----
From: dev <[email protected]> On Behalf Of tone.zhang
Sent: Wednesday, September 5, 2018 1:18 PM
To: [email protected]
Cc: Gavin Hu (Arm Technology China) <[email protected]>; bruce.richa [email protected]; [email protected]; [email protected]; nd <nd@arm .com>
Subject: [dpdk-dev] [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++

 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:

    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:linux_gsg_binding_kernel below.
+.. note::
+

Quoted 8 lines

+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or
+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+

I'm not really an expert in these IOMMU commands, but for the passthrough option on my systems, I've always used "intel_iommu=on iommu=pt", rather than "intel_iommu=pt". Can someone confirm that the latter works ok, as documented here?

Quoted 1 line

/Bruce

Whops you are right, just checked and we use iommu=pt

--
Kind regards,
Luca Boccassi

Acked-by on v3 1/1
#16 lore raw

Re: [PATCH v3] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

In reply to tone.zhang
Quoted 29 lines · tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel
module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++

 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..b46fc6a 100644
@@ -48,6 +48,13 @@ be loaded as shown below:

    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:linux_gsg_binding_kernel below.
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled. One can add ``intel_iommu=off`` or

Quoted 8 lines

+   ``intel_iommu=pt`` or ``amd_iommu=off`` in GRUB command line on x86_64 systems,
+   or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.

Signature · 2 lines
Kind regards,
Luca Boccassi
author
#17 lore raw

PATCH v4 1/1 doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

In reply to tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..3304800 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabledi or passthrough. One can add
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
Acked-by on v4 1/1
#18 lore raw

Re: [PATCH v4] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 17 lines · tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..3304800 100644

doc/guides/linux_gsg/linux_drivers.rst be loaded as shown below: · line 54

Quoted 7 lines
doc/guides/linux_gsg/linux_drivers.rst +4 -0
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabledi or passthrough. One can add

typo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

doc/guides/linux_gsg/linux_drivers.rst be loaded as shown below: · line 60

Quoted 6 lines
doc/guides/linux_gsg/linux_drivers.rst +3 -0
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
author Acked-by Bruce Richardson
#19 lore raw

Re: [PATCH v4] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Hello Bruce,

Thanks for the comments.

I will update the change and issue v5 soon.

Thanks!

Br,
Tone

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Friday, September 21, 2018 7:20 PM
To: Tone Zhang (Arm Technology China) <[email protected]>
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: Re: [PATCH v4] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

Quoted 18 lines · tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +0 -0
index 371a817..3304800 100644

doc/guides/linux_gsg/linux_drivers.rst be loaded as shown below: · line 55

Quoted 8 lines
doc/guides/linux_gsg/linux_drivers.rst +5 -0
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabledi or passthrough. One 
+ can add

typo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Quoted 6 lines
doc/guides/linux_gsg/linux_drivers.rst +3 -0
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is 

optional for platforms that support using VFIO.

author
#20 lore raw

PATCH v5 1/1 doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

In reply to tone.zhang

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..8da6a31 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled or passthrough. One can add
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
author
#21 lore raw

PATCH v6 1/1 doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

---
 doc/guides/linux_gsg/linux_drivers.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/linux_gsg/linux_drivers.rst +7 -0
index 371a817..8da6a31 100644
@@ -48,6 +48,13 @@ be loaded as shown below:
    ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
+.. note::
+
+   If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
+   please make sure that the IOMMU is disabled or passthrough. One can add
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
 
Signature · 1 line
2.7.4
#22 lore raw

Re: [PATCH v6] doc: Clarify IOMMU usage with "uio_pci_generic" kernel module

26/09/2018 07:08, tone.zhang:

Quoted 7 lines

If the devices used for DPDK are bound to the "uio_pci_generic" kernel module, the IOMMU should be disabled in order not to break the IO transmission because of the virtual / physical address mapping.

The patch clarifies the IOMMU configurations on both x86_64 and arm64 systems.

Quoted 7 lines

Applied, thanks