Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where passthrough-example-sata.dtb is this attached file.dts is https://github.com/Xilinx/xen-passthrough-device-trees/blob/master/device-trees-2021.2/ahci%40fd0c0000.dts 


Then, you need to add xen,passthrough; under the ahci@fd0c0000 node in the host device tree so that it doesn't get automatically assigned to dom0:. 

It is also necessary to add the four SMIDs of the SATA controller to device tree: 0x4c0, 0x4c1, 0x4c2, 0x4c3:

Code Block
themeMidnight
    ahci@fd0c0000 {
[...]
smmu@fd800000 {
		phymmu-names = "sata-phy";
	masters = <... 0x60 0x4c0 0x4c1 0x4c2 0x4c3>;
}
[...]
    
ahci@fd0c0000 {
	[...]
	#stream-id-cells = <0x04>;
	iommus = <0x28 0x4c0>, <0x28 0x4c1>, <0x28 0x4c2>, <0x28 0x4c3>;
	phy-names = "sata-phy";
	phys = <0x35 0x1 0x1 0x1 0x7735940>;
		xlnx,tz-nonsecure-sata0 = <0x0>;	
		xlnx,tz-nonsecure-sata1 = <0x0>;
        xen,passthrough; /* add this line */
    };

It is also necessary to add the four SMIDs of the SATA controller to device tree: 0x4c0, 0x4c1, 0x4c2, 0x4c3:

Code Block
themeMidnight
sata: ahci@fd0c0000 {
[...]

mmu-masters = < ... &sata 0x4c0 &sata 0x4c1 &sata 0x4c2 &sata 0x4c3>;

...

};


Finally, make sure to run the following commands at boot from xsdb to configure the system so that normal-world SATA DMA goes via the SMMU:

...