xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Manish Jaggi <mjaggi@caviumnetworks.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: "Edgar Iglesias (edgar.iglesias@xilinx.com)"
	<edgar.iglesias@xilinx.com>, "Wei Chen" <Wei.Chen@arm.com>,
	"Campbell Sean" <scampbel@codeaurora.org>,
	"Kapoor, Prasun" <Prasun.Kapoor@caviumnetworks.com>,
	"Jiandi An" <anjiandi@codeaurora.org>,
	"Punit Agrawal" <punit.agrawal@arm.com>,
	alistair.francis@xilinx.com, jnair@caviumnetworks.com,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"manish.jaggi@caviumnetworks.com"
	<manish.jaggi@caviumnetworks.com>,
	"Shanker Donthineni" <shankerd@codeaurora.org>,
	"Steve Capper" <Steve.Capper@arm.com>
Subject: Re: [early RFC] ARM PCI Passthrough design document
Date: Wed, 25 Jan 2017 15:25:19 +0000	[thread overview]
Message-ID: <5556a7fc-e675-cacf-2585-cc714e028221@linaro.org> (raw)
In-Reply-To: <3e685f86-712a-f9be-0996-f8aa2e128b43@caviumnetworks.com>

Hello Manish,

On 25/01/17 04:37, Manish Jaggi wrote:
> On 01/24/2017 11:13 PM, Julien Grall wrote:
>>
>>
>> On 19/01/17 05:09, Manish Jaggi wrote:
>>> I think, PCI passthrough and DOM0 w/ACPI enumerating devices on PCI are separate features.
>>> Without Xen mapping PCI config space region in stage2 of dom0, ACPI dom0 wont boot.
>>> Currently for dt xen does that.
>>>
>>> So can we have 2 design documents
>>> a) PCI passthrough
>>> b) ACPI dom0/domU support in Xen and Linux
>>> - this may include:
>>> b.1 Passing IORT to Dom0 without smmu
>>> b.2 Hypercall to map PCI config space in dom0
>>> b.3 <more>
>>>
>>> What do you think?
>>
>> I don't think ACPI should be treated in a separate design document.
> As PCI passthrough support will take time to mature, why should we hold the ACPI design ?
> If I can boot dom0/domU with ACPI as it works with dt today, it would be a good milestone.

The way PCI is working on DT today is a hack. There is no SMMU support 
and the first version of GICv3 ITS support will contain hardcoded 
DeviceID (or very similar).

The current hack will introduce problem on platform where a specific 
host controller is necessary to access the configuration space. Indeed, 
at the beginning Xen may not have a driver available (this will depend 
on the contribution), but we still need to be able to use PCI with Xen.

We chose this way on DT because we didn't know when the PCI passthrough 
will be added in Xen.

As mentioned in the introduction of the design document, I envision PCI 
passthrough implementation in 2 phases:
	- Phase 1: Register all PCI devices in Xen => will allow to use ITS and 
SMMU with PCI in Xen
	- Phase 2: Assign devices to guests

This design document will cover both phases because they are tight 
together. But the implementation can be decoupled, it would be possible 
(and also my plan) to see the 2 phases upstreamed in different Xen release.

Phase 1, will cover anything necessary for Xen to discover and register 
PCI devices. This include the ACPI support (IORT,...).

I see little point to have a temporary solution for ACPI that will 
require bandwidth review. It would be better to put this bandwidth 
focusing on getting a good design document.

When we brainstormed about PCI passthrough, we identified some tasks 
that could be done in parallel of the design document. The list I have 
in mind is:
	* SMMUv3: I am aware of a company working on this
	* GICv3-ITS: work done by ARM (see [2])
	* IORT: it is required to discover ITSes and SMMU with ACPI. So it can 
at least be parsed (I will speak about hiding some part to DOM0 later)
	* PCI support for SMMUv2

There are quite a few companies willing to contribute to PCI 
passthrough. So we need some coordination to avoid redundancy. Please 
get in touch with me if you are interested to work on one of these items.

> Later when PCI passthrough design gets mature and implemented the support can be extended.
>> The support of ACPI may affect some of the decisions (such as hypercall) and we have to know them now.
>>
> Still it can be an independent with only dependent features implemented or placeholders can be addded
>> Regarding the ECAM region not mapped. This is not related to PCI passthrough but how MMIO are mapped with ACPI. This is a separate subject already in discussion (see [1]).
>>
> What about IORT generation for Dom0 without smmu ?

Looking at the IORT, the ITS node is taking the StreamID in input when 
the device is protected by an SMMU.

Rather than removing the SMMU node in the IORT, I would blacklist them 
using the STAO table (or maybe we could introduce a disable flag in the 
IORT?).

Stefano, IIRC you took part of the design of IORT. How did you envision 
hiding SMMU from DOM0?

> I believe, It is not dependent on [1]
>> Cheers,
>>
>> [1] https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg01607.html
>>

Cheers,

