<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 9 May 2017, at 17:22, Oscar Segarra <<a href="mailto:oscar.segarra@gmail.com" class="">oscar.segarra@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi, Christophe, <div class=""><br class=""></div><div class="">Thanks a lot again for the detailed explanation.</div><div class=""><br class=""></div><div class="">I understand perfectly the difference between client, host and guest. In my enviornment client is ferdora 25, host is Centos 7 and guest is Windows 10.</div></div></div></blockquote><div><br class=""></div><div>OK. Apologies if I sounded patronizing, I just wanted to make sure there was no confusion ;-)</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Regarding the 7th point:</div><div class=""><blockquote type="cite" style="color:rgb(80,0,80);font-size:12.8px" class=""><div style="word-wrap:break-word" class=""><i class="">7. The “client” will talk to that protocol and display that on your screen. The client itself may use 3D acceleration to display things on your screen, but it’s not the “same” 3D acceleration as used in the guest. For example, if it gets a video stream from the server in 6, now it’s using the video decoding capabilities of the 3D card, even if your application in the guest is rendering 3D objects.</i></div></blockquote></div><div class="">This means that the client (physical endpoint) will use the GPU just for jpeg and mpeg decoding. It has no sense to buy an expensive card for the endpoint, isn't it?</div></div></div></blockquote><div><br class=""></div><div>If the reason is to accelerate 3D rendering, not with the current state of the technology. That being said, the possibility to send 3D data over the wire exists, and it may happen some day. But for now, there is indeed little benefit.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">I may assume, that my physical endpoint (fedora based) that launches virt-viewer or virt-manager, will use automatically the local gpu for jpeg, mpeg rendering, in't it? or may I make further configuration?</div></div></div></blockquote><div><br class=""></div><div>For JPEG, I think that you mostly get CPU-side acceleration (libjpeg-turbo). I think this uses SIMD instructions but no GPU that I know of. So I don’t think we use the GPU for JPEG at this point in time.</div><div><br class=""></div><div>For video, I’ll defer to others on this list. Spice uses gstreamer, which under specific situations can do hardware-assisted decoding (e.g. vaapi). But frankly, I’m still too new to the project to know precisely in which scenarios you get hardware assistance, and where this assistance comes from (i.e. it may be in some Intel chipset and not in the GPU ;-) I believe that the general answer is “it depends”.</div><div><br class=""></div><div><br class=""></div><div>Cheers,</div><div>Christophe</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Thanks a lot!</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-05-09 16:56 GMT+02:00 Christophe de Dinechin <span dir="ltr" class=""><<a href="mailto:cdupontd@redhat.com" target="_blank" class="">cdupontd@redhat.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On 9 May 2017, at 16:51, Christophe de Dinechin <<a href="mailto:cdupontd@redhat.com" target="_blank" class="">cdupontd@redhat.com</a>> wrote:</div><br class="m_-3060883738576211049Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class="">Hi Oscar,<div class=""><br class=""></div><div class=""><br class=""></div><div class="">For 3D acceleration in virtual machines, you need a multiplicity of components to cooperate:</div><div class=""><br class=""></div><div class="">1. The physical GPU needs to be supported by the host.</div><div class=""><br class=""></div><div class="">2. It needs to expose an API that the virtual machine software can access, e.g. OpenGL on Linux</div><div class=""><br class=""></div><div class="">3. The virtualisation software, e.g. KVM/QEMU, talks to the host GPU e.g. for graphic operations. That happens irrespective of how the guest sees the virtual hardware, i.e. irrespective of which of the methods Frediano referred to is used.</div><div class=""><br class=""></div><div class="">4. The virtual hardware exposed to the guest by the virtualisation software correspond to any of the solutions Frediano listed. This is true of any hardware, not just graphic cards (i.e. the same is true for networking cards). Again:</div><div class=""><br class=""></div><div class=""><span class="m_-3060883738576211049Apple-tab-span" style="white-space:pre-wrap"> </span>a) A complete emulation of a real physical card, generally chosen to be a widely supported hardware standard (e.g. VGA)</div><div class=""><br class=""></div><div class=""><span class="m_-3060883738576211049Apple-tab-span" style="white-space:pre-wrap"> </span>b) A simplified card that makes it easier to emulate, typically by accepting “higher level” commands. This is generally called “paravirtualization”</div><div class=""><br class=""></div><div class=""><span class="m_-3060883738576211049Apple-tab-span" style="white-space:pre-wrap">     </span>c) A pass-through to a real hardware card, which is exposed to the guest by “poking a hole” in the virtualization so that the guest can see the real hardware. In general, that means the guest has complete control of that hardware, so you can’t share it with the host or with other guests.</div><div class=""><br class=""></div><div class=""><span class="m_-3060883738576211049Apple-tab-span" style="white-space:pre-wrap">     </span>d) A smarter pass-through that only exposes part of the hardware. We talk about exposing “functions” of the host physical card.</div><div class=""><br class=""></div><div class="">5. Guest software, generally in the form of device drivers, that knows how to talk to the appropriate device listed in 4. In other words, you need a different driver to talk to an emulated VGA card (where you’d only use the regular VGA driver that comes with your OS) or to a para-virtualized card (where you’d use a special driver that knows about para-virtualization).</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">I forgot to point out the key thing. What we are missing for 3D in Windows currently is this piece.</div><div class=""><div class="h5"><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">In addition, for displays, you need to see what is happening in your guest. Except in cases 4c and possibly 4d, you don’t connect a screen directly to the graphic card of the guest, since there is no graphic card, only software. So instead:</div><div class=""><br class=""></div><div class="">6. You have special software in the virtualisation stack, a “server”, that takes whatever frame buffer the physical emulator in 4a or the paravirtualized driver in 4b has, and exposes it, typically in the form of some remote-viewing protocol like Spice or VNC.</div><div class=""><br class=""></div><div class="">7. The “client” will talk to that protocol and display that on your screen. The client itself may use 3D acceleration to display things on your screen, but it’s not the “same” 3D acceleration as used in the guest. For example, if it gets a video stream from the server in 6, now it’s using the video decoding capabilities of the 3D card, even if your application in the guest is rendering 3D objects.</div><div class=""><br class=""></div><div class=""><div class="">In conclusion, people often understand “client” as something like “the spice client”, i.e. the program in 7 used to connect to the server that exposes the virtual screen of the virtual machine. For the virtual machine itself, we generally prefer to use the term “guest”.</div><div class=""><br class=""></div></div><div class="">I hope this makes sense.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Christophe</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 9 May 2017, at 16:29, Oscar Segarra <<a href="mailto:oscar.segarra@gmail.com" target="_blank" class="">oscar.segarra@gmail.com</a>> wrote:</div><br class="m_-3060883738576211049Apple-interchange-newline"><div class=""><div dir="ltr" class="">Sorry Fredigano...<div class=""><br class=""></div><div class="">I have read again your detailed response... and I cannot see the option where the client GPU is used... Is it expected the client GPU used with "option 2"</div><div class=""><br class=""></div><div class="">Can you tell us when client GPU is used?<br class=""></div><div class=""><br class=""></div><div class="">Thanks a lot. </div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-05-09 13:31 GMT+02:00 Oscar Segarra <span dir="ltr" class=""><<a href="mailto:oscar.segarra@gmail.com" target="_blank" class="">oscar.segarra@gmail.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Ok, thanks for the detailed explanation... I'd suggest to publish it in your webpage in order to help other users.<div class=""><br class=""></div><div class="">Óscar.</div></div><div class="m_-3060883738576211049HOEnZb"><div class="m_-3060883738576211049h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-05-09 13:24 GMT+02:00 Frediano Ziglio <span dir="ltr" class=""><<a href="mailto:fziglio@redhat.com" target="_blank" class="">fziglio@redhat.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div style="font-family:'times new roman','new york',times,serif;font-size:12pt" class=""><div class="">There's a bit of confusion.<br class=""></div><div class=""><br class=""></div><div class="">The VM sees which cards the hypervisor (Qemu in this case) is configured to provide. As<br class=""></div><div class="">any card GPUs can be<br class=""></div><div class="">1) physical, fully virtual<br class=""></div><div class="">2) paravirtual<br class=""></div><div class="">3) pass-through, specifically:<br class=""></div><div class="">3.1) full pass-through<br class=""></div><div class="">3.2) function pass-through<br class=""></div><div class=""><br class=""></div><div class="">1) like VGA, a physical card is fully emulated, quite slow, there are<br class=""></div><div class="">some cards which are better than others as requires less guest <-> hypervisor<br class=""></div><div class="">switches;<br class=""></div><div class="">2) there are no physical card, the card is created just for virtual environment.<br class=""></div><div class="">This reduce the switches guest <-> hypervisor and optimized a lot of functions.<br class=""></div><div class="">Virgl cards, like QXL or VirtIO cards are like that. Are much more efficient<br class=""></div><div class="">and allows lot of features provided by virtual environment (like suspend<br class=""></div><div class="">or migration). The "best" for Qemu and 3d is surely Virgl but as said there's<br class=""></div><div class="">no Windows drivers at the moment;<br class=""></div><div class="">3) you pass a full physical card or part of it. This CAN'T be used by the host<br class=""></div><div class="">and reduce control not allowing (usually) suspend and migration;<br class=""></div><div class="">3.1) basically an entire physical card is passed to the guest. If you have an additional<br class=""></div><div class="">GPU (graphical card) you can do it;<br class=""></div><div class="">3.2) some cards allow to provide part of its functions to be assigned like<br class=""></div><div class="">if were a physical card. For GPU currently Qemu/KVM does not provide<br class=""></div><div class="">much. Work is going to support Intel solutions and Nvidia ones.<br class=""></div><div class="">Nvidia ones are usually quite expensive (cards do not fit in either laptops<br class=""></div><div class="">or even desktops) while Intel offers some really cheap solutions using a<br class=""></div><div class="">mix of hardware/software solution.<span class="m_-3060883738576211049m_-5866141517064436411HOEnZb"><font color="#888888" class=""><br class=""></font></span></div><span class="m_-3060883738576211049m_-5866141517064436411HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Frediano<br class=""></div></font></span><div class=""><div class="m_-3060883738576211049m_-5866141517064436411h5"><div class=""><br class=""></div><blockquote style="border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt" class=""><div class=""><br class=""></div><div dir="ltr" class="">Hi Christophe, <div class=""><br class=""></div><div class="">Thanks a lot for your clarifications... can you help me with the other questions?</div><div class=""><br class=""></div><div class=""><div style="font-size:12.8px" class=""><i class="">Is there any way to check if is it using client GPU or host CPU?</i></div><div style="font-size:12.8px" class=""><i class=""><br class=""></i></div><div style="font-size:12.8px" class=""><i class="">Is there any Grpahics card to be plugged in the host in order to use host GPU?</i></div></div><div class=""><br class=""></div><div class="">thanks a lot.</div><div class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-05-09 12:03 GMT+02:00 Christophe Fergeau <span dir="ltr" class=""><<a href="mailto:cfergeau@redhat.com" target="_blank" class="">cfergeau@redhat.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br class="">
<span class="m_-3060883738576211049m_-5866141517064436411m_-5039178316762789004gmail-"><br class="">
On Tue, May 09, 2017 at 10:42:31AM +0200, Oscar Segarra wrote:<br class="">
> Hi,<br class="">
><br class="">
> What kind of drivers are required in windows? (I supose you mean Windows<br class="">
> guest).<br class="">
<br class="">
</span>A video driver able to use virtio-gpu + virgl would be needed, but does<br class="">
not exist at the moment. This is one of the Google Summer of Code<br class="">
projects for this year though.<br class="">
<span class="m_-3060883738576211049m_-5866141517064436411m_-5039178316762789004gmail-HOEnZb"><span style="color:#888888" class=""><br class="">
Christophe<br class="">
</span></span></blockquote></div><br class=""></div></div></div>
</blockquote><div class=""><br class=""></div></div></div></div></div></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
______________________________<wbr class="">_________________<br class="">Spice-devel mailing list<br class=""><a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank" class="">Spice-devel@lists.freedesktop.<wbr class="">org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/spice-devel</a><br class=""></div></blockquote></div><br class=""></div></div>______________________________<wbr class="">_________________<br class="">Spice-devel mailing list<br class=""><a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank" class="">Spice-devel@lists.freedesktop.<wbr class="">org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/spice-devel</a><br class=""></div></blockquote></div></div></div><br class=""></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">Spice-devel mailing list<br class=""><a href="mailto:Spice-devel@lists.freedesktop.org" class="">Spice-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/spice-devel<br class=""></div></blockquote></div><br class=""></body></html>