Displaying 5 results from an estimated 5 matches for "ivmm".
Did you mean:
imm
2020 Mar 03
2
[PATCH v2] nouveau/hmm: map pages after migration
...s,f,a...) NV_DEBUG((s)->drm, "svm: "f"\n", ##a)
#define SVM_ERR(s,f,a...) NV_WARN((s)->drm, "svm: "f"\n", ##a)
+struct nouveau_pfnmap_args {
+ struct nvif_ioctl_v0 i;
+ struct nvif_ioctl_mthd_v0 m;
+ struct nvif_vmm_pfnmap_v0 p;
+};
+
struct nouveau_ivmm {
struct nouveau_svmm *svmm;
u64 inst;
@@ -782,6 +788,85 @@ nouveau_svm_fault(struct nvif_notify *notify)
return NVIF_NOTIFY_KEEP;
}
+static inline struct nouveau_pfnmap_args *
+nouveau_pfns_to_args(void *pfns)
+{
+ struct nvif_vmm_pfnmap_v0 *p =
+ container_of(pfns, struct nvif_vmm_pfnma...
2020 Mar 03
0
[PATCH v2] nouveau/hmm: map pages after migration
...> +
> + return container_of(p, struct nouveau_pfnmap_args, p);
And this should just be
return container_of(pfns, struct nouveau_pfnmap_args, p.phys);
> +static struct nouveau_svmm *
> +nouveau_find_svmm(struct nouveau_svm *svm, struct mm_struct *mm)
> +{
> + struct nouveau_ivmm *ivmm;
> +
> + list_for_each_entry(ivmm, &svm->inst, head) {
> + if (ivmm->svmm->notifier.mm == mm)
> + return ivmm->svmm;
> + }
> + return NULL;
> +}
Is this re-implementing mmu_notifier_get() ?
Jason
2020 Mar 03
1
[PATCH v2] nouveau/hmm: map pages after migration
..._args, p);
>
> And this should just be
>
> return container_of(pfns, struct nouveau_pfnmap_args, p.phys);
Much simpler, thanks.
>> +static struct nouveau_svmm *
>> +nouveau_find_svmm(struct nouveau_svm *svm, struct mm_struct *mm)
>> +{
>> + struct nouveau_ivmm *ivmm;
>> +
>> + list_for_each_entry(ivmm, &svm->inst, head) {
>> + if (ivmm->svmm->notifier.mm == mm)
>> + return ivmm->svmm;
>> + }
>> + return NULL;
>> +}
>
> Is this re-implementing mmu_notifier_get() ?
>
> Jason
Not qu...
2019 Aug 07
4
[PATCH] nouveau/hmm: map pages after migration
...s,f,a...) NV_DEBUG((s)->drm, "svm: "f"\n", ##a)
#define SVM_ERR(s,f,a...) NV_WARN((s)->drm, "svm: "f"\n", ##a)
+struct nouveau_pfnmap_args {
+ struct nvif_ioctl_v0 i;
+ struct nvif_ioctl_mthd_v0 m;
+ struct nvif_vmm_pfnmap_v0 p;
+};
+
struct nouveau_ivmm {
struct nouveau_svmm *svmm;
u64 inst;
@@ -734,6 +740,86 @@ nouveau_svm_fault(struct nvif_notify *notify)
return NVIF_NOTIFY_KEEP;
}
+static inline struct nouveau_pfnmap_args *
+nouveau_pfns_to_args(void *pfns)
+{
+ struct nvif_vmm_pfnmap_v0 *p =
+ container_of(pfns, struct nvif_vmm_pfnma...
2019 Aug 13
0
[PATCH] nouveau/hmm: map pages after migration
...uot;f"\n", ##a)
> #define SVM_ERR(s,f,a...) NV_WARN((s)->drm, "svm: "f"\n", ##a)
>
> +struct nouveau_pfnmap_args {
> + struct nvif_ioctl_v0 i;
> + struct nvif_ioctl_mthd_v0 m;
> + struct nvif_vmm_pfnmap_v0 p;
> +};
> +
> struct nouveau_ivmm {
> struct nouveau_svmm *svmm;
> u64 inst;
> @@ -734,6 +740,86 @@ nouveau_svm_fault(struct nvif_notify *notify)
> return NVIF_NOTIFY_KEEP;
> }
>
> +static inline struct nouveau_pfnmap_args *
> +nouveau_pfns_to_args(void *pfns)
> +{
> + struct nvif_vmm_pfnmap_v...