[2] 
https://lists.xenproject.org/archives/html/xen-devel/2016-12/msg02742.html

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-01-25 15:25 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 14:04 [early RFC] ARM PCI Passthrough design document Julien Grall
2016-12-29 14:16 ` Jaggi, Manish
2016-12-29 17:03   ` Julien Grall
2016-12-29 18:41     ` Jaggi, Manish
2016-12-29 19:38       ` Julien Grall
2017-01-04  0:24 ` Stefano Stabellini
2017-01-24 14:28   ` Julien Grall
2017-01-24 20:07     ` Stefano Stabellini
2017-01-25 11:21       ` Roger Pau Monné
2017-01-25 18:53       ` Julien Grall
2017-01-31 16:53         ` Edgar E. Iglesias
2017-01-31 17:09           ` Julien Grall
2017-01-31 19:06             ` Edgar E. Iglesias
2017-01-31 22:08               ` Stefano Stabellini
2017-02-01 19:04               ` Julien Grall
2017-02-01 19:31                 ` Stefano Stabellini
2017-02-01 20:24                   ` Julien Grall
2017-02-02 15:33                 ` Edgar E. Iglesias
2017-02-02 23:12                   ` Stefano Stabellini
2017-02-02 23:44                     ` Edgar E. Iglesias
2017-02-10  1:01                       ` Stefano Stabellini
2017-02-13 15:39                         ` Julien Grall
2017-02-13 19:59                           ` Stefano Stabellini
2017-02-14 17:21                             ` Julien Grall
2017-02-14 18:20                               ` Stefano Stabellini
2017-02-14 20:18                                 ` Julien Grall
2017-02-13 15:35                   ` Julien Grall
2017-02-22  4:03                     ` Edgar E. Iglesias
2017-02-23 16:47                       ` Julien Grall
2017-03-02 21:13                         ` Edgar E. Iglesias
2017-02-02 15:40                 ` Roger Pau Monné
2017-02-13 16:22                   ` Julien Grall
2017-01-31 21:58         ` Stefano Stabellini
2017-02-01 20:12           ` Julien Grall
2017-02-01 10:55         ` Roger Pau Monné
2017-02-01 18:50           ` Stefano Stabellini
2017-02-10  9:48             ` Roger Pau Monné
2017-02-10 10:11               ` Paul Durrant
2017-02-10 12:57                 ` Roger Pau Monne
2017-02-10 13:02                   ` Paul Durrant
2017-02-10 21:04                     ` Stefano Stabellini
2017-02-02 12:38           ` Julien Grall
2017-02-02 23:06             ` Stefano Stabellini
2017-03-08 19:06               ` Julien Grall
2017-03-08 19:12                 ` Konrad Rzeszutek Wilk
2017-03-08 19:55                   ` Stefano Stabellini
2017-03-08 21:51                     ` Julien Grall
2017-03-09  2:59                   ` Roger Pau Monné
2017-03-09 11:17                     ` Konrad Rzeszutek Wilk
2017-03-09 13:26                       ` Julien Grall
2017-03-10  0:29                         ` Konrad Rzeszutek Wilk
2017-03-10  3:23                           ` Roger Pau Monné
2017-03-10 15:28                             ` Konrad Rzeszutek Wilk
2017-03-15 12:07                               ` Roger Pau Monné
2017-03-15 12:42                                 ` Konrad Rzeszutek Wilk
2017-03-15 12:56                                   ` Roger Pau Monné
2017-03-15 15:11                                     ` Venu Busireddy
2017-03-15 16:38                                       ` Roger Pau Monn?
2017-03-15 16:54                                         ` Venu Busireddy
2017-03-15 17:00                                           ` Roger Pau Monn?
2017-05-03 12:38                                             ` Julien Grall
2017-05-03 12:53                                         ` Julien Grall
2017-01-25  4:23     ` Manish Jaggi
2017-01-06 15:12 ` Roger Pau Monné
2017-01-06 21:16   ` Stefano Stabellini
2017-01-24 17:17   ` Julien Grall
2017-01-25 11:42     ` Roger Pau Monné
2017-01-31 15:59       ` Julien Grall
2017-01-31 22:03         ` Stefano Stabellini
2017-02-01 10:28           ` Roger Pau Monné
2017-02-01 18:45             ` Stefano Stabellini
2017-01-06 16:27 ` Edgar E. Iglesias
2017-01-06 21:12   ` Stefano Stabellini
2017-01-09 17:50     ` Edgar E. Iglesias
2017-01-19  5:09 ` Manish Jaggi
2017-01-24 17:43   ` Julien Grall
2017-01-25  4:37     ` Manish Jaggi
2017-01-25 15:25       ` Julien Grall [this message]
2017-01-30  7:41         ` Manish Jaggi
2017-01-31 13:33           ` Julien Grall
2017-05-19  6:38 ` Goel, Sameer
2017-05-19 16:48   ` Julien Grall

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=5556a7fc-e675-cacf-2585-cc714e028221@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=Steve.Capper@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=alistair.francis@xilinx.com \
    --cc=anjiandi@codeaurora.org \
    --cc=edgar.iglesias@xilinx.com \
    --cc=jnair@caviumnetworks.com \
    --cc=manish.jaggi@caviumnetworks.com \
    --cc=mjaggi@caviumnetworks.com \
    --cc=punit.agrawal@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=scampbel@codeaurora.org \
    --cc=shankerd@codeaurora.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).