Re: [PATCH v11 8/8] dmaengine/idxd: Re-enable kernel workqueue under DMA API
From: Jason Gunthorpe
Date: Wed Aug 02 2023 - 10:51:35 EST
On Mon, Jul 24, 2023 at 03:25:38PM -0700, Jacob Pan wrote:
> Kernel workqueues were disabled due to flawed use of kernel VA and SVA
> API. Now that we have the support for attaching PASID to the device's
> default domain and the ability to reserve global PASIDs from SVA APIs,
> we can re-enable the kernel work queues and use them under DMA API.
>
> We also use non-privileged access for in-kernel DMA to be consistent
> with the IOMMU settings. Consequently, interrupt for user privilege is
> enabled for work completion IRQs.
>
> Link:https://lore.kernel.org/linux-iommu/20210511194726.GP1002214@xxxxxxxxxx/
> Tested-by: Tony Zhu <tony.zhu@xxxxxxxxx>
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> Reviewed-by: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Acked-by: Vinod Koul <vkoul@xxxxxxxxxx>
> Signed-off-by: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx>
> ---
> v9: Set user IRQ enable when device is enabled for system PASID
> ---
> drivers/dma/idxd/device.c | 39 ++++++++++------------------
> drivers/dma/idxd/dma.c | 5 ++--
> drivers/dma/idxd/idxd.h | 9 +++++++
> drivers/dma/idxd/init.c | 54 ++++++++++++++++++++++++++++++++++++---
> drivers/dma/idxd/sysfs.c | 7 -----
> 5 files changed, 76 insertions(+), 38 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason