Address mapping for vIOMMU
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?
Quoted 5 lines · leohou
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.
Quoted 8 lines
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-netQuestion:
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
Quoted 3 lines
Quoted 15 lines · Jason Wang
Quoted 5 lines · leohou
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.Quoted 8 lines
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-netQuestion:
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?
Quoted 14 lines
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_modeis *not* 1)Thanks
Quoted 3 lines
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!