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

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://jpbrucker.net/virtio-iommu/viot/viot-v8.pdf)

> 
>  
> 
> 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 13:45 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 [this message]
2020-11-05 22:05   ` [EXTERNAL] " Yinghan Yang via iommu
2020-11-06 13:57     ` 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=20201105134503.GA950007@myrica \
    --to=jean-philippe@linaro.org \
    --cc=Alexander.Grest@microsoft.com \
    --cc=Yinghan.Yang@microsoft.com \
    --cc=ahs3@redhat.com \
    --cc=iommu@lists.linux-foundation.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).