mbox series

[v4,0/2] mm, drm/ttm: Fix pte insertion with customized protection

Message ID 20191212084741.9251-1-thomas_os@shipmail.org (mailing list archive)
Headers show
Series mm, drm/ttm: Fix pte insertion with customized protection | expand

Message

Thomas Hellström (Intel) Dec. 12, 2019, 8:47 a.m. UTC
From: Thomas Hellstrom <thellstrom@vmware.com>

The drm/ttm module is using a modified on-stack copy of the
struct vm_area_struct to be able to set a page protection with customized
caching. Fix that by adding a vmf_insert_mixed_prot() function similar
to the existing vmf_insert_pfn_prot() for use with drm/ttm.

I'd like to merge this through a drm tree.

Changes since v1:
*) Formatting fixes in patch 1
*) Updated commit message of patch 2.
Changes since v2:
*) Moved vmf_insert_mixed_prot() export to patch 2 (Michal Hocko)
*) Documented under which conditions it's safe to use a page protection
   different from struct vm_area_struct::vm_page_prot. (Michal Hocko)
Changes since v3:
*) More documentation regarding under which conditions it's safe to use a
   page protection different from struct vm_area_struct::vm_page_prot. This
   time also in core vm. (Michal Hocko)

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>

Comments

Thomas Hellström (Intel) Dec. 20, 2019, 8:06 a.m. UTC | #1
Andrew,

On 12/12/19 9:47 AM, Thomas Hellström (VMware) wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
>
> The drm/ttm module is using a modified on-stack copy of the
> struct vm_area_struct to be able to set a page protection with customized
> caching. Fix that by adding a vmf_insert_mixed_prot() function similar
> to the existing vmf_insert_pfn_prot() for use with drm/ttm.
>
> I'd like to merge this through a drm tree.
>
> Changes since v1:
> *) Formatting fixes in patch 1
> *) Updated commit message of patch 2.
> Changes since v2:
> *) Moved vmf_insert_mixed_prot() export to patch 2 (Michal Hocko)
> *) Documented under which conditions it's safe to use a page protection
>     different from struct vm_area_struct::vm_page_prot. (Michal Hocko)
> Changes since v3:
> *) More documentation regarding under which conditions it's safe to use a
>     page protection different from struct vm_area_struct::vm_page_prot. This
>     time also in core vm. (Michal Hocko)
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> Cc: Ralph Campbell <rcampbell@nvidia.com>
> Cc: "Jérôme Glisse" <jglisse@redhat.com>
> Cc: "Christian König" <christian.koenig@amd.com>
>
Seems all concerns with this series have been addressed. Could I have an 
ack to merge this through a DRM tree?

Thanks,

Thomas
Andrew Morton Dec. 23, 2019, 10:34 p.m. UTC | #2
On Fri, 20 Dec 2019 09:06:08 +0100 Thomas Hellström (VMware) <thomas_os@shipmail.org> wrote:

> Andrew,
> 
> On 12/12/19 9:47 AM, Thomas Hellström (VMware) wrote:
> > From: Thomas Hellstrom <thellstrom@vmware.com>
> >
> > The drm/ttm module is using a modified on-stack copy of the
> > struct vm_area_struct to be able to set a page protection with customized
> > caching. Fix that by adding a vmf_insert_mixed_prot() function similar
> > to the existing vmf_insert_pfn_prot() for use with drm/ttm.
> >
> > I'd like to merge this through a drm tree.
> >
> > Changes since v1:
> > *) Formatting fixes in patch 1
> > *) Updated commit message of patch 2.
> > Changes since v2:
> > *) Moved vmf_insert_mixed_prot() export to patch 2 (Michal Hocko)
> > *) Documented under which conditions it's safe to use a page protection
> >     different from struct vm_area_struct::vm_page_prot. (Michal Hocko)
> > Changes since v3:
> > *) More documentation regarding under which conditions it's safe to use a
> >     page protection different from struct vm_area_struct::vm_page_prot. This
> >     time also in core vm. (Michal Hocko)
> >
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Michal Hocko <mhocko@suse.com>
> > Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> > Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> > Cc: Ralph Campbell <rcampbell@nvidia.com>
> > Cc: "Jérôme Glisse" <jglisse@redhat.com>
> > Cc: "Christian König" <christian.koenig@amd.com>
> >
> Seems all concerns with this series have been addressed. Could I have an 
> ack to merge this through a DRM tree?
> 

Yes, please do that.

Acked-by: Andrew Morton <akpm@linux-foundation.org>

for both.