<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 16.0.10366.20016">
<TITLE>How is rid (requester ID) is used in SMMU-v3 connected to PCIe RC?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">H</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">ello all,</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I read</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">Documentation/devicetree/bindings/pci/pci-iommu.txt</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> (linux-5.10)</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> again.</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">h</FONT><FONT SIZE=2 FACE="Courier New">ere</FONT> <FONT SIZE=2 FACE="Courier New">is an example (Example(1)).</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">/ {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> #address-cells = <1>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> #size-cells = <1>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> iommu: iommu@a {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> reg = <0xa 0x1>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> compatible = "vendor,some-iommu";</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> #iommu-cells = <1>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> };</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> pci: pci@f {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"></FONT> <FONT SIZE=2 FACE="Courier New"> reg = <0xf 0x1>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> compatible = "vendor,pcie-root-complex"; </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> device_type = "pci";</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> /*</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * The sideband data provided to the IOMMU is the RID,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * identity-mapped.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> */</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> iommu-map = <0x0 &iommu 0x0 0x</FONT><FONT SIZE=2 FACE="Courier New">10000>;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> };</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT><FONT SIZE=2 FACE="Courier New">;</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</UL>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">he</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">"</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">iommu-map</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">" property</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">for pcie is expan</FONT><FONT SIZE=2 FACE="Courier New">ding the</FONT> <FONT SIZE=2 FACE="Courier New">"</FONT><FONT SIZE=2 FACE="Courier New">iommus</FONT><FONT SIZE=2 FACE="Courier New">"</FONT><FONT SIZE=2 FACE="Courier New"> property of</FONT> <FONT SIZE=2 FACE="Courier New">general bus</FONT> <FONT SIZE=2 FACE="Courier New">master.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">(</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">That is,</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">mapping</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">between the master</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">a</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">nd</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2>{</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">iommu, master ID}</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> is expanded to</FONT></SPAN><SPAN LANG="en-us"> </SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">m</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">apping</FONT> <FONT SIZE=2 FACE="Courier New">between the range of devices represented by</FONT> <FONT SIZE=2 FACE="Courier New">RID</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> (</FONT><FONT SIZE=2 FACE="Courier New">16 bit</FONT> <FONT SIZE=2 FACE="Courier New">bus,device,f</FONT><FONT SIZE=2 FACE="Courier New">unction pair)</FONT><FONT SIZE=2 FACE="Courier New"> and</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2>{</FONT><FONT SIZE=2 FACE="Courier New">iommu,</FONT> <FONT SIZE=2 FACE="Courier New">requester ID ranges}</FONT><FONT SIZE=2 FACE="Courier New">)</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">his is because there can be many masters on the PCIe bus.</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> Yes,</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">I</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> can understand that.</FONT></SPAN><SPAN LANG="en-us"> </SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">My question is,</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> In arm</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">'s SMMUv3 case, h</FONT><FONT SIZE=2 FACE="Courier New">ow is this rid used in sett</FONT><FONT SIZE=2 FACE="Courier New">ing up the stream table</FONT><FONT SIZE=2 FACE="Courier New"> (or context table)</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">s rid</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">equal to</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> StreamID in SMM</FONT><FONT SIZE=2 FACE="Courier New">Uv3?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">A</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">ny comment</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">or explanati</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">on</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> will be really</FONT> <FONT SIZE=2 FACE="Courier New">appreciated.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">hank you!</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">C</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">han Kim</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>