** Description changed:
[IMPACT]
When iommu is enabled crashdump fails to be collected because crash-kernel crashes
with following trace [1].
Commits that address it :
1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
96d170f3b1a6 iommu/vt-d: Remove deferred_attach_domain()
a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_mapping()
034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
1d4615978f52 iommu/vt-d: Add attach_deferred() helper
1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
[TEST CASE]
Install a 5.4 kernel, add intel_iommu=on and iommu=pt to grub cmdline
and trigger a crash.
The crash kernel that boots will crash with trace [1].
[REGRESSION POTENTIAL]
+ 1) 1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
+ Refactors find_domain() into two helpers: 1) find_domain()
+ only returns the domain in use; 2) deferred_attach_domain() does
+ the deferred domain attachment if required and return the domain
+ in use.
+
+ 2) 1d4615978f52 iommu/vt-d: Add attach_deferred() helper
+ Add helper function to check if a device's attach process is deffered.
+ Before this commit, this check was done with "dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO".
+ This commit wraps it into a function.
+ Fixes (1).
+
+ 3) 034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
+ Takes the code that does the deffered attachment from deferred_attach_domain() function
+ and places it in new do_deferred_attach() function.
+ Fixes (1).
+
+ 4) a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_mapping()
+ This one actually fixes the bug.
+ Attachement of devive needs to happen before checking if device is identity mapped.
+ Fixes (1).
+
+ 5) 96d170f3b1a6 iommu/vt-d: Remove deferred_attach_domain()
+ Code cleanup, removes deferred_attach_domain() which now is just a wrapper around
+ find_domain and calls directly find_domain from caller sites.
+ Fixes (1).
+
+ 6) 1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
+ Code cleanup.
+ Fixes (1).
+
+ Commits 2,3,5, and 6 are code movements/cleanups so little regression potential.
+ Commit 1 is the intial code refactroring ( the rest of commits fix it) and commit
+ 3 fixes the bug.
+
+ So far testing has not revealed any regression. Any possible regression will regard
+ device deffered attachment.
+
[OTHER]
Kernel affected 5.4.
[1] https://pastebin.ubuntu.com/p/FNxTxjg3DV/
--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/1922738
Title:
5.4 kernel: when iommu is on crashdump fails
Status in linux package in Ubuntu:
Incomplete
Status in linux source package in Focal:
Confirmed
Bug description:
[IMPACT]
When iommu is enabled crashdump fails to be collected because crash-kernel crashes
with following trace [1].
Commits that address it :
1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
96d170f3b1a6 iommu/vt-d: Remove deferred_attach_domain()
a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_mapping()
034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
1d4615978f52 iommu/vt-d: Add attach_deferred() helper
1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
[TEST CASE]
Install a 5.4 kernel, add intel_iommu=on and iommu=pt to grub cmdline
and trigger a crash.
The crash kernel that boots will crash with trace [1].
[REGRESSION POTENTIAL]
1) 1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
Refactors find_domain() into two helpers: 1) find_domain()
only returns the domain in use; 2) deferred_attach_domain() does
the deferred domain attachment if required and return the domain
in use.
2) 1d4615978f52 iommu/vt-d: Add attach_deferred() helper
Add helper function to check if a device's attach process is deffered.
Before this commit, this check was done with "dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO".
This commit wraps it into a function.
Fixes (1).
3) 034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
Takes the code that does the deffered attachment from deferred_attach_domain() function
and places it in new do_deferred_attach() function.
Fixes (1).
4) a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_mapping()
This one actually fixes the bug.
Attachement of devive needs to happen before checking if device is identity mapped.
Fixes (1).
5) 96d170f3b1a6 iommu/vt-d: Remove deferred_attach_domain()
Code cleanup, removes deferred_attach_domain() which now is just a wrapper around
find_domain and calls directly find_domain from caller sites.
Fixes (1).
6) 1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
Code cleanup.
Fixes (1).
Commits 2,3,5, and 6 are code movements/cleanups so little regression potential.
Commit 1 is the intial code refactroring ( the rest of commits fix it) and commit
3 fixes the bug.
So far testing has not revealed any regression. Any possible regression will regard
device deffered attachment.
[OTHER]
Kernel affected 5.4.
[1] https://pastebin.ubuntu.com/p/FNxTxjg3DV/
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1922738/+subscriptions
Комментариев нет:
Отправить комментарий