vIOMMU - PCI pass through to Layer 2 VMs (Nested Virtualization)

2023-09-27 Thread Markus Frank

Hello,

I would like to pass through PCI devices to Layer-2 VMs via Nested 
Virtualization.

Is there current documentation for this topic somewhere?

I used these parameters:
-machine ...,kernel-irqchip=split
-device intel-iommu

With these parameters PCI pass through to L2-VMs worked fine.


Now I come to the part where I get confused.

https://wiki.qemu.org/Features/VT-d#With_Virtio_Devices
Is this documentation relevant for PCI pass through? Do I need DMAR for virtio 
devices?

And there is also the virtio-iommu device where I also could use the i440fx 
chipset.
https://michael2012z.medium.com/virtio-iommu-789369049443

When adding "-device virtio-iommu-pci" pci pass through also works
but I get "kvm: virtio_iommu_translate no mapping for 0x1002030f000 for sid=240"
when starting qemu. What could that mean?

What do these parameters 
"disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on"
actually do? When do I need them and on which virtio devices?

And which device should I rather use: virtio-iommu or intel-iommu?

Thanks in advance,
Markus




tx_queue_size with tap device

2022-07-28 Thread Markus Frank

Hello,

I have a few questions concerning these commits.

commit 9b02e1618cf26aa52cf786f215d757506dda14f8
commit 2eef278b9e6326707410eed23be40e57f6c331b7
commit 0ea5778f066ea5c5e73246a4c11f0773edc4c45d

Therefore I added the developers in CC.

Do backends other than vhost-user or vhost-vdpa really not support the
maximum tx_queue_size and why?
Example: When using tap as backend and adding NET_CLIENT_DRIVER_TAP as a case
to the switch statement, so that it can use the maximum size, ethtool also shows
the configured tx_queue_size of 1024.

In the commit 9b02e1618cf2 is stated, that the maximum tx_queue_size for other
backends is 512. Is this still the case? If yes shouldn't it be possible to
default to that (512), if something higher (1024) is configured, instead of 256?

Also is there another way to check/test the tx_queue_size than ethtool?

Thanks in advance.

Markus