Bug 1732045

Summary: kernel v5.2 and up; please add kernel dma fix from upstream
Product: [Fedora] Fedora Reporter: awf_ul <awf_ul>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: airlied, bskeggs, hdegoede, ichavero, itamar, jarodwilson, jeremy, jglisse, john.j5live, jonathan, josef, kernel-maint, labbott, linville, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-5.1.20-300.fc30 kernel-5.1.20-200.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-30 01:15:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description awf_ul 2019-07-22 14:20:28 UTC
A kernel regression appeared in v4.20-rc4 regarding a specific form of DMA for PCI (PCIe?) devices. It has been, or will be, patched in v5.31 upstream I believe; I presented the bisect to iommu@linuxfoundation,org, and after their great assistance used the resulting patch against v5.2 successfully and corrected the issues with my Fedora system.

I am not sure of plans to bring it back to v5.x, but ask that you do, especially during this Fedora v5.2 test week.

I have included the header so you can retrieve it from the canonical source. I have more info if needed.

Thank You.


Reviewed-by: Robin Murphy <robin.murphy>

> Fixes: 55897af63091("dma-direct: merge swiotlb_dma_ops into the dma_direct code")
> Signed-off-by: Fugang Duan <fugang.duan>
> ---
>   kernel/dma/direct.c | 18 +++++++++++-------
>   1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
> index b90e1ae..0e87f86 100644
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -242,12 +242,14 @@ void dma_direct_sync_sg_for_device(struct device *dev,
>       int i;
>         for_each_sg(sgl, sg, nents, i) {
> -        if (unlikely(is_swiotlb_buffer(sg_phys(sg))))

<further content deleted>

Comment 1 Laura Abbott 2019-07-22 14:23:58 UTC
The header isn't helpful here since I don't actually know where to track down the canonical source from just that snippet. It has the fixes tag so it would get picked up automatically eventually. Please provide a pointer to the full patch so we can make sure that gets included sooner.

Comment 2 awf_ul 2019-07-22 15:08:26 UTC
Sorry; I left out some info - here is how to find it...

I went to iommu, select this month, typed in Fugang (the author at NXP).

https://lists.linuxfoundation.org/pipermail/iommu/2019-July/037428.html


Here is the commit as of two days ago, combined w/other fixes...

https://github.com/torvalds/linux/commit/ac60602a6d8f6830dee89f4b87ee005f62eb7171

commit ac60602a6d8f6830dee89f4b87ee005f62eb7171

Comment 3 Fedora Update System 2019-07-27 22:16:07 UTC
FEDORA-2019-3dbfaeac73 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-3dbfaeac73

Comment 4 Fedora Update System 2019-07-29 01:14:14 UTC
kernel-5.1.20-200.fc29, kernel-headers-5.1.20-200.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-3dbfaeac73

Comment 5 Fedora Update System 2019-07-29 04:41:42 UTC
kernel-5.1.20-300.fc30, kernel-headers-5.1.20-300.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-167e7fc29a

Comment 6 Fedora Update System 2019-07-30 01:15:00 UTC
kernel-5.1.20-300.fc30, kernel-headers-5.1.20-300.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2019-07-31 01:48:40 UTC
kernel-5.1.20-200.fc29, kernel-headers-5.1.20-200.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.