<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 15.05.2017 um 05:06 schrieb zhoucm1:<br>
</div>
<blockquote cite="mid:59191B2D.7000604@amd.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
On 2017年05月13日 02:57, Felix Kuehling wrote:<br>
<blockquote
cite="mid:674b18c3-045e-2c77-1349-b1f24e72067c@amd.com"
type="cite">[SNIP]<br>
<blockquote type="cite">
<pre wrap=""> amdgpu_vm_do_set_ptes(¶ms,
last_shadow,
- pt_addr, count,
- incr,
- AMDGPU_PTE_VALID);
+ entry, count,
+ incr, 0);
</pre>
</blockquote>
<pre wrap="">[FK] For count >=3 this would result in an SDMA_OP_PTEPDE packet with
flags=0 and the flags included in the address. Could SDMA mask out the
flags bits from the address before it applies the flags? The SDMA 4.0
MAS includes pseudo code that looks like it wouldn't.</pre>
</blockquote>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<ol>
<ol>
<ol start="5">
<li>
<h3 class="western"><a moz-do-not-send="true"
name="_Toc415065276"></a>Generate PTE/PDE</h3>
</li>
</ol>
</ol>
</ol>
<p class="western" style="line-height: 100%"><font color="#000000">It
would work like this in C pseudo code:</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">For
(i = 0; i < count; i++)</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">{</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">
Write ( Mask | ( Initial Value + ( i * Increment ) ) ) to Dest
Addr // result is a 64 bit value</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">
Dest Addr += 8 bytes;</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">}<br>
</font></p>
<p class="western" style="line-height: 100%"><font color="#000000">Yes,
it wouldn't.<br>
</font></p>
</blockquote>
Well Felix is right with the point that this is actually at least a
little bit ugly and not the intended use.<br>
<br>
I will just keep setting the valid bit outside of that function.<br>
<br>
Regards,<br>
Christian.<br>
</body>
</html>