mbox series

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

Message ID 20200115124107.3845-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) Jan. 15, 2020, 12:41 p.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.

Patches are acked to be merged 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)
Changes since v4:
*) Fixed a typo
*) Added acks.

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) Jan. 15, 2020, 12:45 p.m. UTC | #1
Hi Christian,

On 1/15/20 1:41 PM, 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.
>
> Patches are acked to be merged through a drm tree.

This small patchset should be ready to be merged now, with acks from Andrew.

Do you want to take it through the ttm tree, or should I ask Dave / 
Daniel to pull it separately?

Note that similar to the vmwgfx coherent patches, Linus has indicated 
that he wants separate pull requests for stuff like this that touches mm.

Thanks,

Thomas
Christian König Jan. 15, 2020, 12:54 p.m. UTC | #2
Am 15.01.20 um 13:45 schrieb Thomas Hellström (VMware):
> Hi Christian,
>
> On 1/15/20 1:41 PM, 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.
>>
>> Patches are acked to be merged through a drm tree.
>
> This small patchset should be ready to be merged now, with acks from 
> Andrew.
>
> Do you want to take it through the ttm tree, or should I ask Dave / 
> Daniel to pull it separately?
>
> Note that similar to the vmwgfx coherent patches, Linus has indicated 
> that he wants separate pull requests for stuff like this that touches mm.

Better ask Dave in this case or merge through drm-misc-next. The later 
is where I push all those little cross driver cleanup patches recently 
and that seems to work fine.

Regards,
Christian.

>
> Thanks,
>
> Thomas
>
>