From: Hanjun Guo <hanjun.guo@linaro.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Hanjun Guo <guohanjun@huawei.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linuxarm@huawei.com
Subject: Re: [RFC PATCH v2 3/4] ACPI: IORT: Skip SMMUv3 device ID map for two steps mappings
Date: Wed, 27 Sep 2017 05:39:00 +0800 [thread overview]
Message-ID: <59CAC8F4.2040503@linaro.org> (raw)
In-Reply-To: <20170922125334.GC3475@red-moon>
On 09/22/2017 08:53 PM, Lorenzo Pieralisi wrote:
> On Thu, Sep 21, 2017 at 09:17:17PM +0800, Hanjun Guo wrote:
>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>
>> IORT revision C introduced SMMUv3 MSI support which adding a
>> device ID mapping index in SMMUv3 sub table, to get the SMMUv3
>> device ID mapping for the output ID (dev ID for ITS) and the
>> link to which ITS.
>>
>> So if a platform supports SMMUv3 MSI for control interrupt,
>> there will be a additional single map entry under SMMU, this
>> will not introduce any difference for devices just use one
>> step map to get its output ID and parent (ITS or SMMU), such
>> as PCI/NC/PMCG ---> ITS or PCI/NC ---> SMMU, but we need to
>> do the special handling for two steps map case such as
>> PCI/NC--->SMMUv3--->ITS.
>>
>> Take a PCI hostbridge for example,
>>
>> |----------------------|
>> | Root Complex Node |
>> |----------------------|
>> | map entry[x] |
>> |----------------------|
>> | id value |
>> | output_reference |
>> |---|------------------|
>> |
>> | |----------------------|
>> |-->| SMMUv3 |
>> |----------------------|
>> | SMMU dev ID |
>> | mapping index 0 |
>> |----------------------|
>> | map entry[0] |
>> |----------------------|
>> | id value |
>> | output_reference-----------> ITS 1 (SMMU MSI domain)
>> |----------------------|
>> | map entry[1] |
>> |----------------------|
>> | id value |
>> | output_reference-----------> ITS 2 (PCI MSI domain)
>> |----------------------|
>>
>> When the SMMU dev ID mapping index is 0, there is entry[0]
>> to map to a ITS, we need to skip that map entry for PCI
>> or NC (named component), or we may get the wrong ITS parent.
>
> We do skip it because it is a single mapping that it is currently
> not allowed for SMMUv3 components, right ?
>
> Ok, we barf with a printk log message if we encounter such mapping
> but the mapping won't resolve to the SMMUv3 MSI in the current
> kernel.
This is not clear in the spec, maybe we also need to update the IORT
spec about it.
Thanks
Hanjun
WARNING: multiple messages have this Message-ID (diff)
From: hanjun.guo@linaro.org (Hanjun Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 3/4] ACPI: IORT: Skip SMMUv3 device ID map for two steps mappings
Date: Wed, 27 Sep 2017 05:39:00 +0800 [thread overview]
Message-ID: <59CAC8F4.2040503@linaro.org> (raw)
In-Reply-To: <20170922125334.GC3475@red-moon>
On 09/22/2017 08:53 PM, Lorenzo Pieralisi wrote:
> On Thu, Sep 21, 2017 at 09:17:17PM +0800, Hanjun Guo wrote:
>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>
>> IORT revision C introduced SMMUv3 MSI support which adding a
>> device ID mapping index in SMMUv3 sub table, to get the SMMUv3
>> device ID mapping for the output ID (dev ID for ITS) and the
>> link to which ITS.
>>
>> So if a platform supports SMMUv3 MSI for control interrupt,
>> there will be a additional single map entry under SMMU, this
>> will not introduce any difference for devices just use one
>> step map to get its output ID and parent (ITS or SMMU), such
>> as PCI/NC/PMCG ---> ITS or PCI/NC ---> SMMU, but we need to
>> do the special handling for two steps map case such as
>> PCI/NC--->SMMUv3--->ITS.
>>
>> Take a PCI hostbridge for example,
>>
>> |----------------------|
>> | Root Complex Node |
>> |----------------------|
>> | map entry[x] |
>> |----------------------|
>> | id value |
>> | output_reference |
>> |---|------------------|
>> |
>> | |----------------------|
>> |-->| SMMUv3 |
>> |----------------------|
>> | SMMU dev ID |
>> | mapping index 0 |
>> |----------------------|
>> | map entry[0] |
>> |----------------------|
>> | id value |
>> | output_reference-----------> ITS 1 (SMMU MSI domain)
>> |----------------------|
>> | map entry[1] |
>> |----------------------|
>> | id value |
>> | output_reference-----------> ITS 2 (PCI MSI domain)
>> |----------------------|
>>
>> When the SMMU dev ID mapping index is 0, there is entry[0]
>> to map to a ITS, we need to skip that map entry for PCI
>> or NC (named component), or we may get the wrong ITS parent.
>
> We do skip it because it is a single mapping that it is currently
> not allowed for SMMUv3 components, right ?
>
> Ok, we barf with a printk log message if we encounter such mapping
> but the mapping won't resolve to the SMMUv3 MSI in the current
> kernel.
This is not clear in the spec, maybe we also need to update the IORT
spec about it.
Thanks
Hanjun
next prev parent reply other threads:[~2017-09-26 21:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 13:17 [RFC PATCH v2 0/4] IORT SMMUv3 MSI support Hanjun Guo
2017-09-21 13:17 ` Hanjun Guo
2017-09-21 13:17 ` [RFC PATCH v2 1/4] ACPICA: Add SMMUv3 device ID mapping index support Hanjun Guo
2017-09-21 13:17 ` Hanjun Guo
2017-09-22 11:25 ` Lorenzo Pieralisi
2017-09-22 11:25 ` Lorenzo Pieralisi
2017-09-21 13:17 ` [RFC PATCH v2 2/4] ACPI: IORT: lookup iort node via fwnode Hanjun Guo
2017-09-21 13:17 ` Hanjun Guo
2017-09-21 13:17 ` [RFC PATCH v2 3/4] ACPI: IORT: Skip SMMUv3 device ID map for two steps mappings Hanjun Guo
2017-09-21 13:17 ` Hanjun Guo
2017-09-22 12:53 ` Lorenzo Pieralisi
2017-09-22 12:53 ` Lorenzo Pieralisi
2017-09-26 21:39 ` Hanjun Guo [this message]
2017-09-26 21:39 ` Hanjun Guo
2017-09-22 13:21 ` Robin Murphy
2017-09-22 13:21 ` Robin Murphy
2017-09-26 19:04 ` Hanjun Guo
2017-09-26 19:04 ` Hanjun Guo
2017-09-21 13:17 ` [RFC PATCH v2 4/4] ACPI: IORT: SMMUv3 nodes MSI support Hanjun Guo
2017-09-21 13:17 ` Hanjun Guo
2017-09-22 13:07 ` Lorenzo Pieralisi
2017-09-22 13:07 ` Lorenzo Pieralisi
2017-09-27 0:34 ` Hanjun Guo
2017-09-27 0:34 ` Hanjun Guo
2017-09-22 11:22 ` [RFC PATCH v2 0/4] IORT SMMUv3 " Lorenzo Pieralisi
2017-09-22 11:22 ` Lorenzo Pieralisi
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=59CAC8F4.2040503@linaro.org \
--to=hanjun.guo@linaro.org \
--cc=guohanjun@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.