<div dir="ltr">Hi,<br>I am using a Vmware host (ESXI 7.0) where I have IOMMU enabled. I am using virtio_user ports as an exception path so I am trying to use IOVA as VA. Just as an example, I am trying to run the l2fw example application with --iova-mode=va.<br>Although I shows there is support for IOMMU, it fails to negotiate the IOMMU type, here is the output of: ./dpdk-l2fwd --iova-mode=va --log-level=eal,8<br><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 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><b>EAL: IOMMU type 1 (Type 1) is supported</b><br>EAL: IOMMU type 7 (sPAPR) is not supported<br>EAL: IOMMU type 8 (No-IOMMU) is not 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 hugepage_sz:1073741824<br>EAL: Creating 2 segment lists: n_segs:128 socket_id:0 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 0x100000kB<br>EAL: Ask a virtual area of 0x2000000000 bytes<br>EAL: Virtual area found at 0x140000000 (size = 0x2000000000)<br>EAL: VA reserved for memseg list at 0x140000000, size 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 0x100000kB<br>EAL: Ask a virtual area of 0x2000000000 bytes<br>EAL: Virtual area found at 0x2180000000 (size = 0x2000000000)<br>EAL: VA reserved for memseg list at 0x2180000000, size 2000000000<br>EAL: TSC frequency is ~2350000 KHz<br>EAL: Main lcore 0 is ready (tid=7f3f3a1e5c00;cpuset=[0])<br>EAL: lcore 1 is ready (tid=7f3f391de400;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:03:00.0 on NUMA socket -1<br>EAL:   probe driver: 15ad:7b0 net_vmxnet3<br>EAL:   Not managed by a supported kernel driver, skipped<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 such device)<br>EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No such device)<br>EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No such 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><b>EAL:   probe driver: 15ad:7b0 net_vmxnet3</b><br><b>EAL: Set IOMMU type 1 (Type 1) failed, error 19 (No such device)<br>EAL: Set IOMMU type 7 (sPAPR) failed, error 19 (No such device)<br>EAL: Set IOMMU type 8 (No-IOMMU) failed, error 19 (No such device)</b><br>EAL: 0000:13:00.0 failed to select IOMMU type<br>EAL: Requested device 0000:13:00.0 cannot be used<br>EAL: lib.telemetry log level changed from disabled to warning<br>MAC updating enabled<br>EAL: Error - exiting with code: 1<br>  Cause: No Ethernet ports - bye<br>EAL: request: mp_malloc_sync<br>EAL: Heap on socket 0 was shrunk by 1024MB<br><br>The negotiation for IOMMU type happens in rte_vfio_setup_device(), it calls the function:<br>set_iommu_type() in the following snippet:<br><br>/*<br>             * pick an IOMMU type and set up DMA mappings for container<br>            *<br>             * needs to be done only once, only when first group is<br>                * assigned to a container and only in primary process.<br>                * Note this can happen several times with the hotplug<br>                 * functionality.<br>              */<br>           if (internal_conf->process_type == RTE_PROC_PRIMARY &&<br>                             vfio_cfg->vfio_active_groups == 1 &&<br>                               vfio_group_device_count(vfio_group_fd) == 0) {<br>                        const struct vfio_iommu_type *t;<br><br>                    /* select an IOMMU type which we will be using */<br>                     t = vfio_set_iommu_type(vfio_container_fd);<br>                   if (!t) {<br>                             RTE_LOG(ERR, EAL,<br>                                     "%s failed to select IOMMU type\n",<br>                                 dev_addr);<br>                            close(vfio_group_fd);<br>                         rte_vfio_clear_group(vfio_group_fd);<br>                          return -1;<br>                    }<br><div><br></div><div>In there there is a ioctl call:<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><br>which fails.</div><div><br></div><div>Its also weird for me the when using ./usertool/dpdk-devbind.py --status<br>I gett the following output:<br>Network devices using DPDK-compatible driver<br>============================================<br><b>0000:0b:00.0 'VMXNET3 Ethernet Controller 07b0' drv=vfio-pci unused=vmxnet3<br>0000:13:00.0 'VMXNET3 Ethernet Controller 07b0' drv=vfio-pci unused=vmxnet3</b><br><br>Network devices using kernel driver<br>===================================<br>0000:03:00.0 'VMXNET3 Ethernet Controller 07b0' if=eth0 drv=vmxnet3 unused=vfio-pci *Active*<br><div><br>Meaning the driver that is connected is vfio-pci. So why is it probing VMXNET3?<br><br>Does anyone have any experience in running IOVA as VA in VMWARE host?<br><br><br></div></div></div>