From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:30
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
This patchset is to enable 10-Bit tag for PCIe EP devices (include VF) and
RP devices
V4->V5:
- Fix warning variable 'capa' is uninitialized.
- Fix warning unused variable 'pchild'.
V3->V4:
- Get the value of pcie_devcap2 in set_pcie_port_type().
- Add Reviewed-by: Christoph Hellwig [off-list ref] in [PATCH V4 1/6],
[PATCH V4 3/6], [PATCH V4 4/6], [PATCH V4 5/6].
- Fix some code style.
- Rebased on v5.13-rc6.
V2->V3:
- Use cached Device Capabilities Register suggested by Christoph.
- Fix code style to avoid > 80 char lines.
- Renamve devcap2 to pcie_devcap2.
V1->V2: Fix some comments by Christoph.
- Store the devcap2 value in the pci_dev instead of reading it multiple
times.
- Change pci_info to pci_dbg to avoid the noisy log.
- Rename ext_10bit_tag_comp_path to ext_10bit_tag.
- Fix the compile error.
- Rebased on v5.13-rc1.
Dongdong Liu (6):
PCI: Use cached Device Capabilities Register
PCI: Use cached Device Capabilities 2 Register
PCI: Add 10-Bit Tag register definitions
PCI: Enable 10-Bit tag support for PCIe Endpoint devices
PCI/IOV: Enable 10-Bit tag support for PCIe VF devices
PCI: Enable 10-Bit tag support for PCIe RP devices
drivers/media/pci/cobalt/cobalt-driver.c | 5 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +-
drivers/pci/iov.c | 8 +++
drivers/pci/pci.c | 14 ++---
drivers/pci/pcie/aspm.c | 11 ++--
drivers/pci/pcie/portdrv_pci.c | 72 +++++++++++++++++++++++++
drivers/pci/probe.c | 54 ++++++++++++++-----
drivers/pci/quirks.c | 3 +-
include/linux/pci.h | 5 ++
include/uapi/linux/pci_regs.h | 5 ++
10 files changed, 144 insertions(+), 37 deletions(-)
--
2.7.4
From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:30
It will make sense to store the pcie_devcap2 value in the pci_dev
structure instead of reading Device Capabilities 2 Register multiple
times. Get the pcie_devcap2 value set_pcie_port_type(), then use
cached pcie_devcap2 in the needed place.
Signed-off-by: Dongdong Liu <redacted>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +---
drivers/pci/pci.c | 9 ++++-----
drivers/pci/probe.c | 10 ++++------
include/linux/pci.h | 2 ++
4 files changed, 11 insertions(+), 14 deletions(-)
@@ -6303,7 +6303,6 @@ static int cxgb4_iov_configure(struct pci_dev *pdev, int num_vfs)structpci_dev*pbridge;structport_info*pi;charname[IFNAMSIZ];-u32devcap2;u16flags;/* If we want to instantiate Virtual Functions, then our
@@ -6313,10 +6312,9 @@ static int cxgb4_iov_configure(struct pci_dev *pdev, int num_vfs)*/pbridge=pdev->bus->self;pcie_capability_read_word(pbridge,PCI_EXP_FLAGS,&flags);-pcie_capability_read_dword(pbridge,PCI_EXP_DEVCAP2,&devcap2);if((flags&PCI_EXP_FLAGS_VERS)<2||-!(devcap2&PCI_EXP_DEVCAP2_ARI)){+!(pbridge->pcie_devcap2&PCI_EXP_DEVCAP2_ARI)){/* Our parent bridge does not support ARI so issue a*warningandskipinstantiatingtheVFs.They*won'tbereachable.
@@ -3690,7 +3690,7 @@ int pci_enable_atomic_ops_to_root(struct pci_dev *dev, u32 cap_mask){structpci_bus*bus=dev->bus;structpci_dev*bridge;-u32cap,ctl2;+u32ctl2;if(!pci_is_pcie(dev))return-EINVAL;
@@ -3714,19 +3714,18 @@ int pci_enable_atomic_ops_to_root(struct pci_dev *dev, u32 cap_mask)while(bus->parent){bridge=bus->self;-pcie_capability_read_dword(bridge,PCI_EXP_DEVCAP2,&cap);-switch(pci_pcie_type(bridge)){/* Ensure switch ports support AtomicOp routing */casePCI_EXP_TYPE_UPSTREAM:casePCI_EXP_TYPE_DOWNSTREAM:-if(!(cap&PCI_EXP_DEVCAP2_ATOMIC_ROUTE))+if(!(bridge->pcie_devcap2&+PCI_EXP_DEVCAP2_ATOMIC_ROUTE))return-EINVAL;break;/* Ensure root port supports all the sizes we care about */casePCI_EXP_TYPE_ROOT_PORT:-if((cap&cap_mask)!=cap_mask)+if((bridge->pcie_devcap2&cap_mask)!=cap_mask)return-EINVAL;break;}
From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:32
PCIe spec 5.0r1.0 section 2.2.6.2 implementation note, In configurations
where a Requester with 10-Bit Tag Requester capability needs to target
multiple Completers, one needs to ensure that the Requester sends 10-Bit
Tag Requests only to Completers that have 10-Bit Tag Completer capability.
So we enable 10-Bit Tag Requester for root port only when the devices
under the root port support 10-Bit Tag Completer.
Signed-off-by: Dongdong Liu <redacted>
---
drivers/pci/pcie/portdrv_pci.c | 72 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
@@ -90,6 +90,75 @@ static const struct dev_pm_ops pcie_portdrv_pm_ops = {#define PCIE_PORTDRV_PM_OPS NULL#endif /* !PM */+staticintpci_10bit_tag_comp_support(structpci_dev*dev,void*data)+{+u8*support=data;++if(*support==0)+return0;++if(!pci_is_pcie(dev)){+*support=0;+return0;+}++/*+*PCIespec5.0r1.0section2.2.6.2implementationnote.+*ForconfigurationswhereaRequesterwith10-BitTagRequester+*capabilitytargetsCompleterswheresomedoandsomedonothave+*10-BitTagCompletercapability,howtheRequesterdetermineswhich+*NPRsinclude10-BitTagsisoutsidethescopeofthisspecification.+*Sowedonotconsiderhotplugscenario.+*/+if(dev->is_hotplug_bridge){+*support=0;+return0;+}++if(!(dev->pcie_devcap2&PCI_EXP_DEVCAP2_10BIT_TAG_COMP)){+*support=0;+return0;+}++return0;+}++staticvoidpci_configure_rp_10bit_tag(structpci_dev*dev)+{+u8support=1;++if(dev->subordinate==NULL)+return;++/* If no devices under the root port, no need to enable 10-Bit Tag. */+if(list_empty(&dev->subordinate->devices))+return;++pci_10bit_tag_comp_support(dev,&support);+if(!support)+return;++/*+*PCIespec5.0r1.0section2.2.6.2implementationnote.+*InconfigurationswhereaRequesterwith10-BitTagRequester+*capabilityneedstotargetmultipleCompleters,oneneedstoensure+*thattheRequestersends10-BitTagRequestsonlytoCompleters+*thathave10-BitTagCompletercapability.Soweenable10-BitTag+*Requesterforrootportonlywhenthedevicesundertherootport+*support10-BitTagCompleter.+*/+pci_walk_bus(dev->subordinate,pci_10bit_tag_comp_support,&support);+if(!support)+return;++if(!(dev->pcie_devcap2&PCI_EXP_DEVCAP2_10BIT_TAG_REQ))+return;++pci_dbg(dev,"enabling 10-Bit Tag Requester\n");+pcie_capability_set_word(dev,PCI_EXP_DEVCTL2,+PCI_EXP_DEVCTL2_10BIT_TAG_REQ_EN);+}+/**pcie_portdrv_probe-ProbePCI-Expressportdevices*@dev:PCI-Expressportdevicebeingprobed
@@ -111,6 +180,9 @@ static int pcie_portdrv_probe(struct pci_dev *dev,(type!=PCI_EXP_TYPE_RC_EC)))return-ENODEV;+if(type==PCI_EXP_TYPE_ROOT_PORT)+pci_configure_rp_10bit_tag(dev);+if(type==PCI_EXP_TYPE_RC_EC)pcie_link_rcec(dev);
From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:33
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
Signed-off-by: Dongdong Liu <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
drivers/pci/probe.c | 33 +++++++++++++++++++++++++++++++++
include/linux/pci.h | 2 ++
2 files changed, 35 insertions(+)
From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:36
It will make sense to store the pcie_devcap value in the pci_dev
structure instead of reading Device Capabilities Register multiple
times. The fisrt place to use pcie_devcap is in set_pcie_port_type(),
get the pcie_devcap value here, then use cached pcie_devcap in the
needed place.
Acked-by: Hans Verkuil <redacted>
Signed-off-by: Dongdong Liu <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/cobalt/cobalt-driver.c | 5 +++--
drivers/pci/pci.c | 5 +----
drivers/pci/pcie/aspm.c | 11 ++++-------
drivers/pci/probe.c | 11 +++--------
drivers/pci/quirks.c | 3 +--
include/linux/pci.h | 1 +
6 files changed, 13 insertions(+), 23 deletions(-)
@@ -831,8 +829,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)*DisableASPMforpre-1.1PCIedevice,wefollowMStouse*RBERbittodetermineifafunctionis1.1versiondevice*/-pcie_capability_read_dword(child,PCI_EXP_DEVCAP,®32);-if(!(reg32&PCI_EXP_DEVCAP_RBER)&&!aspm_force){+if(!(child->pcie_devcap&PCI_EXP_DEVCAP_RBER)&&!aspm_force){pci_info(child,"disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'\n");return-EINVAL;}
From: Dongdong Liu <hidden> Date: 2021-06-21 10:28:36
Add 10-Bit Tag register definitions for use in subsequen patches.
See the PCIe 5.0 spec section 7.5.3.15 and 9.3.3.2.
Signed-off-by: Dongdong Liu <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
include/uapi/linux/pci_regs.h | 5 +++++
1 file changed, 5 insertions(+)
From: Christoph Hellwig <hch@infradead.org> Date: 2021-06-22 06:20:08
On Mon, Jun 21, 2021 at 06:27:22PM +0800, Dongdong Liu wrote:
PCIe spec 5.0r1.0 section 2.2.6.2 implementation note, In configurations
where a Requester with 10-Bit Tag Requester capability needs to target
multiple Completers, one needs to ensure that the Requester sends 10-Bit
Tag Requests only to Completers that have 10-Bit Tag Completer capability.
So we enable 10-Bit Tag Requester for root port only when the devices
under the root port support 10-Bit Tag Completer.
Signed-off-by: Dongdong Liu <redacted>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
I think 10-bit tag support should be integrated with extended (8-bit)
tag support instead of having two separate functions.
If we have "no_ext_tags" set because some device doesn't support 8-bit
tags correctly, we probably shouldn't try to enable 10-bit tags
either.
From: Dongdong Liu <hidden> Date: 2021-07-16 11:12:46
Hi Bjorn
Many thanks for your review.
On 2021/7/16 1:23, Bjorn Helgaas wrote:
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
quoted
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
PCIe spec 5.0 r1.0 section 2.2.6.2 says
If an Endpoint supports sending Requests to other Endpoints (as opposed
to host memory), the Endpoint must not send 10-Bit Tag Requests to
another given Endpoint unless an implementation-specific mechanism
determines that the Endpoint supports 10-Bit Tag Completer capability.
Not sending 10-Bit Tag Requests to other Endpoints at all
may be acceptable for some implementations. More sophisticated
mechanisms are outside the scope of this specification.
Not sending 10-Bit Tag Requests to other Endpoints at all seems simple.
Add kernel parameter pci=pcie_bus_peer2peer when boot kernel with
P2PDMA, then do not config 10-BIT Tag.
if (pcie_bus_config != PCIE_BUS_PEER2PEER)
pci_configure_10bit_tags(dev);
Bjorn and Logan, any suggestion?
I think 10-bit tag support should be integrated with extended (8-bit)
tag support instead of having two separate functions.
If we have "no_ext_tags" set because some device doesn't support 8-bit
tags correctly, we probably shouldn't try to enable 10-bit tags
either.
On Fri, Jul 16, 2021 at 07:12:16PM +0800, Dongdong Liu wrote:
Hi Bjorn
Many thanks for your review.
On 2021/7/16 1:23, Bjorn Helgaas wrote:
quoted
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
quoted
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
PCIe spec 5.0 r1.0 section 2.2.6.2 says
If an Endpoint supports sending Requests to other Endpoints (as opposed to
host memory), the Endpoint must not send 10-Bit Tag Requests to another
given Endpoint unless an implementation-specific mechanism determines that
the Endpoint supports 10-Bit Tag Completer capability. Not sending 10-Bit
Tag Requests to other Endpoints at all
may be acceptable for some implementations. More sophisticated mechanisms
are outside the scope of this specification.
Not sending 10-Bit Tag Requests to other Endpoints at all seems simple.
Add kernel parameter pci=pcie_bus_peer2peer when boot kernel with P2PDMA,
then do not config 10-BIT Tag.
if (pcie_bus_config != PCIE_BUS_PEER2PEER)
pci_configure_10bit_tags(dev);
Seems like a reasonable start. I wish this were more dynamic and we
didn't have to rely on a kernel parameter to make P2PDMA safe, but
that seems to be the current situation.
Does the same consideration apply to enabling Extended Tags (8-bit
tags)? I would guess so, but sec 2.2.6.2 says "Receivers/Completers
must handle 8-bit Tag values correctly regardless of the setting of
their Extended Tag Field Enable bit" so there's some subtlety there
with regard to what "Extended Tag Field Supported" means.
I don't know why the "Extended Tag Field Supported" bit exists if all
receivers are required to support 8-bit tags.
If we need a similar change to pci_configure_extended_tags() to check
pcie_bus_config, that should be a separate patch because it would be a
bug fix independent of 10-bit tag support.
Bjorn
Hi Bjorn
Many thanks for your review.
On 2021/7/16 1:23, Bjorn Helgaas wrote:
quoted
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
quoted
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
PCIe spec 5.0 r1.0 section 2.2.6.2 says
If an Endpoint supports sending Requests to other Endpoints (as opposed
to host memory), the Endpoint must not send 10-Bit Tag Requests to
another given Endpoint unless an implementation-specific mechanism
determines that the Endpoint supports 10-Bit Tag Completer capability.
Not sending 10-Bit Tag Requests to other Endpoints at all
may be acceptable for some implementations. More sophisticated
mechanisms are outside the scope of this specification.
Not sending 10-Bit Tag Requests to other Endpoints at all seems simple.
Add kernel parameter pci=pcie_bus_peer2peer when boot kernel with
P2PDMA, then do not config 10-BIT Tag.
if (pcie_bus_config != PCIE_BUS_PEER2PEER)
pci_configure_10bit_tags(dev);
Bjorn and Logan, any suggestion?
I think we need a check in the P2PDMA code to ensure that a device with
10bit tags doesn't interact with a device that has no 10bit tags. Before
that happens, the kernel should emit a warning saying to enable a
specific kernel parameter.
Though a parameter with a bit more granularity might be appropriate. See
what was done for disable_acs_redir where it affects only the devices
specified in the list.
Thanks,
Logan
From: Dongdong Liu <hidden> Date: 2021-07-17 08:51:11
[+cc Sinan]
On 2021/7/16 22:17, Bjorn Helgaas wrote:
On Fri, Jul 16, 2021 at 07:12:16PM +0800, Dongdong Liu wrote:
quoted
Hi Bjorn
Many thanks for your review.
On 2021/7/16 1:23, Bjorn Helgaas wrote:
quoted
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
quoted
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
PCIe spec 5.0 r1.0 section 2.2.6.2 says
If an Endpoint supports sending Requests to other Endpoints (as opposed to
host memory), the Endpoint must not send 10-Bit Tag Requests to another
given Endpoint unless an implementation-specific mechanism determines that
the Endpoint supports 10-Bit Tag Completer capability. Not sending 10-Bit
Tag Requests to other Endpoints at all
may be acceptable for some implementations. More sophisticated mechanisms
are outside the scope of this specification.
Not sending 10-Bit Tag Requests to other Endpoints at all seems simple.
Add kernel parameter pci=pcie_bus_peer2peer when boot kernel with P2PDMA,
then do not config 10-BIT Tag.
if (pcie_bus_config != PCIE_BUS_PEER2PEER)
pci_configure_10bit_tags(dev);
Seems like a reasonable start. I wish this were more dynamic and we
didn't have to rely on a kernel parameter to make P2PDMA safe, but
that seems to be the current situation.
Does the same consideration apply to enabling Extended Tags (8-bit
tags)? I would guess so, but sec 2.2.6.2 says "Receivers/Completers
must handle 8-bit Tag values correctly regardless of the setting of
their Extended Tag Field Enable bit" so there's some subtlety there
with regard to what "Extended Tag Field Supported" means.
I don't know why the "Extended Tag Field Supported" bit exists if all
receivers are required to support 8-bit tags.
The comment in the [PATCH] PCI: enable extended tags support for PCIe
endpoints
(https://patchwork.kernel.org/project/linux-arm-msm/patch/1474769434-5756-1-git-send-email-okaya@codeaurora.org/)
says "All PCIe completers are required to support 8 bit tags.
Generation of 8 bit tags is optional. That's why, there is a supported
and an enable/disable bit."
So the completers can handle 8-bit Tag values correctly also regardless
of "Extended Tag Field Supported" ? seems not very clearly, but current
code implement follow this.
If we need a similar change to pci_configure_extended_tags() to check
pcie_bus_config, that should be a separate patch because it would be a
bug fix independent of 10-bit tag support.
Seems no need if All PCIe completers are required to support 8 bit tags.
Thanks,
Dongdong
From: Dongdong Liu <hidden> Date: 2021-07-17 09:41:51
On 2021/7/16 23:51, Logan Gunthorpe wrote:
On 2021-07-16 5:12 a.m., Dongdong Liu wrote:
quoted
Hi Bjorn
Many thanks for your review.
On 2021/7/16 1:23, Bjorn Helgaas wrote:
quoted
[+cc Logan]
On Mon, Jun 21, 2021 at 06:27:20PM +0800, Dongdong Liu wrote:
quoted
10-Bit Tag capability, introduced in PCIe-4.0 increases the total Tag
field size from 8 bits to 10 bits.
For platforms where the RC supports 10-Bit Tag Completer capability,
it is highly recommended for platform firmware or operating software
Recommended by whom? If the spec recommends it, we should provide the
citation.
that configures PCIe hierarchies to Set the 10-Bit Tag Requester Enable
bit automatically in Endpoints with 10-Bit Tag Requester capability. This
enables the important class of 10-Bit Tag capable adapters that send
Memory Read Requests only to host memory.
What is the implication for P2PDMA? What happens if we enable 10-bit
tags for device A, and A generates Mem Read Requests to device B,
which does not support 10-bit tags?
PCIe spec 5.0 r1.0 section 2.2.6.2 says
If an Endpoint supports sending Requests to other Endpoints (as opposed
to host memory), the Endpoint must not send 10-Bit Tag Requests to
another given Endpoint unless an implementation-specific mechanism
determines that the Endpoint supports 10-Bit Tag Completer capability.
Not sending 10-Bit Tag Requests to other Endpoints at all
may be acceptable for some implementations. More sophisticated
mechanisms are outside the scope of this specification.
Not sending 10-Bit Tag Requests to other Endpoints at all seems simple.
Add kernel parameter pci=pcie_bus_peer2peer when boot kernel with
P2PDMA, then do not config 10-BIT Tag.
if (pcie_bus_config != PCIE_BUS_PEER2PEER)
pci_configure_10bit_tags(dev);
Bjorn and Logan, any suggestion?
I think we need a check in the P2PDMA code to ensure that a device with
10bit tags doesn't interact with a device that has no 10bit tags. Before
that happens, the kernel should emit a warning saying to enable a
specific kernel parameter.
Seems reasonable.
Though a parameter with a bit more granularity might be appropriate. See
what was done for disable_acs_redir where it affects only the devices
specified in the list.
Many Thanks for your suggestion. I will investigate more about this.
It seems P2PDMA also does not consider MPS safe issue if not use
"pci=pcie_bus_peer2peer".
Thanks,
Dongdong