Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Boris Ostrovsky
On 6/22/20 3:28 PM, Souptick Joarder wrote: > On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky > wrote: >> On 6/22/20 2:52 PM, Souptick Joarder wrote: >>> I read the code again. I think, this check is needed to handle a scenario >>> when >>> lock_pages() return -ENOSPC. Better to keep this check.

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Souptick Joarder
On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky wrote: > > On 6/22/20 2:52 PM, Souptick Joarder wrote: > > > > I read the code again. I think, this check is needed to handle a scenario > > when > > lock_pages() return -ENOSPC. Better to keep this check. Let me post v2 of > > this > > RFC for a

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Boris Ostrovsky
On 6/22/20 2:52 PM, Souptick Joarder wrote: > > I read the code again. I think, this check is needed to handle a scenario when > lock_pages() return -ENOSPC. Better to keep this check. Let me post v2 of this > RFC for a clear view. Actually, error handling seems to be somewhat broken here. If loc

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Souptick Joarder
On Fri, Jun 19, 2020 at 1:00 PM John Hubbard wrote: > > On 2020-06-18 20:12, Souptick Joarder wrote: > > On Wed, Jun 17, 2020 at 11:29 PM Boris Ostrovsky > > wrote: > >> > >> On 6/16/20 11:14 PM, Souptick Joarder wrote: > >>> In 2019, we introduced pin_user_pages*() and now we are converting > >>

RE: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-19 Thread Paul Durrant
> -Original Message- > From: Boris Ostrovsky > Sent: 17 June 2020 18:57 > To: Souptick Joarder ; jgr...@suse.com; > sstabell...@kernel.org > Cc: xen-de...@lists.xenproject.org; linux-kernel@vger.kernel.org; John > Hubbard ; > p...@xen.org > Subject: Re: [RFC

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-19 Thread John Hubbard
On 2020-06-18 20:12, Souptick Joarder wrote: On Wed, Jun 17, 2020 at 11:29 PM Boris Ostrovsky wrote: On 6/16/20 11:14 PM, Souptick Joarder wrote: In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-18 Thread Souptick Joarder
On Wed, Jun 17, 2020 at 11:29 PM Boris Ostrovsky wrote: > > On 6/16/20 11:14 PM, Souptick Joarder wrote: > > In 2019, we introduced pin_user_pages*() and now we are converting > > get_user_pages*() to the new API as appropriate. [1] & [2] could > > be referred for more information. > > > > [1] Doc

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-17 Thread Boris Ostrovsky
On 6/16/20 11:14 PM, Souptick Joarder wrote: > In 2019, we introduced pin_user_pages*() and now we are converting > get_user_pages*() to the new API as appropriate. [1] & [2] could > be referred for more information. > > [1] Documentation/core-api/pin_user_pages.rst > > [2] "Explicit pinning of use