xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Jiandi An <anjiandi@codeaurora.org>, xen-devel@lists.xen.org
Cc: sstabellini@kernel.org, shankerd@codeaurora.org
Subject: Re: Xen: ARM: Support for mapping ECAM PCIe Config Space Specified In Static ACPI Table
Date: Mon, 19 Dec 2016 11:37:01 +0100	[thread overview]
Message-ID: <55e82b99-663a-e8aa-91c8-80ee284e325f@arm.com> (raw)
In-Reply-To: <1862b75a-0aeb-ab56-af9b-ef26637e18a8@arm.com>

Hi,

On 16/12/2016 15:49, Julien Grall wrote:
> On 14/12/16 08:00, Jiandi An wrote:
>> Xen currently doesn't map ECAM space specified in static ACPI table.
>> Seeking opinion on how this should be handled properly.
>> Each root complex ECAM region takes up 64K 4K pages (256MB).
>> For some platforms there might be multiple root complexes.
>> Is the plan to map all at once?Julien has mentioned support
>> for mapping ECAM may come when support for PCI passthrough is
>> added, is that right? What mechanism will it be? Will Xen or
>> dom0 be the one that parses the staic ACPI tables and map the ECAM space?
>
> For performance reason, each ECAM region would need to be mapped at
> once, so the stage-2 page table could take advantage of superpage (it
> will mostly be 2MB).
>
> Now, I don't think Xen should map the ECAM region in stage-2 before
> hand. All the regions may not be described in the MCFG and I would like
> to see a generic solution.
>
> Looking at the code (see pci_create_ecam_create in drivers/pci/ecam.c),
> ioremap is used. I believe the problem is the same for the 2 other
> threads you sent ( [1] and [2]).
>
> So it might be good to look at hooking up a call to
> XENMEM_add_to_physmap_range in ioremap.
>
> Any opinions?

I thought a bit more about it and I realized we need to be cautious on 
how to proceed here.

DOM0 will have a mix of real devices and emulated devices (e.g some part 
of the GIC). For the emulated devices, DOM0 should not call 
XENMEM_add_to_physmap_range. However, DOM0 is not aware what is emulated 
or not, so even the current approach (hooking up in platform device) 
seems fragile. We rely on Xen to say "this region cannot be mapped".

Regards,

-- 
Julien Grall

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

  reply	other threads:[~2016-12-19 10:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  8:00 Xen: ARM: Support for mapping ECAM PCIe Config Space Specified In Static ACPI Table Jiandi An
2016-12-16 14:49 ` Julien Grall
2016-12-19 10:37   ` Julien Grall [this message]
2016-12-19 12:20     ` Jaggi, Manish
2016-12-19 13:11       ` Julien Grall
2016-12-20  6:31         ` Jiandi An
2016-12-20 11:38           ` Julien Grall
2016-12-20 22:40             ` Stefano Stabellini
2016-12-19 23:54     ` Stefano Stabellini
2016-12-20 12:02       ` Julien Grall
2016-12-20 22:33         ` Stefano Stabellini
2016-12-28 18:22           ` Julien Grall
2017-01-03  9:10             ` Jan Beulich
2017-01-03 19:27             ` Stefano Stabellini
2017-01-16 14:05               ` Julien Grall
2017-01-16 19:28                 ` Stefano Stabellini

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=55e82b99-663a-e8aa-91c8-80ee284e325f@arm.com \
    --to=julien.grall@arm.com \
    --cc=anjiandi@codeaurora.org \
    --cc=shankerd@codeaurora.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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).