* 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
@ 2019-12-24 3:24 Jim,Yan
2019-12-24 6:27 ` Lu Baolu
0 siblings, 1 reply; 9+ messages in thread
From: Jim,Yan @ 2019-12-24 3:24 UTC (permalink / raw)
To: Lu Baolu, Jerry Snitselaar; +Cc: Jim, Yan, iommu, linux-kernel
> -----邮件原件-----
> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> 发送时间: 2019年12月23日 21:05
> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
> mismatch
>
> Hi,
>
> On 2019/12/23 15:59, Jim,Yan wrote:
> >> -----邮件原件-----
> >> 发件人: Jerry Snitselaar [mailto:jsnitsel@redhat.com]
> >> 发送时间: 2019年12月20日 17:23
> >> 收件人: Jim,Yan <jimyan@baidu.com>
> >> 抄送: joro@8bytes.org; iommu@lists.linux-foundation.org;
> >> linux-kernel@vger.kernel.org
> >> 主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
> >> mismatch
> >>
> >> On Fri Dec 20 19, jimyan wrote:
> >>> On a system with an Intel PCIe port configured as a nvme host
> >>> device, iommu initialization fails with
> >>>
> >>> DMAR: Device scope type does not match for 0000:80:00.0
> >>>
> >>> This is because the DMAR table reports this device as having scope 2
> >>> (ACPI_DMAR_SCOPE_TYPE_BRIDGE):
> >>>
> >>
> >> Isn't that a problem to be fixed in the DMAR table then?
> >>
> >>> but the device has a type 0 PCI header:
> >>> 80:00.0 Class 0600: Device 8086:2020 (rev 06)
> >>> 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
> >>> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>> 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
> >>> 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
> >>>
> >>> VT-d works perfectly on this system, so there's no reason to bail
> >>> out on initialization due to this apparent scope mismatch. Add the
> >>> class
> >>> 0x600 ("PCI_CLASS_BRIDGE_HOST") as a heuristic for allowing DMAR
> >>> initialization for non-bridge PCI devices listed with scope bridge.
> >>>
> >>> Signed-off-by: jimyan <jimyan@baidu.com>
> >>> ---
> >>> drivers/iommu/dmar.c | 1 +
> >>> 1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index
> >>> eecd6a421667..9faf2f0e0237 100644
> >>> --- a/drivers/iommu/dmar.c
> >>> +++ b/drivers/iommu/dmar.c
> >>> @@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct
> >> dmar_pci_notify_info *info,
> >>> info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
> >>> (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE
> &&
> >>> (info->dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
> >>> + info->dev->class >> 8 != PCI_CLASS_BRIDGE_HOST &&
> >>> info->dev->class >> 8 != PCI_CLASS_BRIDGE_OTHER))) {
> >>> pr_warn("Device scope type does not match for %s\n",
> >>> pci_name(info->dev));
> >>> --
> >>> 2.11.0
> >>>
> >>> _______________________________________________
> >>> iommu mailing list
> >>> iommu@lists.linux-foundation.org
> >>> https://lists.linuxfoundation.org/mailman/listinfo/iommu
> >>>
> > Actually this patch is similar to the commit: ffb2d1eb88c3("iommu/vt-d: Don't
> reject NTB devices due to scope mismatch"). Besides, modifying DMAR table
> need OEM update BIOS. It is hard to implement.
> >
>
> For both cases, a quirk flag seems to be more reasonable, so that unrelated
> devices will not be impacted.
>
> Best regards,
> baolu
Hi Baolu,
Thanks for your advice. And I modify the patch as follow.
On a system with an Intel PCIe port configured as a nvme host device, iommu
initialization fails with
DMAR: Device scope type does not match for 0000:80:00.0
This is because the DMAR table reports this device as having scope 2
(ACPI_DMAR_SCOPE_TYPE_BRIDGE):
but the device has a type 0 PCI header:
80:00.0 Class 0600: Device 8086:2020 (rev 06)
00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
VT-d works perfectly on this system, so there's no reason to bail out
on initialization due to this apparent scope mismatch. Add the class
0x06 ("PCI_BASE_CLASS_BRIDGE") as a heuristic for allowing DMAR
initialization for non-bridge PCI devices listed with scope bridge.
Signed-off-by: jimyan <jimyan@baidu.com>
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index eecd6a421667..50c92eb23ee4 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -244,7 +244,7 @@ int dmar_insert_dev_scope(struct dmar_pci_notify_info *info,
info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
(scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE &&
(info->dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
- info->dev->class >> 8 != PCI_CLASS_BRIDGE_OTHER))) {
+ info->dev->class >> 16 != PCI_BASE_CLASS_BRIDGE))) {
pr_warn("Device scope type does not match for %s\n",
pci_name(info->dev));
return -EINVAL;
Jim
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-24 3:24 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch Jim,Yan
@ 2019-12-24 6:27 ` Lu Baolu
2019-12-24 8:18 ` 答复: " Jim,Yan
0 siblings, 1 reply; 9+ messages in thread
From: Lu Baolu @ 2019-12-24 6:27 UTC (permalink / raw)
To: Jim,Yan, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi Jim,
On 2019/12/24 11:24, Jim,Yan wrote:
>> -----邮件原件-----
>> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
>> 发送时间: 2019年12月23日 21:05
>> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
>> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
>> 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
>> mismatch
>>
>> Hi,
>>
>> On 2019/12/23 15:59, Jim,Yan wrote:
>>>> -----邮件原件-----
>>>> 发件人: Jerry Snitselaar [mailto:jsnitsel@redhat.com]
>>>> 发送时间: 2019年12月20日 17:23
>>>> 收件人: Jim,Yan <jimyan@baidu.com>
>>>> 抄送: joro@8bytes.org; iommu@lists.linux-foundation.org;
>>>> linux-kernel@vger.kernel.org
>>>> 主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
>>>> mismatch
>>>>
>>>> On Fri Dec 20 19, jimyan wrote:
>>>>> On a system with an Intel PCIe port configured as a nvme host
>>>>> device, iommu initialization fails with
>>>>>
>>>>> DMAR: Device scope type does not match for 0000:80:00.0
>>>>>
>>>>> This is because the DMAR table reports this device as having scope 2
>>>>> (ACPI_DMAR_SCOPE_TYPE_BRIDGE):
>>>>>
>>>>
>>>> Isn't that a problem to be fixed in the DMAR table then?
>>>>
>>>>> but the device has a type 0 PCI header:
>>>>> 80:00.0 Class 0600: Device 8086:2020 (rev 06)
>>>>> 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
>>>>> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>>>> 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
>>>>> 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
>>>>>
>>>>> VT-d works perfectly on this system, so there's no reason to bail
>>>>> out on initialization due to this apparent scope mismatch. Add the
>>>>> class
>>>>> 0x600 ("PCI_CLASS_BRIDGE_HOST") as a heuristic for allowing DMAR
>>>>> initialization for non-bridge PCI devices listed with scope bridge.
>>>>>
>>>>> Signed-off-by: jimyan <jimyan@baidu.com>
>>>>> ---
>>>>> drivers/iommu/dmar.c | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index
>>>>> eecd6a421667..9faf2f0e0237 100644
>>>>> --- a/drivers/iommu/dmar.c
>>>>> +++ b/drivers/iommu/dmar.c
>>>>> @@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct
>>>> dmar_pci_notify_info *info,
>>>>> info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
>>>>> (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE
>> &&
>>>>> (info->dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
>>>>> + info->dev->class >> 8 != PCI_CLASS_BRIDGE_HOST &&
>>>>> info->dev->class >> 8 != PCI_CLASS_BRIDGE_OTHER))) {
>>>>> pr_warn("Device scope type does not match for %s\n",
>>>>> pci_name(info->dev));
>>>>> --
>>>>> 2.11.0
>>>>>
>>>>> _______________________________________________
>>>>> iommu mailing list
>>>>> iommu@lists.linux-foundation.org
>>>>> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>>>>>
>>> Actually this patch is similar to the commit: ffb2d1eb88c3("iommu/vt-d: Don't
>> reject NTB devices due to scope mismatch"). Besides, modifying DMAR table
>> need OEM update BIOS. It is hard to implement.
>>>
>>
>> For both cases, a quirk flag seems to be more reasonable, so that unrelated
>> devices will not be impacted.
>>
>> Best regards,
>> baolu
>
> Hi Baolu,
> Thanks for your advice. And I modify the patch as follow.
I just posted a patch for both NTG and NVME cases. Can you please take a
look? Does it work for you?
Best regards,
baolu
>
> On a system with an Intel PCIe port configured as a nvme host device, iommu
> initialization fails with
>
> DMAR: Device scope type does not match for 0000:80:00.0
>
> This is because the DMAR table reports this device as having scope 2
> (ACPI_DMAR_SCOPE_TYPE_BRIDGE):
>
> but the device has a type 0 PCI header:
> 80:00.0 Class 0600: Device 8086:2020 (rev 06)
> 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
> 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
>
> VT-d works perfectly on this system, so there's no reason to bail out
> on initialization due to this apparent scope mismatch. Add the class
> 0x06 ("PCI_BASE_CLASS_BRIDGE") as a heuristic for allowing DMAR
> initialization for non-bridge PCI devices listed with scope bridge.
>
> Signed-off-by: jimyan <jimyan@baidu.com>
>
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index eecd6a421667..50c92eb23ee4 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -244,7 +244,7 @@ int dmar_insert_dev_scope(struct dmar_pci_notify_info *info,
> info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
> (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE &&
> (info->dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
> - info->dev->class >> 8 != PCI_CLASS_BRIDGE_OTHER))) {
> + info->dev->class >> 16 != PCI_BASE_CLASS_BRIDGE))) {
> pr_warn("Device scope type does not match for %s\n",
> pci_name(info->dev));
> return -EINVAL;
>
>
> Jim
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-24 6:27 ` Lu Baolu
@ 2019-12-24 8:18 ` Jim,Yan
2019-12-24 11:26 ` Lu Baolu
0 siblings, 1 reply; 9+ messages in thread
From: Jim,Yan @ 2019-12-24 8:18 UTC (permalink / raw)
To: Lu Baolu, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi Baolu,
> -----邮件原件-----
> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> 发送时间: 2019年12月24日 14:27
> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> 主题: Re: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to
> scope mismatch
>
> Hi Jim,
>
> On 2019/12/24 11:24, Jim,Yan wrote:
> >> -----邮件原件-----
> >> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> >> 发送时间: 2019年12月23日 21:05
> >> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar
> >> <jsnitsel@redhat.com>
> >> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> >> 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
> >> mismatch
> >>
> >> Hi,
> >>
> >> On 2019/12/23 15:59, Jim,Yan wrote:
> >>>> -----邮件原件-----
> >>>> 发件人: Jerry Snitselaar [mailto:jsnitsel@redhat.com]
> >>>> 发送时间: 2019年12月20日 17:23
> >>>> 收件人: Jim,Yan <jimyan@baidu.com>
> >>>> 抄送: joro@8bytes.org; iommu@lists.linux-foundation.org;
> >>>> linux-kernel@vger.kernel.org
> >>>> 主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope
> >>>> mismatch
> >>>>
> >>>> On Fri Dec 20 19, jimyan wrote:
> >>>>> On a system with an Intel PCIe port configured as a nvme host
> >>>>> device, iommu initialization fails with
> >>>>>
> >>>>> DMAR: Device scope type does not match for 0000:80:00.0
> >>>>>
> >>>>> This is because the DMAR table reports this device as having scope
> >>>>> 2
> >>>>> (ACPI_DMAR_SCOPE_TYPE_BRIDGE):
> >>>>>
> >>>>
> >>>> Isn't that a problem to be fixed in the DMAR table then?
> >>>>
> >>>>> but the device has a type 0 PCI header:
> >>>>> 80:00.0 Class 0600: Device 8086:2020 (rev 06)
> >>>>> 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
> >>>>> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>>>> 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
> >>>>> 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
> >>>>>
> >>>>> VT-d works perfectly on this system, so there's no reason to bail
> >>>>> out on initialization due to this apparent scope mismatch. Add the
> >>>>> class
> >>>>> 0x600 ("PCI_CLASS_BRIDGE_HOST") as a heuristic for allowing DMAR
> >>>>> initialization for non-bridge PCI devices listed with scope bridge.
> >>>>>
> >>>>> Signed-off-by: jimyan <jimyan@baidu.com>
> >>>>> ---
> >>>>> drivers/iommu/dmar.c | 1 +
> >>>>> 1 file changed, 1 insertion(+)
> >>>>>
> >>>>> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index
> >>>>> eecd6a421667..9faf2f0e0237 100644
> >>>>> --- a/drivers/iommu/dmar.c
> >>>>> +++ b/drivers/iommu/dmar.c
> >>>>> @@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct
> >>>> dmar_pci_notify_info *info,
> >>>>> info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
> >>>>> (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE
> >> &&
> >>>>> (info->dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
> >>>>> + info->dev->class >> 8 != PCI_CLASS_BRIDGE_HOST &&
> >>>>> info->dev->class >> 8 != PCI_CLASS_BRIDGE_OTHER))) {
> >>>>> pr_warn("Device scope type does not match for %s\n",
> >>>>> pci_name(info->dev));
> >>>>> --
> >>>>> 2.11.0
> >>>>>
> >>>>> _______________________________________________
> >>>>> iommu mailing list
> >>>>> iommu@lists.linux-foundation.org
> >>>>> https://lists.linuxfoundation.org/mailman/listinfo/iommu
> >>>>>
> >>> Actually this patch is similar to the commit:
> >>> ffb2d1eb88c3("iommu/vt-d: Don't
> >> reject NTB devices due to scope mismatch"). Besides, modifying DMAR
> >> table need OEM update BIOS. It is hard to implement.
> >>>
> >>
> >> For both cases, a quirk flag seems to be more reasonable, so that
> >> unrelated devices will not be impacted.
> >>
> >> Best regards,
> >> baolu
> >
> > Hi Baolu,
> > Thanks for your advice. And I modify the patch as follow.
>
> I just posted a patch for both NTG and NVME cases. Can you please take a look?
> Does it work for you?
>
> Best regards,
> baolu
>
I have tested your patch. It does work for me. But I prefer my second version, it is more flexible, and may use for similar unknown devices.
> >
> > On a system with an Intel PCIe port configured as a nvme host device,
> iommu
> > initialization fails with
> >
> > DMAR: Device scope type does not match for 0000:80:00.0
> >
> > This is because the DMAR table reports this device as having scope 2
> > (ACPI_DMAR_SCOPE_TYPE_BRIDGE):
> >
> > but the device has a type 0 PCI header:
> > 80:00.0 Class 0600: Device 8086:2020 (rev 06)
> > 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00
> > 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00
> > 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00
> >
> > VT-d works perfectly on this system, so there's no reason to bail out
> > on initialization due to this apparent scope mismatch. Add the class
> > 0x06 ("PCI_BASE_CLASS_BRIDGE") as a heuristic for allowing DMAR
> > initialization for non-bridge PCI devices listed with scope bridge.
> >
> > Signed-off-by: jimyan <jimyan@baidu.com>
> >
> > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index
> > eecd6a421667..50c92eb23ee4 100644
> > --- a/drivers/iommu/dmar.c
> > +++ b/drivers/iommu/dmar.c
> > @@ -244,7 +244,7 @@ int dmar_insert_dev_scope(struct
> dmar_pci_notify_info *info,
> > info->dev->hdr_type !=
> PCI_HEADER_TYPE_NORMAL) ||
> > (scope->entry_type ==
> ACPI_DMAR_SCOPE_TYPE_BRIDGE &&
> > (info->dev->hdr_type ==
> PCI_HEADER_TYPE_NORMAL &&
> > - info->dev->class >> 8 !=
> PCI_CLASS_BRIDGE_OTHER))) {
> > + info->dev->class >> 16 !=
> > + PCI_BASE_CLASS_BRIDGE))) {
> > pr_warn("Device scope type does not match
> for %s\n",
> > pci_name(info->dev));
> > return -EINVAL;
> >
> >
> > Jim
> >
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-24 8:18 ` 答复: " Jim,Yan
@ 2019-12-24 11:26 ` Lu Baolu
2019-12-25 1:52 ` 答复: " Jim,Yan
0 siblings, 1 reply; 9+ messages in thread
From: Lu Baolu @ 2019-12-24 11:26 UTC (permalink / raw)
To: Jim,Yan, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
On 2019/12/24 16:18, Jim,Yan wrote:
>>>> For both cases, a quirk flag seems to be more reasonable, so that
>>>> unrelated devices will not be impacted.
>>>>
>>>> Best regards,
>>>> baolu
>>> Hi Baolu,
>>> Thanks for your advice. And I modify the patch as follow.
>> I just posted a patch for both NTG and NVME cases. Can you please take a look?
>> Does it work for you?
>>
>> Best regards,
>> baolu
>>
> I have tested your patch. It does work for me. But I prefer my second version, it is more flexible, and may use for similar unknown devices.
>
I didn't get your point. Do you mind explaining why it's more flexible?
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-24 11:26 ` Lu Baolu
@ 2019-12-25 1:52 ` Jim,Yan
2019-12-25 2:00 ` Lu Baolu
0 siblings, 1 reply; 9+ messages in thread
From: Jim,Yan @ 2019-12-25 1:52 UTC (permalink / raw)
To: Lu Baolu, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
> -----邮件原件-----
> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> 发送时间: 2019年12月24日 19:27
> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due
> to scope mismatch
>
> Hi,
>
> On 2019/12/24 16:18, Jim,Yan wrote:
> >>>> For both cases, a quirk flag seems to be more reasonable, so that
> >>>> unrelated devices will not be impacted.
> >>>>
> >>>> Best regards,
> >>>> baolu
> >>> Hi Baolu,
> >>> Thanks for your advice. And I modify the patch as follow.
> >> I just posted a patch for both NTG and NVME cases. Can you please take a
> look?
> >> Does it work for you?
> >>
> >> Best regards,
> >> baolu
> >>
> > I have tested your patch. It does work for me. But I prefer my second version,
> it is more flexible, and may use for similar unknown devices.
> >
>
> I didn't get your point. Do you mind explaining why it's more flexible?
>
> Best regards,
> Baolu
For example, an unknown device has a normal PCI header and bridge scope and a class of PCI_CLASS_BRIDGE_PCI.
These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.
Jim
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-25 1:52 ` 答复: " Jim,Yan
@ 2019-12-25 2:00 ` Lu Baolu
2019-12-25 2:05 ` 答复: " Jim,Yan
0 siblings, 1 reply; 9+ messages in thread
From: Lu Baolu @ 2019-12-25 2:00 UTC (permalink / raw)
To: Jim,Yan, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
On 2019/12/25 9:52, Jim,Yan wrote:
> Hi,
>
>> -----邮件原件-----
>> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
>> 发送时间: 2019年12月24日 19:27
>> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
>> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
>> 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due
>> to scope mismatch
>>
>> Hi,
>>
>> On 2019/12/24 16:18, Jim,Yan wrote:
>>>>>> For both cases, a quirk flag seems to be more reasonable, so that
>>>>>> unrelated devices will not be impacted.
>>>>>>
>>>>>> Best regards,
>>>>>> baolu
>>>>> Hi Baolu,
>>>>> Thanks for your advice. And I modify the patch as follow.
>>>> I just posted a patch for both NTG and NVME cases. Can you please take a
>> look?
>>>> Does it work for you?
>>>>
>>>> Best regards,
>>>> baolu
>>>>
>>> I have tested your patch. It does work for me. But I prefer my second version,
>> it is more flexible, and may use for similar unknown devices.
>>>
>>
>> I didn't get your point. Do you mind explaining why it's more flexible?
>>
>> Best regards,
>> Baolu
> For example, an unknown device has a normal PCI header and bridge scope and a class of PCI_CLASS_BRIDGE_PCI.
> These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.
This is not a common case. It's only for devices on the marketing and
hard for the VT-d users to get it fixed in the OEM firmware.
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-25 2:00 ` Lu Baolu
@ 2019-12-25 2:05 ` Jim,Yan
2019-12-25 2:37 ` Lu Baolu
0 siblings, 1 reply; 9+ messages in thread
From: Jim,Yan @ 2019-12-25 2:05 UTC (permalink / raw)
To: Lu Baolu, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
> -----邮件原件-----
> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> 发送时间: 2019年12月25日 10:01
> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme
> host due to scope mismatch
>
> Hi,
>
> On 2019/12/25 9:52, Jim,Yan wrote:
> > Hi,
> >
> >> -----邮件原件-----
> >> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> >> 发送时间: 2019年12月24日 19:27
> >> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar
> >> <jsnitsel@redhat.com>
> >> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> >> 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host
> due to
> >> scope mismatch
> >>
> >> Hi,
> >>
> >> On 2019/12/24 16:18, Jim,Yan wrote:
> >>>>>> For both cases, a quirk flag seems to be more reasonable, so that
> >>>>>> unrelated devices will not be impacted.
> >>>>>>
> >>>>>> Best regards,
> >>>>>> baolu
> >>>>> Hi Baolu,
> >>>>> Thanks for your advice. And I modify the patch as follow.
> >>>> I just posted a patch for both NTG and NVME cases. Can you please
> >>>> take a
> >> look?
> >>>> Does it work for you?
> >>>>
> >>>> Best regards,
> >>>> baolu
> >>>>
> >>> I have tested your patch. It does work for me. But I prefer my
> >>> second version,
> >> it is more flexible, and may use for similar unknown devices.
> >>>
> >>
> >> I didn't get your point. Do you mind explaining why it's more flexible?
> >>
> >> Best regards,
> >> Baolu
> > For example, an unknown device has a normal PCI header and bridge scope
> and a class of PCI_CLASS_BRIDGE_PCI.
> > These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.
>
> This is not a common case. It's only for devices on the marketing and hard for
> the VT-d users to get it fixed in the OEM firmware.
>
> Best regards,
> Baolu
Got it. Then I am OK with this patch. I have tested it yesterday. It does work for me.
Thanks.
Jim
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-25 2:05 ` 答复: " Jim,Yan
@ 2019-12-25 2:37 ` Lu Baolu
2019-12-25 2:40 ` 答复: " Jim,Yan
0 siblings, 1 reply; 9+ messages in thread
From: Lu Baolu @ 2019-12-25 2:37 UTC (permalink / raw)
To: Jim,Yan, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
On 12/25/19 10:05 AM, Jim,Yan wrote:
> Hi,
>
>> -----邮件原件-----
>> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
>> 发送时间: 2019年12月25日 10:01
>> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
>> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
>> 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme
>> host due to scope mismatch
>>
>> Hi,
>>
>> On 2019/12/25 9:52, Jim,Yan wrote:
>>> Hi,
>>>
>>>> -----邮件原件-----
>>>> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
>>>> 发送时间: 2019年12月24日 19:27
>>>> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar
>>>> <jsnitsel@redhat.com>
>>>> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
>>>> 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host
>> due to
>>>> scope mismatch
>>>>
>>>> Hi,
>>>>
>>>> On 2019/12/24 16:18, Jim,Yan wrote:
>>>>>>>> For both cases, a quirk flag seems to be more reasonable, so that
>>>>>>>> unrelated devices will not be impacted.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> baolu
>>>>>>> Hi Baolu,
>>>>>>> Thanks for your advice. And I modify the patch as follow.
>>>>>> I just posted a patch for both NTG and NVME cases. Can you please
>>>>>> take a
>>>> look?
>>>>>> Does it work for you?
>>>>>>
>>>>>> Best regards,
>>>>>> baolu
>>>>>>
>>>>> I have tested your patch. It does work for me. But I prefer my
>>>>> second version,
>>>> it is more flexible, and may use for similar unknown devices.
>>>>>
>>>>
>>>> I didn't get your point. Do you mind explaining why it's more flexible?
>>>>
>>>> Best regards,
>>>> Baolu
>>> For example, an unknown device has a normal PCI header and bridge scope
>> and a class of PCI_CLASS_BRIDGE_PCI.
>>> These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.
>>
>> This is not a common case. It's only for devices on the marketing and hard for
>> the VT-d users to get it fixed in the OEM firmware.
>>
>> Best regards,
>> Baolu
>
> Got it. Then I am OK with this patch. I have tested it yesterday. It does work for me.
> Thanks.
Can I add your Tested-by?
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* 答复: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch
2019-12-25 2:37 ` Lu Baolu
@ 2019-12-25 2:40 ` Jim,Yan
0 siblings, 0 replies; 9+ messages in thread
From: Jim,Yan @ 2019-12-25 2:40 UTC (permalink / raw)
To: Lu Baolu, Jerry Snitselaar; +Cc: iommu, linux-kernel
Hi,
> -----邮件原件-----
> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> 发送时间: 2019年12月25日 10:38
> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar <jsnitsel@redhat.com>
> 抄送: baolu.lu@linux.intel.com; iommu@lists.linux-foundation.org;
> linux-kernel@vger.kernel.org
> 主题: Re: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject
> nvme host due to scope mismatch
>
> Hi,
>
> On 12/25/19 10:05 AM, Jim,Yan wrote:
> > Hi,
> >
> >> -----邮件原件-----
> >> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> >> 发送时间: 2019年12月25日 10:01
> >> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar
> >> <jsnitsel@redhat.com>
> >> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> >> 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject
> nvme host
> >> due to scope mismatch
> >>
> >> Hi,
> >>
> >> On 2019/12/25 9:52, Jim,Yan wrote:
> >>> Hi,
> >>>
> >>>> -----邮件原件-----
> >>>> 发件人: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> >>>> 发送时间: 2019年12月24日 19:27
> >>>> 收件人: Jim,Yan <jimyan@baidu.com>; Jerry Snitselaar
> >>>> <jsnitsel@redhat.com>
> >>>> 抄送: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> >>>> 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme
> host
> >> due to
> >>>> scope mismatch
> >>>>
> >>>> Hi,
> >>>>
> >>>> On 2019/12/24 16:18, Jim,Yan wrote:
> >>>>>>>> For both cases, a quirk flag seems to be more reasonable, so
> >>>>>>>> that unrelated devices will not be impacted.
> >>>>>>>>
> >>>>>>>> Best regards,
> >>>>>>>> baolu
> >>>>>>> Hi Baolu,
> >>>>>>> Thanks for your advice. And I modify the patch as follow.
> >>>>>> I just posted a patch for both NTG and NVME cases. Can you please
> >>>>>> take a
> >>>> look?
> >>>>>> Does it work for you?
> >>>>>>
> >>>>>> Best regards,
> >>>>>> baolu
> >>>>>>
> >>>>> I have tested your patch. It does work for me. But I prefer my
> >>>>> second version,
> >>>> it is more flexible, and may use for similar unknown devices.
> >>>>>
> >>>>
> >>>> I didn't get your point. Do you mind explaining why it's more flexible?
> >>>>
> >>>> Best regards,
> >>>> Baolu
> >>> For example, an unknown device has a normal PCI header and bridge
> >>> scope
> >> and a class of PCI_CLASS_BRIDGE_PCI.
> >>> These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.
> >>
> >> This is not a common case. It's only for devices on the marketing and
> >> hard for the VT-d users to get it fixed in the OEM firmware.
> >>
> >> Best regards,
> >> Baolu
> >
> > Got it. Then I am OK with this patch. I have tested it yesterday. It does work
> for me.
> > Thanks.
>
> Can I add your Tested-by?
>
> Best regards,
> Baolu
Yes. Of course.
Best regards,
Jim
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-25 2:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24 3:24 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch Jim,Yan
2019-12-24 6:27 ` Lu Baolu
2019-12-24 8:18 ` 答复: " Jim,Yan
2019-12-24 11:26 ` Lu Baolu
2019-12-25 1:52 ` 答复: " Jim,Yan
2019-12-25 2:00 ` Lu Baolu
2019-12-25 2:05 ` 答复: " Jim,Yan
2019-12-25 2:37 ` Lu Baolu
2019-12-25 2:40 ` 答复: " Jim,Yan
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).