Closed LJKingd closed 1 month ago
Hi @LJKingd
Problem with RPi5 is that it does not have IO-MMU that support Stage 2 translations. So, on this platform it is not possible to get classic device-passthrough.
@lorc Thank you very much for your reply. I noticed that there is such an IOMMU node in bcm2712-5-b.dts. Does this mean that the Raspberry Pi 5 has an IOMMU module? If so, why can't it be used? iommu@5100 { compatible = "brcm,bcm2712-iommu"; reg = <0x10 0x5100 0x00 0x80>; cache = <0x2b>;
phandle = <0x53>;
}
Yes, it in fact has IOMMU module, but it is for Stage 1 translation only. I.e. it only can be used by Linux kernel.
This IOMMU covers only small part of address space. Its purpose is to create physically contiguous memory regions from discontiguous buffers for devices that does not support scatter-gather DMA operations. It is more like TILER module from TI chips than real IO-MMU like ARM's SMMU or Renesas's IPMMU.
@lorc Thanks for your answer. I understand now.
I noticed that there are IOMMU device nodes in the device tree of the Raspberry Pi 5. In Xen, how can I enable these IOMMU devices?
When starting a DomU with Dom0, if I want to perform device passthrough, I need to enable IOMMU in Xen to achieve it, right? And it is necessary to have "I/O virtualisation enabled" printed when Xen initializes.