<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1793327272;
        mso-list-type:hybrid;
        mso-list-template-ids:1282073230 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal">Thanks Igor,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As suspected the vmx_net3 works with <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Iommu: disabled<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">enable_unsafe_iommu: enabled<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">dpdk eal iova mode: PA<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">as pointed by you in logs, the virtio_user fails as it expects VA too.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Will check and get back.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Igor de Paula <igordptx@gmail.com> <br>
<b>Sent:</b> Tuesday, July 25, 2023 8:16 PM<br>
<b>To:</b> Yigit, Ferruh <Ferruh.Yigit@amd.com><br>
<b>Cc:</b> Jochen Behrens <jbehrens@vmware.com>; Thomas Monjalon <thomas@monjalon.net>; users@dpdk.org; Gupta, Nipun <Nipun.Gupta@amd.com>; Agarwal, Nikhil <nikhil.agarwal@amd.com>; Ronak Doshi <doshir@vmware.com>; Immanni, Venkat <Venkat.Immanni@amd.com>;
 Varghese, Vipin <Vipin.Varghese@amd.com>; Chenbo Xia <chenbo.xia@intel.com><br>
<b>Subject:</b> Re: help<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#FFB900;padding:5.0pt 2.0pt 5.0pt 2.0pt"></td>
<td width="100%" style="width:100.0%;background:#FFF8E5;padding:5.0pt 4.0pt 5.0pt 12.0pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style="color:#222222">Caution:</span></b><span style="color:#222222"> This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
<o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi,<br>
Attaching the logs of EAL when trying to run a configuration with virtio_user port when IOMMU is <br>
disabled and enable_unsafe_iommu is enabled. As you can see it forces IOVA as PA but the viritui_user needs IOVA as VA.<br>
I am also attaching the output of dmesg. I am not sure which kernel logs you wanted... if there is anything else please let me know..<br>
Regarding the ESXI logs, they are HUGE so I will send to you on a separate email.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Jul 21, 2023 at 1:14 PM Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com">ferruh.yigit@amd.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">On 7/21/2023 12:39 PM, Igor de Paula wrote:<br>
> I am trying to use virtio_user for an interface with the<br>
> kernel: <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html</a> <<a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html</a>><br>
> I think this requires IOVA as va.<br>
><br>
<br>
I am not sure if virtio-user has IOVA as VA requirement, cc'ed Chenbo,<br>
he may know better.<br>
<br>
Meanwhile can you give a try to 'enable_unsafe_noiommu_mode' and<br>
'--iova-mode=pa'?<br>
<br>
<br>
> It does work with Intel host and IOMMU<br>
> enabled. Part of the negotiation when setting it up is getting the IOMMU<br>
> number so I thought it has to have IOMMU.<br>
><br>
<br>
Yes, issue looks like related to the IOMMU, and it may be either related<br>
to HW support, or ESXi iommu driver support, we will check using below<br>
information you provided.<br>
<br>
> I tried disabling IOMMU and enabling enable_unsafe_noiommu flag but<br>
> again, that didn't work.<br>
> ESXI version - VMware ESXi, 7.0.0, 16324942<br>
> AMD:  AMD EPYC 7452 32-Core Processo<br>
> <br>
> On an Intel host which worked: Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz<br>
> Regarding the logs I will try and attach it soon.<br>
> <br>
<br>
Thanks for info, waiting for logs.<br>
<br>
> <br>
> On Fri, Jul 21, 2023 at 12:21 PM Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a><br>
> <mailto:<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a>>> wrote:<br>
> <br>
>     Hi Igor,<br>
> <br>
>     VM doesn't have IOMMU, and vmxnet3 requires PA mode, for this can you<br>
>     please try with:<br>
>     - enable 'enable_unsafe_noiommu_mode' flag<br>
>     - Force PA mode via '--iova-mode=pa' eal parameter<br>
> <br>
> <br>
>     Also to be able to figure out AMD IOMMU support level, can you please<br>
>     provide:<br>
>     - AMD part number<br>
>     - ESXi/hypervisor version<br>
>     - ESXi & VM kernel logs<br>
> <br>
> <br>
>     Thanks,<br>
>     Ferruh<br>
> <br>
>     On 7/20/2023 5:21 PM, Jochen Behrens wrote:<br>
>     > +Ronak from the ESX team<br>
>     ><br>
>     >  <br>
>     ><br>
>     >  <br>
>     ><br>
>     > In our usage, we do set amd_iommu=off in the boot command line from<br>
>     > grub. (Or intel_iommu=off for Intel processors.)<br>
>     ><br>
>     >  <br>
>     ><br>
>     >                 Jochen<br>
>     ><br>
>     >  <br>
>     ><br>
>     > *From: *Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a><br>
>     <mailto:<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>>><br>
>     > *Date: *Thursday, July 20, 2023 at 6:00 AM<br>
>     > *To: *Igor de Paula <<a href="mailto:igordptx@gmail.com" target="_blank">igordptx@gmail.com</a> <mailto:<a href="mailto:igordptx@gmail.com" target="_blank">igordptx@gmail.com</a>>><br>
>     > *Cc: *<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a> <mailto:<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>> <<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a><br>
>     <mailto:<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>>>, Jochen Behrens<br>
>     > <<a href="mailto:jbehrens@vmware.com" target="_blank">jbehrens@vmware.com</a> <mailto:<a href="mailto:jbehrens@vmware.com" target="_blank">jbehrens@vmware.com</a>>>, Nipun Gupta<br>
>     <<a href="mailto:nipun.gupta@amd.com" target="_blank">nipun.gupta@amd.com</a> <mailto:<a href="mailto:nipun.gupta@amd.com" target="_blank">nipun.gupta@amd.com</a>>>, Nikhil Agarwal<br>
>     > <<a href="mailto:nikhil.agarwal@amd.com" target="_blank">nikhil.agarwal@amd.com</a> <mailto:<a href="mailto:nikhil.agarwal@amd.com" target="_blank">nikhil.agarwal@amd.com</a>>>, Ferruh<br>
>     Yigit <<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a> <mailto:<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a>>><br>
>     > *Subject: *Re: help<br>
>     ><br>
>     > !! External Email<br>
>     ><br>
>     > +Cc some AMD maintainers, they can have an idea about IOMMU settings.<br>
>     ><br>
>     ><br>
>     > 20/07/2023 14:44, Igor de Paula:<br>
>     >> I have enabled it in the host and in the BIOS for AMD...<br>
>     >> In the Bios I changed to amd_iommu=on and in the host it's the<br>
>     same for<br>
>     >> either.<br>
>     >><br>
>     >> On Thu, Jul 20, 2023 at 1:31 PM Thomas Monjalon<br>
>     <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a> <mailto:<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>>> wrote:<br>
>     >><br>
>     >> > 20/07/2023 11:35, Igor de Paula:<br>
>     >> > > The weird thing is that it only happens when I am using a<br>
>     host with an<br>
>     >> > AMD<br>
>     >> > > processor. It doesn't happen when I use a host with an Intel<br>
>     processor.<br>
>     >> ><br>
>     >> > So it's probably a matter of BIOS settings for the IOMMU?<br>
>     >> ><br>
>     >> ><br>
>     >> > > On Thu, Jul 20, 2023 at 10:32 AM Thomas Monjalon<br>
>     <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a> <mailto:<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>>><br>
>     >> > > wrote:<br>
>     >> > ><br>
>     >> > > > +Cc the vmxnet3 maintainer.<br>
>     >> > > ><br>
>     >> > > > Please Jochen, do you have an idea what's wrong below?<br>
>     >> > > ><br>
>     >> > > ><br>
>     >> > > > 20/07/2023 11:25, Igor de Paula:<br>
>     >> > > > > This is because it can't negotiate the IOMMU type with<br>
>     any port.<br>
>     >> > > > ><br>
>     >> > > > > On Thu, Jul 20, 2023 at 5:08 AM Thomas Monjalon<br>
>     <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a> <mailto:<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>><br>
>     >> > ><br>
>     >> > > > wrote:<br>
>     >> > > > ><br>
>     >> > > > > > Hello,<br>
>     >> > > > > ><br>
>     >> > > > > > The first error is "Cause: Error: number of ports must<br>
>     be even"<br>
>     >> > > > > ><br>
>     >> > > > > ><br>
>     >> > > > > > 03/05/2023 18:13, Igor de Paula:<br>
>     >> > > > > > > I am running a VM inside a VMWARE server (vSphere).<br>
>     >> > > > > > > My goal it to set up DPDK with two HW ports, and set up a<br>
>     >> > > > virtio_user to<br>
>     >> > > > > > > interact with the kernel stack.<br>
>     >> > > > > > > In another app I have it working but instead of<br>
>     virtio_user I am<br>
>     >> > > > running<br>
>     >> > > > > > > KNI, it works in IOVA-PA mode.<br>
>     >> > > > > > > I am looking to replace the KNI.<br>
>     >> > > > > > ><br>
>     >> > > > > > > When I try to set up virtio_user port as in the doc:<br>
>     >> > > > > > ><br>
>     >> > > > > ><br>
>     >> > > ><br>
>     >> ><br>
>     <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a> <<a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a>>
 <<a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a> <<a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a>>><br>
