lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200504052958.GH1375924@vkoul-mobl>
Date:   Mon, 4 May 2020 10:59:58 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Alan Mikhak <alan.mikhak@...ive.com>
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-pci@...r.kernel.org, gustavo.pimentel@...opsys.com,
        dan.j.williams@...el.com, kishon@...com, paul.walmsley@...ive.com
Subject: Re: [PATCH][next] dmaengine: dw-edma: support local dma device
 transfer semantics

On 28-04-20, 18:10, Alan Mikhak wrote:
> From: Alan Mikhak <alan.mikhak@...ive.com>
> 
> Modify dw_edma_device_transfer() to also support the semantics of dma
> device transfer for additional use cases involving pcitest utility as a
> local initiator.
> 
> For its original use case, dw-edma supported the semantics of dma device
> transfer from the perspective of a remote initiator who is located across
> the PCIe bus from dma channel hardware.
> 
> To a remote initiator, DMA_DEV_TO_MEM means using a remote dma WRITE
> channel to transfer from remote memory to local memory. A WRITE channel
> would be employed on the remote device in order to move the contents of
> remote memory to the bus destined for local memory.
> 
> To a remote initiator, DMA_MEM_TO_DEV means using a remote dma READ
> channel to transfer from local memory to remote memory. A READ channel
> would be employed on the remote device in order to move the contents of
> local memory to the bus destined for remote memory.
> 
> >From the perspective of a local dma initiator who is co-located on the
> same side of the PCIe bus as the dma channel hardware, the semantics of
> dma device transfer are flipped.
> 
> To a local initiator, DMA_DEV_TO_MEM means using a local dma READ channel
> to transfer from remote memory to local memory. A READ channel would be
> employed on the local device in order to move the contents of remote
> memory to the bus destined for local memory.
> 
> To a local initiator, DMA_MEM_TO_DEV means using a local dma WRITE channel
> to transfer from local memory to remote memory. A WRITE channel would be
> employed on the local device in order to move the contents of local memory
> to the bus destined for remote memory.
> 
> To support local dma initiators, dw_edma_device_transfer() is modified to
> now examine the direction field of struct dma_slave_config for the channel
> which initiators can configure by calling dmaengine_slave_config().
> 
> If direction is configured as either DMA_DEV_TO_MEM or DMA_MEM_TO_DEV,
> local initiator semantics are used. If direction is a value other than
> DMA_DEV_TO_MEM nor DMA_MEM_TO_DEV, then remote initiator semantics are
> used. This should maintain backward compatibility with the original use
> case of dw-edma.
> 
> The dw-edma-test utility is an example of a remote initiator. From reading
> its patch, dw-edma-test does not specifically set the direction field of
> struct dma_slave_config. Since dw_edma_device_transfer() also does not
> check the direction field of struct dma_slave_config, it seems safe to use
> this convention in dw-edma to support both local and remote initiator
> semantics.

Applied, thanks

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