-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[linux-6.6.y] iommu/vt-d: Add support for detecting ACPI namespace device in RMRR #261
[linux-6.6.y] iommu/vt-d: Add support for detecting ACPI namespace device in RMRR #261
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @leoliu-oc. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
drivers/iommu/intel/iommu.c
Outdated
|
||
ret = iommu_probe_device(dev); | ||
|
||
iommu = device_lookup_iommu(dev, &bus, &devfn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里有报错 是不是使用了没定义的 device_lookup_iommu 函数?
drivers/iommu/intel/iommu.c: In function ‘acpi_rmrr_andd_probe’:
drivers/iommu/intel/iommu.c:3766:17: error: implicit declaration of function ‘device_lookup_iommu’; did you mean ‘device_to_iommu’? [-Werror=implicit-function-declaration]
3766 | iommu = device_lookup_iommu(dev, &bus, &devfn);
| ^~~~~~~~~~~~~~~~~~~
| device_to_iommu
drivers/iommu/intel/iommu.c:3766:15: error: assignment to ‘struct intel_iommu *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
3766 | iommu = device_lookup_iommu(dev, &bus, &devfn);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,这边测试时使用的是主线LTS-6.6分支源码,在最新主线源码中,device_to_iommu更新为了device_lookup_iommu。这边会修正后再提交。
zhaoxin inclusion category: feature CVE: NA ----------------- As below, ZX-200 xHCI mcu is a RMRR ANDD device in some case. [060h 0096 2] Subtable Type : 0001 [Reserved Memory Region [062h 0098 2] Length : 0020 [064h 0100 2] Reserved : 0000 [066h 0102 2] PCI Segment Number : 0000 [068h 0104 8] Base Address : 00000000B5DA5000 [070h 0112 8] End Address (limit) : 00000000B5DDDFFF [078h 0120 1] Device Scope Type : 05 [Namespace Device] [079h 0121 1] Entry Length : 08 [07Ah 0122 2] Reserved : 0000 [07Ch 0124 1] Enumeration ID : 02 [07Dh 0125 1] PCI Bus Number : 09 [07Eh 0126 2] PCI Path : 12,00 iommu driver cannot find this device and build identity map for the RMRR region, DMAR faults would occur for xHCI controller. Add func dmar_acpi_bus_add_dev to find the RMRR ANDD device. Add func acpi_rmrr_andd_probe to build identity map for the RMRR region into the domain of the correspanding xHCI controller. Add func iova_reserve_domain_addr to keep away from RMRR region when using dma iova. Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com>
86ac1b1
to
55b5baf
Compare
/ok-to-test |
deepin pr auto review关键摘要:
是否建议立即修改: |
zhaoxin inclusion
category: feature
CVE: NA
As below, ZX-200 xHCI mcu is a RMRR ANDD device in some case.
[060h 0096 2] Subtable Type : 0001 [Reserved Memory Region
[062h 0098 2] Length : 0020
[064h 0100 2] Reserved : 0000
[066h 0102 2] PCI Segment Number : 0000
[068h 0104 8] Base Address : 00000000B5DA5000
[070h 0112 8] End Address (limit) : 00000000B5DDDFFF
[078h 0120 1] Device Scope Type : 05 [Namespace Device]
[079h 0121 1] Entry Length : 08
[07Ah 0122 2] Reserved : 0000
[07Ch 0124 1] Enumeration ID : 02
[07Dh 0125 1] PCI Bus Number : 09
[07Eh 0126 2] PCI Path : 12,00
iommu driver cannot find this device and build identity map for the RMRR region, DMAR faults would occur for xHCI controller.
Add func dmar_acpi_bus_add_dev to find the RMRR ANDD device.
Add func acpi_rmrr_andd_probe to build identity map for the RMRR region into the domain of the correspanding xHCI controller.
Add func iova_reserve_domain_addr to keep away from RMRR region when using dma iova.