Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58B21C433F5 for ; Fri, 1 Oct 2021 00:50:29 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A0CB61A4F for ; Fri, 1 Oct 2021 00:50:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A0CB61A4F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mW6kc-0006b1-7q; Thu, 30 Sep 2021 20:50:10 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1mW6kZ-0006Yv-3z for kernelnewbies@kernelnewbies.org; Thu, 30 Sep 2021 20:50:07 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 1 Oct 2021 09:50:00 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 52015f2761565b38; Fri, 01 Oct 2021 09:50:00 +0900 DKIM-Signature: a=rsa-sha256; b=cyjFjhRMsbtLpVAoqhKXMcOjU4dXE4MKqrajry4OeBe+XfPkuc0okQPZL3+GtegGqBXxricwa7 c/xLcVUnaW6wshuE22RwxAe8LqeYIoVIYc9dwD6OhPL7wwqy+pn6QP47PkJFSC0jM2uZr+YQ4qbv 3wJI24Fe3djvnFJCLIGwy4G4UlvKXbvD36giMKhyEotpEtpz2WwvCfZvxsJqAAbQqjpqtrOYP1yQ uke78HdODEaDRLANL28opbT/wvR8KSZ4N23vMLMWojtz5f5InNnAfVf8YKlRX5NY0mH15UFrTGCV EQq7pOl/hysvvFGNXpqY5IBTITBrHeja/uC8jLyA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=3+1uW0VrGKDtgydkyYgu3Ky8JYDVipf4X5Bb3iItyAk=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 7a9dff1b61565b38; Fri, 01 Oct 2021 09:50:00 +0900 From: To: "'FMDF'" References: <00ec01d7b5c7$fcfeb7f0$f6fc27d0$@etri.re.kr> In-Reply-To: Subject: RE: Can register addresses conversion go through iommu too? probably not.. Date: Fri, 1 Oct 2021 09:49:59 +0900 Message-ID: <012b01d7b65e$4306f730$c914e590$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJMXPfuawupDeXGJFVQSwroyx3x1ADO/p45qs2KWYA= Content-Language: ko Cc: 'kernelnewbies' X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8643686527187142575==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============8643686527187142575== Content-Type: multipart/alternative; boundary="----=_NextPart_000_012C_01D7B6A9.B2EF6280" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_012C_01D7B6A9.B2EF6280 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I see, Thanks a lot! I remember having read about SR-IOV long time ago. Regards, Chan Kim =20 From: FMDF =20 Sent: Friday, October 1, 2021 8:41 AM To: ckim@etri.re.kr Cc: kernelnewbies Subject: Re: Can register addresses conversion go through iommu too? = probably not.. =20 On Thu, 30 Sep 2021, 08:54 , > = wrote: [If] the OS is running in virtualized environment (a hypervisor under = it), this kernel virtual address should go under conversion twice=20 1. virtual to physical by OS (this physical is not actually physical, = an intermediate physical?) 2. intermediate physical to real physical I thought these two conversions are done by kernel or hypervisor = software because iommu is for address translation for the addresses that = the device =E2=80=9Cuses(or generates)=E2=80=9D, not for the kernel to = access the device itself.=20 Is my understanding correct? 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. =20 Virtual Function I/O (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.=20 =20 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.=20 =20 Regards,=20 =20 Fabio M. De Francesco =20 P.S.: For further information about Linux virtualization capabilities, = please read = https://en.wikipedia.org/wiki/Linux_kernel#Architecture_and_features. Any help will be appreciated. Thank you! Chan Kim ------=_NextPart_000_012C_01D7B6A9.B2EF6280 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

I see, Thanks a lot! I remember having read about = SR-IOV long time ago.

Regards,

Chan Kim

 

From:<= /b> FMDF = <fmdefrancesco@gmail.com>
Sent: Friday, October 1, 2021 = 8:41 AM
To: ckim@etri.re.kr
Cc: kernelnewbies = <kernelnewbies@kernelnewbies.org>
Subject: Re: Can = register addresses conversion go through iommu too? probably = not..

 

On Thu, 30 Sep 2021, 08:54 , <ckim@etri.re.kr> = wrote:

[If] the OS is running in virtualized environment (a = hypervisor under it), this kernel virtual address should go under = conversion twice 

1. virtual to physical by OS  (this physical is not = actually physical, an intermediate physical?)

2. intermediate physical to real = physical

I thought these two conversions are done by kernel or = hypervisor software because iommu is for address translation for the = addresses that the device =E2=80=9Cuses(or = generates)=E2=80=9D, not for the kernel to = access the device itself.

Is my understanding = correct?

<= p class=3DMsoNormal>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.

 

Virtual Function I/O (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. 

 

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. 

 

Regards, 

 

Fabio M. De = Francesco

 

P.S.: For further information about = Linux virtualization capabilities, please read https://en.wikipedia.org/wiki/Linux_kernel#Architecture_and_features= .

Any help will be appreciated.

Thank you!

Chan = Kim

------=_NextPart_000_012C_01D7B6A9.B2EF6280-- --===============8643686527187142575== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============8643686527187142575==--