<div dir="ltr"><div><div>The number of "i915_gem_request_add" events (which indicate that a request is added to the i915 queue) in the VM is bigger than the number of the same event in the Host. The difference between the two numbers depends on the frequency of sending requests to the gpu inside the VM.<br><br></div>To understand this behavior, I checked the function "execlists_dequeue" (in the file intel_lrc.c) in the VM and found that whenever there are many requests in the queue, to be submitted to the gpu, KVMGT is notified just once through "execlists_context_status_change".</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le ven. 27 oct. 2017 à 01:05, Tian, Kevin <<a href="mailto:kevin.tian@intel.com">kevin.tian@intel.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-3053489514146403245WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Do you have more detail info where you actually add trace, and the exact number difference?
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="m_-3053489514146403245______replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Adel Belkhiri [mailto:<a href="mailto:adel.belkhiri@gmail.com" target="_blank">adel.belkhiri@gmail.com</a>]
<br>
<b>Sent:</b> Friday, October 27, 2017 7:37 AM<br>
<b>To:</b> Tian, Kevin <<a href="mailto:kevin.tian@intel.com" target="_blank">kevin.tian@intel.com</a>><br>
<b>Cc:</b> <a href="mailto:intel-gvt-dev@lists.freedesktop.org" target="_blank">intel-gvt-dev@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: How gpu requests are trapped by kvmgt ?<u></u><u></u></span></p>
</div>
</div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_-3053489514146403245WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you for your replay,<u></u><u></u></p>
</div>
<p class="MsoNormal">What I wanted to say is that I found that the number of requests sent by the VM to the vgpu is different from the number of requests received by KVMGT. I used Ftrace to do the count. I think the i915 driver of the VM sometimes combine
multiple requests in just one request sent to KVMGT. <br>
<br>
Am I wrong ? <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Le mer. 25 oct. 2017 à 22:47, Tian, Kevin <<a href="mailto:kevin.tian@intel.com" target="_blank">kevin.tian@intel.com</a>> a écrit :<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">it’s decided by KVMGT. the real recipe is EPT, which is a CPU hw virtualization feature to decide which
access in VM is trapped or not.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="m_-3053489514146403245_m_5440476066734605210______replyseparato"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
intel-gvt-dev [mailto:<a href="mailto:intel-gvt-dev-bounces@lists.freedesktop.org" target="_blank">intel-gvt-dev-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Adel Belkhiri<br>
<b>Sent:</b> Wednesday, October 25, 2017 11:06 PM<br>
<b>To:</b> <a href="mailto:intel-gvt-dev@lists.freedesktop.org" target="_blank">intel-gvt-dev@lists.freedesktop.org</a><br>
<b>Subject:</b> How gpu requests are trapped by kvmgt ?</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi everybody,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have a question about the implementation of KVMGT. According to the documentation, the virtual machine, may send some requests to the gpu directly (Pass-through) and forward some other
requests to the KVMGT module. <br>
<br>
I read the code of KVMGT but i didn't understand how requests are being sent directly to the gpu ? and who decide which request to be directly sent to the gpu or to be trapped by kvmgt ? Is it the graphics card driver of the VM (i915) or KVMGT ?<u></u><u></u></p>
</div>
<p class="MsoNormal">Thanks a lot for your help.<u></u><u></u></p>
</div>
<p class="MsoNormal">Yours.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div></div></div></blockquote></div>