At 2022-03-24 12:27:46, "Jason Wang" <jasow...@redhat.com> wrote: >On Thu, Mar 24, 2022 at 12:15 PM leohou <leohou...@163.com> wrote: >> >> hi all, >> When I use DPDK in guestOS and configering the VM with vIOMMU, I found >> that sending the gVA to the hardware device , the hardware device can't >> find the real data. >> But sending the gPA to the hardware device, the hardware device can find >> the real data. >> >> Environment: >> OS: Linux version 5.4.0-104-generic (buildd@ubuntu) (gcc version 9.3.0 >> (Ubuntu 9.3.0-17ubuntu1~20.04)) #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 >> QEMU: QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.21) >> Device: virtio-net >> >> Question: >> The vIOMMU doesn't work? >> I know virtio-net does not have DMA, so when virtio-net and DPDK are >> combined, IOMMU is not needed? > >vIOMMU + virtio-net works for me like a charm. > >DPDK supported vIOMMU long ago with virtio-net. > >Make sure you vIOMMU is enabled in the guest (intel_iommu=on in guest >kernel command line, and enable_unsafe_noiommu_mode is *not* 1) > >Thanks > >> >> >>
> hi, jason I'm sure my vIOMMU is enabled in the guestOS(intel_iommu=on in guest kernel command line, and enable_unsafe_noiommu_mode is "0"), but it only work when I config the DPDK in passing physical addresses model. So, I think qEMU emulation of Virtio-net has no DMA, so virt queue register in PCIe space of Virtio-NET can only configure the physical address of virt queue. Can I take it this way? Thanks!