Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 22, 2019 at 08:14:51PM +0000, Jason Gunthorpe wrote:
On Fri, Nov 22, 2019 at 12:01:17PM -0800, Niranjan Vishwanathapura wrote:
On Fri, Nov 22, 2019 at 11:54:45AM -0800, Niranjana Vishwanathapura wrote:
> Use HMM page table mirroring support to build device page table.
> Implement the bind ioctl and bind the process address range in the
> specified context's ppgtt.
> Handle invalidation notifications by unbinding the address range.
>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Jon Bloomfield <jon.bloomfield@xxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> Cc: Sudeep Dutt <sudeep.dutt@xxxxxxxxx>
> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@xxxxxxxxx>
> +int i915_svm_bind_mm(struct i915_address_space *vm)
> +{
> +	struct i915_svm *svm;
> +	struct mm_struct *mm;
> +	int ret = 0;
> +
> +	mm = get_task_mm(current);
> +	down_write(&mm->mmap_sem);
> +	mutex_lock(&vm->svm_mutex);
> +	if (vm->svm)
> +		goto bind_out;
> +
> +	svm = kzalloc(sizeof(*svm), GFP_KERNEL);
> +	if (!svm) {
> +		ret = -ENOMEM;
> +		goto bind_out;
> +	}
> +	svm->mirror.ops = &i915_mirror_ops;
> +	mutex_init(&svm->mutex);
> +	kref_init(&svm->ref);
> +	svm->mm = mm;
> +	svm->vm = vm;
> +
> +	ret = hmm_mirror_register(&svm->mirror, mm);

I saw that these APIs have been removed.
I will update once it gets included in kernel release.

I would like to see all the mmu notifier use in i916 updated to use
the new APIs :)

Please cc me when you post patches using the new APIs, I'd like to see
how they are being used.


Ok, sure, will do.

Thanks,
Niranjana

Regards,
Jason
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux