From: Jason Gunthorpe <jgg@mellanox.com>
To: Niranjan Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"sanjay.k.kumar@intel.com" <sanjay.k.kumar@intel.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"dave.hansen@intel.com" <dave.hansen@intel.com>,
"jglisse@redhat.com" <jglisse@redhat.com>,
"daniel.vetter@intel.com" <daniel.vetter@intel.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>
Subject: Re: [RFC 06/13] drm/i915/svm: Page table mirroring support
Date: Fri, 22 Nov 2019 20:14:51 +0000 [thread overview]
Message-ID: <20191122201448.GY7481@mellanox.com> (raw)
In-Reply-To: <20191122200116.GA14488@nvishwa1-DESK.sc.intel.com>
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@linux.intel.com>
> > Cc: Jon Bloomfield <jon.bloomfield@intel.com>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Sudeep Dutt <sudeep.dutt@intel.com>
> > Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
> > +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.
Regards,
Jason
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@mellanox.com>
To: Niranjan Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"sanjay.k.kumar@intel.com" <sanjay.k.kumar@intel.com>,
"sudeep.dutt@intel.com" <sudeep.dutt@intel.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"dave.hansen@intel.com" <dave.hansen@intel.com>,
"jglisse@redhat.com" <jglisse@redhat.com>,
"jon.bloomfield@intel.com" <jon.bloomfield@intel.com>,
"daniel.vetter@intel.com" <daniel.vetter@intel.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>
Subject: Re: [RFC 06/13] drm/i915/svm: Page table mirroring support
Date: Fri, 22 Nov 2019 20:14:51 +0000 [thread overview]
Message-ID: <20191122201448.GY7481@mellanox.com> (raw)
Message-ID: <20191122201451.EMgVi4t37I05o28mLbP2FUOTBJ3AeIg6e_XwXdL9rDQ@z> (raw)
In-Reply-To: <20191122200116.GA14488@nvishwa1-DESK.sc.intel.com>
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@linux.intel.com>
> > Cc: Jon Bloomfield <jon.bloomfield@intel.com>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Sudeep Dutt <sudeep.dutt@intel.com>
> > Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
> > +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.
Regards,
Jason
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-11-22 20:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191122195452.14346-1-niranjana.vishwanathapura@intel.com>
[not found] ` <20191122195452.14346-7-niranjana.vishwanathapura@intel.com>
2019-11-22 20:01 ` [RFC 06/13] drm/i915/svm: Page table mirroring support Niranjan Vishwanathapura
2019-11-22 20:01 ` Niranjan Vishwanathapura
2019-11-22 20:14 ` Jason Gunthorpe [this message]
2019-11-22 20:11 ` Niranjan Vishwanathapura
2019-11-22 20:14 ` Jason Gunthorpe
2019-11-22 20:57 [RFC 00/13] drm/i915/svm: Add SVM support Niranjana Vishwanathapura
2019-11-22 20:57 ` [RFC 06/13] drm/i915/svm: Page table mirroring support Niranjana Vishwanathapura
2019-11-22 20:57 ` Niranjana Vishwanathapura
2019-11-22 23:33 ` Jason Gunthorpe
2019-11-22 23:33 ` Jason Gunthorpe
2019-11-23 4:44 ` Niranjan Vishwanathapura
2019-11-23 4:44 ` Niranjan Vishwanathapura
2019-11-23 23:53 ` Jason Gunthorpe
2019-11-23 23:53 ` Jason Gunthorpe
2019-11-24 21:12 ` Niranjan Vishwanathapura
2019-11-24 21:12 ` Niranjan Vishwanathapura
2019-11-25 13:24 ` Jason Gunthorpe
2019-11-25 13:24 ` Jason Gunthorpe
2019-11-25 16:32 ` Niranjan Vishwanathapura
2019-11-26 18:45 ` Jason Gunthorpe
2019-11-26 18:45 ` Jason Gunthorpe
2019-12-03 19:07 ` Niranjan Vishwanathapura
2019-11-25 16:34 ` Jerome Glisse
2019-11-25 16:34 ` Jerome Glisse
2019-11-25 16:33 ` Jerome Glisse
2019-11-25 21:29 ` Niranjan Vishwanathapura
2019-11-26 18:32 ` Jason Gunthorpe
2019-11-26 18:32 ` Jason Gunthorpe
2019-12-03 19:19 ` Niranjan Vishwanathapura
2019-12-04 21:51 ` Jerome Glisse
2019-12-08 18:23 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191122201448.GY7481@mellanox.com \
--to=jgg@mellanox.com \
--cc=dan.j.williams@intel.com \
--cc=daniel.vetter@intel.com \
--cc=dave.hansen@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ira.weiny@intel.com \
--cc=jglisse@redhat.com \
--cc=niranjana.vishwanathapura@intel.com \
--cc=sanjay.k.kumar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox