Re: [PATCH 1/4] mm: Export flush_vm_area() to sync the PTEs upon construction

2020-08-21 Thread Chris Wilson
Quoting Joerg Roedel (2020-08-21 11:22:04) > On Fri, Aug 21, 2020 at 10:54:22AM +0100, Chris Wilson wrote: > > Ok. I thought it had to be after assigning the *ptep. If we apply the > > sync first, do not have to worry about PGTBL_PTE_MODIFIED from the > > *ptep? > > Hmm, if I understand the code

Re: [PATCH 1/4] mm: Export flush_vm_area() to sync the PTEs upon construction

2020-08-21 Thread Joerg Roedel
On Fri, Aug 21, 2020 at 10:54:22AM +0100, Chris Wilson wrote: > Ok. I thought it had to be after assigning the *ptep. If we apply the > sync first, do not have to worry about PGTBL_PTE_MODIFIED from the > *ptep? Hmm, if I understand the code correctly, you are re-implementing some generic

Re: [PATCH 1/4] mm: Export flush_vm_area() to sync the PTEs upon construction

2020-08-21 Thread Chris Wilson
Quoting Joerg Roedel (2020-08-21 10:51:29) > On Fri, Aug 21, 2020 at 09:50:08AM +0100, Chris Wilson wrote: > > The alloc_vm_area() is another method for drivers to > > vmap/map_kernel_range that uses apply_to_page_range() rather than the > > direct vmalloc walkers. This is missing the page table

Re: [PATCH 1/4] mm: Export flush_vm_area() to sync the PTEs upon construction

2020-08-21 Thread Joerg Roedel
On Fri, Aug 21, 2020 at 09:50:08AM +0100, Chris Wilson wrote: > The alloc_vm_area() is another method for drivers to > vmap/map_kernel_range that uses apply_to_page_range() rather than the > direct vmalloc walkers. This is missing the page table modification > tracking, and the ability to

[PATCH 1/4] mm: Export flush_vm_area() to sync the PTEs upon construction

2020-08-21 Thread Chris Wilson
The alloc_vm_area() is another method for drivers to vmap/map_kernel_range that uses apply_to_page_range() rather than the direct vmalloc walkers. This is missing the page table modification tracking, and the ability to synchronize the PTE updates afterwards. Provide flush_vm_area() for the users