Displaying 20 results from an estimated 317 matches for "dma_addrs".
Did you mean:
dma_addr
2024 Mar 06
1
[PATCH v3] nouveau/dmem: handle kcalloc() allocation failure
The kcalloc() in nouveau_dmem_evict_chunk() will return null if
the physical memory has run out. As a result, if we dereference
src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs
will happen.
Moreover, the GPU is going away. If the kcalloc() fails, we could not
evict all pages mapping a chunk. So this patch adds a __GFP_NOFAIL
flag in kcalloc().
Finally, as there is no need to have physically contiguous memory,
this patch switches kcallo...
2019 Aug 07
4
[PATCH] nouveau/hmm: map pages after migration
...static unsigned long nouveau_dmem_migrate_copy_one(struct nouveau_drm *drm,
out_free_page:
nouveau_dmem_page_free_locked(drm, dpage);
out:
+ *pfn = NVIF_VMM_PFNMAP_V0_NONE;
return 0;
}
static void nouveau_dmem_migrate_chunk(struct migrate_vma *args,
- struct nouveau_drm *drm, dma_addr_t *dma_addrs)
+ struct nouveau_drm *drm, dma_addr_t *dma_addrs, u64 *pfns)
{
struct nouveau_fence *fence;
unsigned long addr = args->start, nr_dma = 0, i;
for (i = 0; addr < args->end; i++) {
args->dst[i] = nouveau_dmem_migrate_copy_one(drm, args->vma,
- addr, args->src[i], &am...
2019 Jul 29
0
[PATCH 6/9] nouveau: simplify nouveau_dmem_migrate_vma
...IZE, DMA_BIDIRECTIONAL);
+out_free_page:
+ nouveau_dmem_page_free_locked(drm, dpage);
+out:
+ return 0;
}
-static void
-nouveau_dmem_migrate_finalize_and_map(struct nouveau_migrate *migrate)
+static void nouveau_dmem_migrate_chunk(struct migrate_vma *args,
+ struct nouveau_drm *drm, dma_addr_t *dma_addrs)
{
- struct nouveau_drm *drm = migrate->drm;
+ struct nouveau_fence *fence;
+ unsigned long addr = args->start, nr_dma = 0, i;
+
+ for (i = 0; addr < args->end; i++) {
+ args->dst[i] = nouveau_dmem_migrate_copy_one(drm, args->vma,
+ addr, args->src[i], &dma_addrs[nr_dm...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
On Thu, 23 May 2019 18:22:03 +0200
Michael Mueller <mimu at linux.ibm.com> wrote:
> From: Halil Pasic <pasic at linux.ibm.com>
>
> To support protected virtualization cio will need to make sure the
> memory used for communication with the hypervisor is DMA memory.
>
> Let us introduce one global cio, and some tools for pools seated
"one global pool for
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
On Thu, 23 May 2019 18:22:03 +0200
Michael Mueller <mimu at linux.ibm.com> wrote:
> From: Halil Pasic <pasic at linux.ibm.com>
>
> To support protected virtualization cio will need to make sure the
> memory used for communication with the hypervisor is DMA memory.
>
> Let us introduce one global cio, and some tools for pools seated
"one global pool for
2008 Dec 22
17
[PATCH 0 of 9] swiotlb: use phys_addr_t for pages
Hi all,
Here''s a work in progress series whcih does a partial revert of the
previous swiotlb changes, and does a partial replacement with Becky
Bruce''s series.
The most important difference is Becky''s use of phys_addr_t rather
than page+offset to represent arbitrary pages. This turns out to be
simpler.
I didn''t replicate the map_single_page changes, since
2023 May 19
1
[PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On Fri, May 19, 2023 at 01:49:46PM +0100, Andrew Cooper wrote:
> > The alternative would be to finally merge swiotlb-xen into swiotlb, in
> > which case we might be able to do this later. Let me see what I can
> > do there.
>
> If that is an option, it would be great to reduce the special-cashing.
I think it's doable, and I've been wanting it for a while. I just
2019 Aug 13
0
[PATCH] nouveau/hmm: map pages after migration
...y_one(struct nouveau_drm *drm,
> out_free_page:
> nouveau_dmem_page_free_locked(drm, dpage);
> out:
> + *pfn = NVIF_VMM_PFNMAP_V0_NONE;
> return 0;
> }
>
> static void nouveau_dmem_migrate_chunk(struct migrate_vma *args,
> - struct nouveau_drm *drm, dma_addr_t *dma_addrs)
> + struct nouveau_drm *drm, dma_addr_t *dma_addrs, u64 *pfns)
> {
> struct nouveau_fence *fence;
> unsigned long addr = args->start, nr_dma = 0, i;
>
> for (i = 0; addr < args->end; i++) {
> args->dst[i] = nouveau_dmem_migrate_copy_one(drm, args->v...
2024 Mar 08
0
[PATCH v3] nouveau/dmem: handle kcalloc() allocation failure
On 3/6/24 06:01, Duoming Zhou wrote:
> The kcalloc() in nouveau_dmem_evict_chunk() will return null if
> the physical memory has run out. As a result, if we dereference
> src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs
> will happen.
>
> Moreover, the GPU is going away. If the kcalloc() fails, we could not
> evict all pages mapping a chunk. So this patch adds a __GFP_NOFAIL
> flag in kcalloc().
>
> Finally, as there is no need to have physically contiguous...
2024 Mar 03
1
[PATCH] nouveau/dmem: handle kcalloc() allocation failure
The kcalloc() in nouveau_dmem_evict_chunk() will return null if
the physical memory has run out. As a result, if we dereference
src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs
will happen.
This patch uses stack variables to replace the kcalloc().
Fixes: 249881232e14 ("nouveau/dmem: evict device private memory during release")
Signed-off-by: Duoming Zhou <duoming at zju.edu.cn>
---
drivers/gpu/drm/nouveau/nouveau_dmem....
2020 Sep 15
0
[PATCH 06/18] lib82596: move DMA allocation into the callers of i82596_probe
This allows us to get rid of the LIB82596_DMA_ATTR defined and prepare
for untangling the coherent vs non-coherent DMA allocation API.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/net/ethernet/i825xx/lasi_82596.c | 24 ++++++++++------
drivers/net/ethernet/i825xx/lib82596.c | 36 ++++++++----------------
drivers/net/ethernet/i825xx/sni_82596.c | 19 +++++++++----
3 files
2020 Aug 19
0
[PATCH 06/28] lib82596: move DMA allocation into the callers of i82596_probe
This allows us to get rid of the LIB82596_DMA_ATTR defined and prepare
for untangling the coherent vs non-coherent DMA allocation API.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/net/ethernet/i825xx/lasi_82596.c | 24 ++++++++++------
drivers/net/ethernet/i825xx/lib82596.c | 36 ++++++++----------------
drivers/net/ethernet/i825xx/sni_82596.c | 19 +++++++++----
3 files
2016 Jun 02
0
[RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs
The dma-mapping core and the implementations do not change the
DMA attributes passed by pointer. Thus the pointer can point to const
data. However the attributes do not have to be a bitfield. Instead
unsigned long will do fine:
1. This is just simpler. Both in terms of reading the code and setting
attributes. Instead of initializing local attributes on the stack
and passing pointer to
2019 Aug 08
2
[PATCH] nouveau/hmm: map pages after migration
...ddr_t *dma_addr, u64 *pfn)
>
> I'll pick up the removal of the not needed addr argument for the patch
> introducing nouveau_dmem_migrate_copy_one, thanks,
>
>> static void nouveau_dmem_migrate_chunk(struct migrate_vma *args,
>> - struct nouveau_drm *drm, dma_addr_t *dma_addrs)
>> + struct nouveau_drm *drm, dma_addr_t *dma_addrs, u64 *pfns)
>> {
>> struct nouveau_fence *fence;
>> unsigned long addr = args->start, nr_dma = 0, i;
>>
>> for (i = 0; addr < args->end; i++) {
>> args->dst[i] = nouveau_dme...
2020 Mar 03
2
[PATCH v2] nouveau/hmm: map pages after migration
...static unsigned long nouveau_dmem_migrate_copy_one(struct nouveau_drm *drm,
out_free_page:
nouveau_dmem_page_free_locked(drm, dpage);
out:
+ *pfn = NVIF_VMM_PFNMAP_V0_NONE;
return 0;
}
static void nouveau_dmem_migrate_chunk(struct nouveau_drm *drm,
- struct migrate_vma *args, dma_addr_t *dma_addrs)
+ struct migrate_vma *args, dma_addr_t *dma_addrs, u64 *pfns)
{
struct nouveau_fence *fence;
unsigned long addr = args->start, nr_dma = 0, i;
for (i = 0; addr < args->end; i++) {
args->dst[i] = nouveau_dmem_migrate_copy_one(drm, args->src[i],
- dma_addrs + nr_dma);
+...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
This patch adds support for virtual IOMMU to the vmxnet3 module. We
switch to DMA consistent mappings for anything we pass to the device.
There were a few places where we already did this, but using pci_blah();
these have been fixed to use dma_blah(), along with all new occurrences
where we've replaced kmalloc() and friends.
Also fix two small bugs:
1) use after free of rq->buf_info in
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
This patch adds support for virtual IOMMU to the vmxnet3 module. We
switch to DMA consistent mappings for anything we pass to the device.
There were a few places where we already did this, but using pci_blah();
these have been fixed to use dma_blah(), along with all new occurrences
where we've replaced kmalloc() and friends.
Also fix two small bugs:
1) use after free of rq->buf_info in
2020 Jul 31
0
[PATCH] vdpasim: protect concurrent access to iommu iotlb
From: Max Gurtovoy <maxg at mellanox.com>
Iommu iotlb can be accessed by different cores for performing IO using
multiple virt queues. Add a spinlock to synchronize iotlb accesses.
This could be easily reproduced when using more than 1 pktgen threads
to inject traffic to vdpa simulator.
Fixes: 2c53d0f64c06f("vdpasim: vDPA device simulator")
Cc: stable at vger.kernel.org
2020 Mar 04
5
[PATCH v3 0/4] nouveau/hmm: map pages after migration
Originally patch 4 was targeted for Jason's rdma tree since other HMM
related changes were queued there. Now that those have been merged,
these patches just contain changes to nouveau so they could go through
any tree. I guess Ben Skeggs' tree would be appropriate.
Changes since v2:
Added patches 1-3 to fix some minor issues.
Eliminated nouveau_find_svmm() since it is easily found.
2020 Jul 23
0
[PATCH v4 4/6] nouveau/svm: use the new migration invalidation
...;
if (src & MIGRATE_PFN_WRITE)
@@ -584,8 +592,8 @@ static void nouveau_dmem_migrate_chunk(struct nouveau_drm *drm,
unsigned long addr = args->start, nr_dma = 0, i;
for (i = 0; addr < args->end; i++) {
- args->dst[i] = nouveau_dmem_migrate_copy_one(drm, args->src[i],
- dma_addrs + nr_dma, pfns + i);
+ args->dst[i] = nouveau_dmem_migrate_copy_one(drm, svmm,
+ args->src[i], dma_addrs + nr_dma, pfns + i);
if (!dma_mapping_error(drm->dev->dev, dma_addrs[nr_dma]))
nr_dma++;
addr += PAGE_SIZE;
@@ -616,6 +624,7 @@ nouveau_dmem_migrate_vma(struct nouveau_...