<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 30 Sep 2021, 08:54 , <<a href="mailto:ckim@etri.re.kr">ckim@etri.re.kr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="KO" link="#0563C1" vlink="#954F72"><div class="m_-3842801321389971224WordSection1"><p class="MsoNormal">[If] the OS is running in virtualized environment (a hypervisor under it), this kernel virtual address should go under conversion twice <br></p><p class="MsoNormal"><span lang="EN-US">1. virtual to physical by OS  (this physical is not actually physical, an intermediate physical?)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">2. intermediate physical to real physical<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I thought these two conversions are done by kernel or hypervisor software because iommu is for address translation for the addresses that the device “uses(or generates)”, not for the kernel to access the device itself. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Is my understanding correct?</span></p></div></div></blockquote></div></div><div dir="auto">Something similar to what you describe happens with old/deprecated technologies. For example, with Full virtualization I/O operations need to go through two software layers.</div><div dir="auto"><br></div><div dir="auto"><span style="border:0px;line-height:inherit;margin:0px;padding:0px;vertical-align:baseline"><span style="border-style:initial;border-color:initial;font-variant-numeric:inherit;font-variant-east-asian:inherit;line-height:inherit">Virtual Function I/O</span></span> (VFIO) exposes direct device access to user space in a secure memory (IOMMU) protected environment. With VFIO, a VM Guest can directly access hardware devices on the VM Host Server. This technique improves performance, if compared both to Full virtualization and Paravirtualization. However, with VFIO, devices cannot be shared with multiple VM guests. </div><div dir="auto"><br></div><div dir="auto">Single Root I/O Virtualization (SR-IOV) combines the benefits of performance gains of VFIO and the ability to share a device with several VM Guests (but it requires special hardware that must be capable to appear to two or more VM guests as different devices. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto"><br></div><div dir="auto">Fabio M. De Francesco</div><div dir="auto"><br></div><div dir="auto">P.S.: For further information about Linux virtualization capabilities, please read <a href="https://en.wikipedia.org/wiki/Linux_kernel#Architecture_and_features">https://en.wikipedia.org/wiki/Linux_kernel#Architecture_and_features</a>.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="KO" link="#0563C1" vlink="#954F72"><div class="m_-3842801321389971224WordSection1"><p class="MsoNormal"><span lang="EN-US">Any help will be appreciated.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Chan Kim</span></p></div></div>
</blockquote></div></div></div>