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 <[email protected]> 
Sent: Thursday, November 5, 2020 5:45 AM
To: Yinghan Yang <[email protected]>
Cc: [email protected]; Alexander Grest 
<[email protected]>; [email protected]; 
[email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; Boeuf, Sebastien 
<[email protected]>; [email protected]
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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to