<div dir="ltr">Sure, I will submit a patch (it would be a first). <br>Thanks</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 11, 2023 at 3:30 PM Thomas Monjalon <<a href="mailto:thomas@monjalon.net">thomas@monjalon.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for the info.<br>
Do you think it should be written in the vmxnet3 page of the DPDK documentation?<br>
If yes, would you like to initiate a patch for review?<br>
<br>
<br>
11/08/2023 10:43, Igor de Paula:<br>
> Hi again,<br>
> I got this resolved with VMWARE support so I thought to share it here.<br>
> What I originally wanted was to use IOVA-VA on an AMD host. Which didn't<br>
> work. I have learned that the ESXI version that supports<br>
> virtual IOMMU in AMD hosts (which is a prerequisite to IOVA-VA) is ESXI 7.0<br>
> U1. After updating it worked. On Intel hosts ESXI 6.7 supports it already<br>
> as far as I know.<br>
> <br>
> <br>
> On Tue, Jul 25, 2023 at 6:19 PM Varghese, Vipin <<a href="mailto:Vipin.Varghese@amd.com" target="_blank">Vipin.Varghese@amd.com</a>><br>
> wrote:<br>
> <br>
> > [AMD Official Use Only - General]<br>
> ><br>
> > Like I said earlier, trying with the Intel host I have on VMWARE,<br>
> > specifically  Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz<br>
> > With IOMMU enabled, VMXNET3 works with VA as well as PA.<br>
> ><br>
> > [VV] since ` enable_unsafe_iommu: not enabled` on Intel platform, could<br>
> > it be possible the specific version EXSI hypervisor supports the HW IOMMU<br>
> > specific to the platform. My suspicion will be in case on AMD platform<br>
> >  changes for required to enable HW iommu might not be available to specific<br>
> > EXSI (hypervior OS) used.<br>
> ><br>
> ><br>
> ><br>
> > I am not an expert on virtio_user PMD, but I can check if it will work<br>
> > with PA with deferred setting for vmx_net3 PMD are ok?<br>
> ><br>
> ><br>
> ><br>
> > *From:* Igor de Paula <<a href="mailto:igordptx@gmail.com" target="_blank">igordptx@gmail.com</a>><br>
> > *Sent:* Tuesday, July 25, 2023 8:42 PM<br>
> > *To:* Varghese, Vipin <<a href="mailto:Vipin.Varghese@amd.com" target="_blank">Vipin.Varghese@amd.com</a>><br>
> > *Cc:* Yigit, Ferruh <<a href="mailto:Ferruh.Yigit@amd.com" target="_blank">Ferruh.Yigit@amd.com</a>>; Jochen Behrens <<br>
> > <a href="mailto:jbehrens@vmware.com" target="_blank">jbehrens@vmware.com</a>>; Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>>;<br>
> > <a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>; Gupta, Nipun <<a href="mailto:Nipun.Gupta@amd.com" target="_blank">Nipun.Gupta@amd.com</a>>; Agarwal, Nikhil <<br>
> > <a href="mailto:nikhil.agarwal@amd.com" target="_blank">nikhil.agarwal@amd.com</a>>; Ronak Doshi <<a href="mailto:doshir@vmware.com" target="_blank">doshir@vmware.com</a>>; Immanni, Venkat<br>
> > <<a href="mailto:Venkat.Immanni@amd.com" target="_blank">Venkat.Immanni@amd.com</a>>; Chenbo Xia <<a href="mailto:chenbo.xia@intel.com" target="_blank">chenbo.xia@intel.com</a>><br>
> > *Subject:* Re: help<br>
> ><br>
> ><br>
> ><br>
> > *Caution:* This message originated from an External Source. Use proper<br>
> > caution when opening attachments, clicking links, or responding.<br>
> ><br>
> ><br>
> ><br>
> > Well,<br>
> > Like I said earlier, trying with the Intel host I have on VMWARE,<br>
> > specifically  Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz<br>
> > With IOMMU enabled, VMXNET3 works with VA as well as PA.<br>
> > Meaning, PA works regardless if IOMMU is enabled or not. From my<br>
> > experience anyway.<br>
> > That's why I thought that:<br>
> > virtio_user needs VA to work.<br>
> > For some reason VMXNET3 does not work with VA (only on AMD host).<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On Tue, Jul 25, 2023 at 4:04 PM Varghese, Vipin <<a href="mailto:Vipin.Varghese@amd.com" target="_blank">Vipin.Varghese@amd.com</a>><br>
> > wrote:<br>
> ><br>
> > [AMD Official Use Only - General]<br>
> ><br>
> ><br>
> ><br>
> > Thanks Igor,<br>
> ><br>
> ><br>
> ><br>
> > As suspected the vmx_net3 works with<br>
> ><br>
> ><br>
> ><br>
> >    1. Iommu: disabled<br>
> >    2. enable_unsafe_iommu: enabled<br>
> >    3. dpdk eal iova mode: PA<br>
> ><br>
> ><br>
> ><br>
> > as pointed by you in logs, the virtio_user fails as it expects VA too.<br>
> ><br>
> ><br>
> ><br>
> > Will check and get back.<br>
> ><br>
> ><br>
> ><br>
> > *From:* Igor de Paula <<a href="mailto:igordptx@gmail.com" target="_blank">igordptx@gmail.com</a>><br>
> > *Sent:* Tuesday, July 25, 2023 8:16 PM<br>
> > *To:* Yigit, Ferruh <<a href="mailto:Ferruh.Yigit@amd.com" target="_blank">Ferruh.Yigit@amd.com</a>><br>
> > *Cc:* Jochen Behrens <<a href="mailto:jbehrens@vmware.com" target="_blank">jbehrens@vmware.com</a>>; Thomas Monjalon <<br>
> > <a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>>; <a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>; Gupta, Nipun <<a href="mailto:Nipun.Gupta@amd.com" target="_blank">Nipun.Gupta@amd.com</a>>;<br>
> > Agarwal, Nikhil <<a href="mailto:nikhil.agarwal@amd.com" target="_blank">nikhil.agarwal@amd.com</a>>; Ronak Doshi <<a href="mailto:doshir@vmware.com" target="_blank">doshir@vmware.com</a>>;<br>
> > Immanni, Venkat <<a href="mailto:Venkat.Immanni@amd.com" target="_blank">Venkat.Immanni@amd.com</a>>; Varghese, Vipin <<br>
> > <a href="mailto:Vipin.Varghese@amd.com" target="_blank">Vipin.Varghese@amd.com</a>>; Chenbo Xia <<a href="mailto:chenbo.xia@intel.com" target="_blank">chenbo.xia@intel.com</a>><br>
> > *Subject:* Re: help<br>
> ><br>
> ><br>
> ><br>
> > *Caution:* This message originated from an External Source. Use proper<br>
> > caution when opening attachments, clicking links, or responding.<br>
> ><br>
> ><br>
> ><br>
> > Hi,<br>
> > Attaching the logs of EAL when trying to run a configuration with<br>
> > virtio_user port when IOMMU is<br>
> > disabled and enable_unsafe_iommu is enabled. As you can see it forces IOVA<br>
> > 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<br>
> > 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<br>
> > email.<br>
> ><br>
> ><br>
> ><br>
> > On Fri, Jul 21, 2023 at 1:14 PM Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a>> wrote:<br>
> ><br>
> > 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:<br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html</a> <<br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html" rel="noreferrer" 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>
> > >><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<br>
> > 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<br>
> > 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>
> > ><br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a><br>
> > <<br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a>><br>
> > <<br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a><br>
> > <<br>
> > <a href="https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path</a><br>
> > >><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<br>
> > 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 =<br>
> > 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 =<br>
> > 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<br>
> > (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<br>
> > 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>
> > ><br>
> ><br>
> ><br>
> <br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div>