>     >> > > > > > > I get a error it can't run in PA mode.<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > When I try to run as VA mode from a parameter, I get the<br>
>     >> > following<br>
>     >> > > > > > errors:<br>
>     >> > > > > > > EAL: lib.eal log level changed from info to debug<br>
>     >> > > > > > > EAL: Detected lcore 0 as core 0 on socket 0<br>
>     >> > > > > > > EAL: Detected lcore 1 as core 0 on socket 0<br>
>     >> > > > > > > EAL: Support maximum 128 logical core(s) by<br>
>     configuration.<br>
>     >> > > > > > > EAL: Detected 2 lcore(s)<br>
>     >> > > > > > > EAL: Detected 1 NUMA nodes<br>
>     >> > > > > > > EAL: Checking presence of .so 'librte_eal.so.21.3'<br>
>     >> > > > > > > EAL: Checking presence of .so 'librte_eal.so.21'<br>
>     >> > > > > > > EAL: Checking presence of .so 'librte_eal.so'<br>
>     >> > > > > > > EAL: Detected static linkage of DPDK<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x7000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x100000000 (size = 0x7000)<br>
>     >> > > > > > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>
>     >> > > > > > > EAL: DPAA Bus not present. Skipping.<br>
>     >> > > > > > > EAL: VFIO PCI modules not loaded<br>
>     >> > > > > > > EAL: Selected IOVA mode 'VA'<br>
>     >> > > > > > > EAL: Probing VFIO support...<br>
>     >> > > > > > > EAL: IOMMU type 1 (Type 1) is supported<br>
>     >> > > > > > > EAL: IOMMU type 7 (sPAPR) is not supported<br>
>     >> > > > > > > EAL: IOMMU type 8 (No-IOMMU) is supported<br>
>     >> > > > > > > EAL: VFIO support initialized<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x5b000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x100007000 (size = 0x5b000)<br>
>     >> > > > > > > EAL: Setting up physically contiguous memory...<br>
>     >> > > > > > > EAL: Setting maximum number of open files to 1048576<br>
>     >> > > > > > > EAL: Detected memory type: socket_id:0<br>
>     hugepage_sz:1073741824<br>
>     >> > > > > > > EAL: Creating 2 segment lists: n_segs:128 socket_id:0<br>
>     >> > > > > > hugepage_sz:1073741824<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x2000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x100062000 (size = 0x2000)<br>
>     >> > > > > > > EAL: Memseg list allocated at socket 0, page size<br>
>     0x100000kB<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x2000000000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x140000000 (size =<br>
>     0x2000000000)<br>
>     >> > > > > > > EAL: VA reserved for memseg list at 0x140000000, size<br>
>     2000000000<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x2000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x2140000000 (size = 0x2000)<br>
>     >> > > > > > > EAL: Memseg list allocated at socket 0, page size<br>
>     0x100000kB<br>
>     >> > > > > > > EAL: Ask a virtual area of 0x2000000000 bytes<br>
>     >> > > > > > > EAL: Virtual area found at 0x2180000000 (size =<br>
>     0x2000000000)<br>
>     >> > > > > > > EAL: VA reserved for memseg list at 0x2180000000,<br>
>     size 2000000000<br>
>     >> > > > > > > EAL: TSC frequency is ~2350000 KHz<br>
>     >> > > > > > > EAL: Main lcore 0 is ready (tid=7f8ad790ec00;cpuset=[0])<br>
>     >> > > > > > > EAL: lcore 1 is ready (tid=7f8ad6907400;cpuset=[1])<br>
>     >> > > > > > > EAL: Trying to obtain current memory policy.<br>
>     >> > > > > > > EAL: Setting policy MPOL_PREFERRED for socket 0<br>
>     >> > > > > > > EAL: Restoring previous memory policy: 0<br>
>     >> > > > > > > EAL: request: mp_malloc_sync<br>
>     >> > > > > > > EAL: Heap on socket 0 was expanded by 1024MB<br>
>     >> > > > > > > EAL: PCI device 0000:0b:00.0 on NUMA socket -1<br>
>     >> > > > > > > EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>
>     >> > > > > > > EAL:   Expecting 'PA' IOVA mode but current mode is<br>
>     'VA', not<br>
>     >> > > > > > initializing<br>
>     >> > > > > > > EAL: Requested device 0000:0b:00.0 cannot be used<br>
>     >> > > > > > > EAL: PCI device 0000:13:00.0 on NUMA socket -1<br>
>     >> > > > > > > EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>
>     >> > > > > > > EAL:   Expecting 'PA' IOVA mode but current mode is<br>
>     'VA', not<br>
>     >> > > > > > initializing<br>
>     >> > > > > > > EAL: Requested device 0000:13:00.0 cannot be used<br>
>     >> > > > > > > EAL: Bus (pci) probe failed.<br>
>     >> > > > > > > EAL: lib.telemetry log level changed from disabled to<br>
>     warning<br>
>     >> > > > > > > EAL: Error - exiting with code: 1<br>
>     >> > > > > > >   Cause: Error: number of ports must be even<br>
>     >> > > > > > > EAL: request: mp_malloc_sync<br>
>     >> > > > > > > EAL: Heap on socket 0 was shrunk by 1024MB<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > For some reason the HW ports won't setup. From what I<br>
>     understand<br>
>     >> > > > > > > net_vmxnet3 should work with VA mode.<br>
>     >> > > > > > > I enabled I/OMUU for the VM.<br>
>     >> > > > > > > The weird thing even when enabled, I still have the<br>
>     >> > > > > > > enable_unsafe_noiommu_mode flag on.<br>
>     >> > > > > > > And because it's on the this:<br>
>     >> > > > > > ><br>
>     >> > > > > > > dev_iova_mode = pci_device_iova_mode(dr, dev);<br>
>     >> > > > > > ><br>
>     >> > > > > > > return PA mode, and it fails.<br>
>     >> > > > > > ><br>
>     >> > > > > > > When I disable it by modifying<br>
>     >> > > > > > ><br>
>     /sys/module/vfio/parameters/enable_unsafe_noiommu_mode, I get<br>
>     >> > another<br>
>     >> > > > > > error.<br>
>     >> > > > > > > The error is that it doesn't find a suitable IOMMU type:<br>
>     >> > > > > > > Just putting the relevant message:<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > EAL: Heap on socket 0 was expanded by 1024MB<br>
>     >> > > > > > > EAL: PCI device 0000:0b:00.0 on NUMA socket -1<br>
>     >> > > > > > > EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>
>     >> > > > > > > EAL: Set IOMMU type 1 (Type 1) failed, error 19 (No<br>
>     such device)<br>
>     >> > > > > > > EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No<br>
>     such device)<br>
>     >> > > > > > > EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No<br>
>     such<br>
>     >> > device)<br>
>     >> > > > > > > EAL: 0000:0b:00.0 failed to select IOMMU type<br>
>     >> > > > > > > EAL: Requested device 0000:0b:00.0 cannot be used<br>
>     >> > > > > > > EAL: PCI device 0000:13:00.0 on NUMA socket -1<br>
>     >> > > > > > > EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>
>     >> > > > > > > EAL: Set IOMMU type 1 (Type 1) failed, error 19 (No<br>
>     such device)<br>
>     >> > > > > > > EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No<br>
>     such device)<br>
>     >> > > > > > > EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No<br>
>     such<br>
>     >> > device)<br>
>     >> > > > > > > EAL: 0000:13:00.0 failed to select IOMMU type<br>
>     >> > > > > > > EAL: Requested device 0000:13:00.0 cannot be used<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > I can see where it fails:<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > const struct vfio_iommu_type *<br>
>     >> > > > > > > vfio_set_iommu_type(int vfio_container_fd)<br>
>     >> > > > > > > {<br>
>     >> > > > > > > unsigned idx;<br>
>     >> > > > > > > for (idx = 0; idx < RTE_DIM(iommu_types); idx++) {<br>
>     >> > > > > > > const struct vfio_iommu_type *t = &iommu_types[idx];<br>
>     >> > > > > > ><br>
>     >> > > > > > > int ret = ioctl(vfio_container_fd, VFIO_SET_IOMMU,<br>
>     >> > > > > > > t->type_id);<br>
>     >> > > > > > > if (!ret) {<br>
>     >> > > > > > > RTE_LOG(INFO, EAL, "Using IOMMU type %d (%s)\n",<br>
>     >> > > > > > > t->type_id, t->name);<br>
>     >> > > > > > > return t;<br>
>     >> > > > > > > }<br>
>     >> > > > > > > /* not an error, there may be more supported IOMMU<br>
>     types */<br>
>     >> > > > > > > RTE_LOG(DEBUG, EAL, "Set IOMMU type %d (%s) failed,<br>
>     error "<br>
>     >> > > > > > > "%i (%s)\n", t->type_id, t->name, errno,<br>
>     >> > > > > > > strerror(errno));<br>
>     >> > > > > > > }<br>
>     >> > > > > > > /* if we didn't find a suitable IOMMU type, fail */<br>
>     >> > > > > > > return NULL;<br>
>     >> > > > > > > }<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > The ioctl returns -1.<br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > ><br>
>     >> > > > > > > I tried many things.<br>
>     >> > > > > > > Enabling/disabling IOMMU.<br>
>     >> > > > > > > Modifying the enable_unsafe_noiommu_mode flag.<br>
>     >> > > > > > > Running in PA mode.<br>
>     >> > > > > > > Any help will be much appreciated.<br>
>     >> ><br>
>     >> ><br>
>     >> ><br>
>     >> ><br>
>     >> ><br>
>     >> ><br>
>     >><br>
>     ><br>
>     ><br>
>     ><br>
>     ><br>
>     ><br>
>     ><br>
>     > !! External Email: This email originated from outside of the<br>
>     > organization. Do not click links or open attachments unless you<br>
>     > recognize the sender.<br>
>     ><br>
> <o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>