Skip to contentSkip to conversation

iommu/vt-d: Don't reject nvme host due to scope mismatch

PATCH Jim,Yan 2 participants 9 messages Dec 24, 2019 – Dec 25, 2019 IOMMU

lore
Share & tools
lore

Jim,Yan

author
#0 lore raw
Quoted 77 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月23日 21:05
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 39 lines · Jim,Yan
Quoted 39 lines

-----邮件原件-----
发件人: Jerry Snitselaar [mailto:[email protected]] 发送时间: 2019年12月20日 17:23
收件人: Jim,Yan <[email protected]>
抄送: [email protected]; [email protected]; [email protected]
主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Quoted 8 lines · jimyan

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?

Quoted 18 lines

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.

---
drivers/iommu/dmar.c | 1 +

1 file changed, 1 insertion(+)
Quoted 8 lines
Quoted 8 lines

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct

Quoted 5 lines
drivers/iommu/dmar.c index renamed from drivers/iommu/dmar.c +0 -0

eecd6a421667..9faf2f0e0237 100644

drivers/iommu/dmar.c +0 -0
@@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct

dmar_pci_notify_info *info,

Quoted 2 lines
drivers/iommu/dmar.c +0 -0
 		     info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
 		    (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE

&&

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/iommu/dmar.c +1 -1
 		     (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

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

_______________________________________________
iommu mailing list
[email protected]
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.

Quoted 1 line
Quoted 5 lines

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.

drivers/iommu/dmar.c +1 -1
index eecd6a421667..50c92eb23ee4 100644
@@ -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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

#1 lore raw

Hi Jim,

Quoted 77 lines · Jim,Yan
Quoted 77 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月23日 21:05
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 39 lines · Jim,Yan
Quoted 39 lines

-----邮件原件-----
发件人: Jerry Snitselaar [mailto:[email protected]] 发送时间: 2019年12月20日 17:23
收件人: Jim,Yan <[email protected]>
抄送: [email protected]; [email protected]; [email protected]
主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Quoted 8 lines · jimyan

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?

Quoted 18 lines

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.

---
drivers/iommu/dmar.c | 1 +

1 file changed, 1 insertion(+)
Quoted 8 lines
Quoted 8 lines

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct

Quoted 5 lines
drivers/iommu/dmar.c index renamed from drivers/iommu/dmar.c +0 -0

eecd6a421667..9faf2f0e0237 100644

drivers/iommu/dmar.c +0 -0
@@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct

dmar_pci_notify_info *info,

Quoted 2 lines
drivers/iommu/dmar.c +0 -0
 		     info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
 		    (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE

&&

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/iommu/dmar.c +1 -1
 		     (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

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

_______________________________________________
iommu mailing list
[email protected]
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.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

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

Quoted 40 lines

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.

drivers/iommu/dmar.c +1 -1
index eecd6a421667..50c92eb23ee4 100644
@@ -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

author
#2 lore raw

Hi Baolu,

Quoted 97 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 14:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi Jim,

Quoted 86 lines · Jim,Yan
Quoted 85 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月23日 21:05
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]>
抄送: [email protected]; [email protected] 主题: Re: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 40 lines · Jim,Yan
Quoted 40 lines

-----邮件原件-----
发件人: Jerry Snitselaar [mailto:[email protected]] 发送时间: 2019年12月20日 17:23
收件人: Jim,Yan <[email protected]>
抄送: [email protected]; [email protected]; [email protected]
主题: Re: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Quoted 9 lines · jimyan

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?

Quoted 18 lines

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.

---
drivers/iommu/dmar.c | 1 +

1 file changed, 1 insertion(+)
Quoted 8 lines
Quoted 8 lines

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct

Quoted 5 lines
drivers/iommu/dmar.c index renamed from drivers/iommu/dmar.c +0 -0

eecd6a421667..9faf2f0e0237 100644

drivers/iommu/dmar.c +0 -0
@@ -244,6 +244,7 @@ int dmar_insert_dev_scope(struct

dmar_pci_notify_info *info,

Quoted 2 lines
drivers/iommu/dmar.c +0 -0
 		     info->dev->hdr_type != PCI_HEADER_TYPE_NORMAL) ||
 		    (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE

&&

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/iommu/dmar.c +1 -1
 		     (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

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

_______________________________________________
iommu mailing list
[email protected]
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.

Quoted 1 line

For both cases, a quirk flag seems to be more reasonable, so that unrelated devices will not be impacted.

Best regards,
baolu

Quoted 9 lines
Quoted 2 lines

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.

Quoted 48 lines
Quoted 2 lines

On a system with an Intel PCIe port configured as a nvme host device,

iommu

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct

Quoted 26 lines

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.

drivers/iommu/dmar.c index renamed from drivers/iommu/dmar.c +0 -0

eecd6a421667..50c92eb23ee4 100644

drivers/iommu/dmar.c +0 -0
@@ -244,7 +244,7 @@ int dmar_insert_dev_scope(struct

dmar_pci_notify_info *info,

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct · line 244

Quoted 1 line
drivers/iommu/dmar.c +0 -0
                      info->dev->hdr_type !=

PCI_HEADER_TYPE_NORMAL) ||

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct · line 245

Quoted 1 line
drivers/iommu/dmar.c +0 -0
                     (scope->entry_type ==

ACPI_DMAR_SCOPE_TYPE_BRIDGE &&

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct · line 246

Quoted 1 line
drivers/iommu/dmar.c +0 -0
                      (info->dev->hdr_type ==

PCI_HEADER_TYPE_NORMAL &&

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct · line 247

Quoted 1 line
drivers/iommu/dmar.c +0 -1
-                     info->dev->class >> 8 !=

PCI_CLASS_BRIDGE_OTHER))) {

drivers/iommu/dmar.c int dmar_insert_dev_scope(struct · line 249

Quoted 3 lines
drivers/iommu/dmar.c +2 -0
+                     info->dev->class >> 16 !=
+ PCI_BASE_CLASS_BRIDGE))) {
                         pr_warn("Device scope type does not match

for %s\n",

Quoted 6 lines
drivers/iommu/dmar.c +0 -0
                                 pci_name(info->dev));
                         return -EINVAL;

Jim

#3 lore raw

Hi,

Quoted 7 lines · Jim,Yan
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

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.

Quoted 8 lines
Quoted 6 lines

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

author
#4 lore raw

Hi,

Quoted 25 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 19:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 8 lines · Jim,Yan
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

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?

Quoted 5 lines
Quoted 5 lines

Does it work for you?

Best regards,
baolu

Quoted 8 lines
Quoted 1 line

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.

Quoted 1 line

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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

#5 lore raw

Hi,

Quoted 31 lines · Jim,Yan

Hi,

Quoted 29 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 19:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 8 lines · Jim,Yan
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

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?

Quoted 6 lines
Quoted 5 lines

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.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

author
#6 lore raw

Hi,

Quoted 51 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月25日 10:01
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 9 lines · Jim,Yan

Hi,

Quoted 7 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 19:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]>
抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host

due to

Quoted 22 lines
Quoted 22 lines

scope mismatch

Hi,

Quoted 9 lines · Jim,Yan
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

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?

Quoted 7 lines
Quoted 5 lines

Does it work for you?

Best regards,
baolu

I have tested your patch. It does work for me. But I prefer my second version,

Quoted 8 lines
Quoted 7 lines

it is more flexible, and may use for similar unknown devices.

Quoted 1 line

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

Quoted 8 lines

and a class of PCI_CLASS_BRIDGE_PCI.

Quoted 1 line

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

#7 lore raw

Hi,

Quoted 56 lines · Jim,Yan

Hi,

Quoted 54 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月25日 10:01
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 9 lines · Jim,Yan

Hi,

Quoted 7 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 19:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]>
抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host

due to

Quoted 22 lines
Quoted 22 lines

scope mismatch

Hi,

Quoted 9 lines · Jim,Yan
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

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?

Quoted 7 lines
Quoted 5 lines

Does it work for you?

Best regards,
baolu

I have tested your patch. It does work for me. But I prefer my second version,

Quoted 8 lines
Quoted 7 lines

it is more flexible, and may use for similar unknown devices.

Quoted 1 line

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.

Quoted 1 line

These devices do have a class of PCI_BASE_CLASS_BRIDGE in common.

Quoted 8 lines
Quoted 5 lines

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

author
#8 lore raw

Hi,

Quoted 78 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月25日 10:38
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]> 抄送: [email protected]; [email protected]; [email protected]
主题: Re: 答复: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme host due to scope mismatch

Hi,

Quoted 9 lines · Jim,Yan

Hi,

Quoted 7 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月25日 10:01
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]>
抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject

nvme host

Quoted 7 lines
Quoted 7 lines

due to scope mismatch

Hi,

Quoted 2 lines · Jim,Yan

Hi,

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----邮件原件-----
发件人: Lu Baolu [mailto:[email protected]]
发送时间: 2019年12月24日 19:27
收件人: Jim,Yan <[email protected]>; Jerry Snitselaar <[email protected]>
抄送: [email protected]; [email protected] 主题: Re: 答复: 答复: 答复: [PATCH] iommu/vt-d: Don't reject nvme

host

Quoted 41 lines
Quoted 40 lines

due to

Quoted 25 lines
Quoted 25 lines

scope mismatch

Hi,

Quoted 9 lines · Jim,Yan
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

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?

Quoted 7 lines
Quoted 5 lines

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.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

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.

Quoted 1 line

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

Quoted 8 lines
Quoted 1 line

Got it. Then I am OK with this patch. I have tested it yesterday. It does work

for me.

Quoted 1 line

Thanks.

Can I add your Tested-by?

Best regards,
Baolu

Yes. Of course.

Best regards,
Jim
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu