iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Yinghan Yang via iommu <iommu@lists.linux-foundation.org>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: "kevin.tian@intel.com" <kevin.tian@intel.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"Boeuf, Sebastien" <sebastien.boeuf@intel.com>,
	Alexander Grest <Alexander.Grest@microsoft.com>,
	"ahs3@redhat.com" <ahs3@redhat.com>
Subject: RE: [EXTERNAL] Re: Question regarding VIOT proposal
Date: Thu, 5 Nov 2020 22:05:28 +0000	[thread overview]
Message-ID: <MW2PR2101MB113096E822AD835F658808B480EE0@MW2PR2101MB1130.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20201105134503.GA950007@myrica>

Hi Jean,

Thank you for the clarifications. In cases where a large range of  PCI segments may be assigned to guest, would it make sense to describe this configuration as base + count. Currently, one would have to describe them individually. 

Yinghan

-----Original Message-----
From: Jean-Philippe Brucker <jean-philippe@linaro.org> 
Sent: Thursday, November 5, 2020 5:45 AM
To: Yinghan Yang <Yinghan.Yang@microsoft.com>
Cc: iommu@lists.linux-foundation.org; Alexander Grest <Alexander.Grest@microsoft.com>; eric.auger@redhat.com; jean-philippe@linaro.org; joro@8bytes.org; kevin.tian@intel.com; lorenzo.pieralisi@arm.com; mst@redhat.com; Boeuf, Sebastien <sebastien.boeuf@intel.com>; ahs3@redhat.com
Subject: [EXTERNAL] Re: Question regarding VIOT proposal

Hi,

On Thu, Nov 05, 2020 at 12:13:53AM +0000, Yinghan Yang via iommu wrote:
> Hi iommu developers,
> 
>  
> 
> I have a question regarding the recent VIOT submission for supporting 
> paravirtualized IOMMU in guests. The spec defines PCI Range Node 
> Structure
> (5.2.30.3) that maps to a single PCI segment.

(To provide some context for other readers, a description of the node is available at https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjpbrucker.net%2Fvirtio-iommu%2Fviot%2Fviot-v8.pdf&amp;data=04%7C01%7CYinghan.Yang%40microsoft.com%7Cc52e42b3eb63495ed28708d881910b6f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637401807671941922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=YiZLS6kKMqe58vPsJFYIfA3nVICc3G44E6bziD3cC94%3D&amp;reserved=0)

> 
>  
> 
> Is it possible for the new table to express that an IOMMU covers all 
> PCI segments?  This could help support scenarios where:
> 
>  
> 
>  1. Devices are dynamically assigned to guests during runtime  2. 
> Devices in the same guests are assigned to different segments.

This is possible with the current descriptor, assuming the PCI segments are static. The platform can provide a PCI Range Node for each segment, with a BDF range 0 - 0xffff. For example a table could describe:

* PCI Range Node
  * PCI Segment: 0
  * BDF start: 0
  * BDF end: 0xffff
  * Endpoint start: 0
  * Output node: &viommu
* PCI Range Node
  * PCI Segment: 1
  * BDF start: 0
  * BDF end: 0xffff
  * Endpoint start: 0x10000
  * Output node: &viommu
* viommu Node

Then the IOMMU covers all PCI devices on the two segments. To identify a device when configuring DMA translation, the IOMMU driver builds a 32-bit endpoint ID = Endpoint start + BDF.

Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-11-05 22:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  0:13 Question regarding VIOT proposal Yinghan Yang via iommu
2020-11-05 13:45 ` Jean-Philippe Brucker
2020-11-05 22:05   ` Yinghan Yang via iommu [this message]
2020-11-06 13:57     ` [EXTERNAL] " Jean-Philippe Brucker
2020-12-03 22:21       ` Yinghan Yang via iommu
2020-12-03 23:01         ` Al Stone
2020-12-04 18:09           ` Jean-Philippe Brucker
2020-12-04 18:15             ` Yinghan Yang via iommu
2020-12-04 20:18             ` Al Stone
2021-02-02  9:17               ` Jean-Philippe Brucker
2021-02-02 20:27                 ` Al Stone
2021-02-03  8:46                   ` Jean-Philippe Brucker
2021-02-04 20:25                     ` Al Stone
2021-02-16 21:31                       ` Al Stone
2021-02-17  9:37                         ` Jean-Philippe Brucker
2021-02-18 23:39                           ` Al Stone
2021-02-19 11:24                             ` Jean-Philippe Brucker
2021-02-19 17:35                               ` Al Stone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW2PR2101MB113096E822AD835F658808B480EE0@MW2PR2101MB1130.namprd21.prod.outlook.com \
    --to=iommu@lists.linux-foundation.org \
    --cc=Alexander.Grest@microsoft.com \
    --cc=Yinghan.Yang@microsoft.com \
    --cc=ahs3@redhat.com \
    --cc=jean-philippe@linaro.org \
    --cc=kevin.tian@intel.com \
    --cc=mst@redhat.com \
    --cc=sebastien.boeuf@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).