mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 16:36:47 +07:00
eeaf06ac1a
This uses HMM to mirror a process' CPU page tables into a channel's page tables, and keep them synchronised so that both the CPU and GPU are able to access the same memory at the same virtual address. While this code also supports Volta/Turing, it's only enabled for Pascal GPUs currently due to channel recovery being unreliable right now on the later GPUs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
34 lines
831 B
C
34 lines
831 B
C
#ifndef __NOUVEAU_VMA_H__
|
|
#define __NOUVEAU_VMA_H__
|
|
#include <nvif/vmm.h>
|
|
struct nouveau_bo;
|
|
struct nouveau_mem;
|
|
|
|
struct nouveau_vma {
|
|
struct nouveau_vmm *vmm;
|
|
int refs;
|
|
struct list_head head;
|
|
u64 addr;
|
|
|
|
struct nouveau_mem *mem;
|
|
|
|
struct nouveau_fence *fence;
|
|
};
|
|
|
|
struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *);
|
|
int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *,
|
|
struct nouveau_vma **);
|
|
void nouveau_vma_del(struct nouveau_vma **);
|
|
int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *);
|
|
void nouveau_vma_unmap(struct nouveau_vma *);
|
|
|
|
struct nouveau_vmm {
|
|
struct nouveau_cli *cli;
|
|
struct nvif_vmm vmm;
|
|
struct nouveau_svmm *svmm;
|
|
};
|
|
|
|
int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *);
|
|
void nouveau_vmm_fini(struct nouveau_vmm *);
|
|
#endif
|