<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        text-autospace:none;
        word-break:break-hangul;
        font-size:10.0pt;
        font-family:"Malgun Gothic";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Malgun Gothic";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Malgun Gothic";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=KO link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>I realized the IOMMU mapping is done with dma_alloc_  or dma_map_..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>It’s so basic (I have read <a href="https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt">https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt</a> ) but I forgot.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Chan Kim<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> ckim@etri.re.kr <ckim@etri.re.kr> <br><b>Sent:</b> Wednesday, September 29, 2021 4:15 PM<br><b>To:</b> kernelnewbies@kernelnewbies.org<br><b>Subject:</b> does dma_alloc_coherent setup iommu page table?<o:p></o:p></span></p></div></div><p class=MsoNormal align=left style='text-align:left'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Hello all,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>When the driver calls dma_alloc_coherent for a device, and if the device uses iommu, is the table entry for the iommu setup for the dma_handle?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Seeing the struct device has something related to iommu, I guess so..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Any help appreciated.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Chan Kim<o:p></o:p></span></p></div></div></body></html>