Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-14 Thread Raj, Ashok
Hi Bob On Thu, Dec 14, 2017 at 02:07:38PM +0800, Bob Liu wrote: > On 2017/12/14 11:38, Lu Baolu wrote: > We already have an existing MMU notifiers for userspace updates, > however we lack the same thing for kernel page table updates. To > >> Sorry, I didn't get which situation need

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-14 Thread Raj, Ashok
Hi Bob On Thu, Dec 14, 2017 at 02:07:38PM +0800, Bob Liu wrote: > On 2017/12/14 11:38, Lu Baolu wrote: > We already have an existing MMU notifiers for userspace updates, > however we lack the same thing for kernel page table updates. To > >> Sorry, I didn't get which situation need

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Huang, Ying
Hi, Dave, Dave Hansen writes: > On 12/13/2017 07:38 PM, Lu Baolu wrote: >> 2. When vmalloc/vfree interfaces are called, the page mappings >> for kernel memory might get changed. And current code calls >> flush_tlb_kernel_range() to flush CPU TLBs only. The IOTLB

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Huang, Ying
Hi, Dave, Dave Hansen writes: > On 12/13/2017 07:38 PM, Lu Baolu wrote: >> 2. When vmalloc/vfree interfaces are called, the page mappings >> for kernel memory might get changed. And current code calls >> flush_tlb_kernel_range() to flush CPU TLBs only. The IOTLB or >> DevTLB will be

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Dave Hansen
On 12/13/2017 07:38 PM, Lu Baolu wrote: > 2. When vmalloc/vfree interfaces are called, the page mappings > for kernel memory might get changed. And current code calls > flush_tlb_kernel_range() to flush CPU TLBs only. The IOTLB or > DevTLB will be stale compared to that on the cpu for

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Dave Hansen
On 12/13/2017 07:38 PM, Lu Baolu wrote: > 2. When vmalloc/vfree interfaces are called, the page mappings > for kernel memory might get changed. And current code calls > flush_tlb_kernel_range() to flush CPU TLBs only. The IOTLB or > DevTLB will be stale compared to that on the cpu for

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Bob Liu
On 2017/12/14 11:38, Lu Baolu wrote: > Hi, > > On 12/14/2017 11:10 AM, Bob Liu wrote: >> On 2017/12/14 9:02, Lu Baolu wrote: From: Huang Ying Shared Virtual Memory (SVM) allows a kernel memory mapping to be shared between CPU and and a device which

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Bob Liu
On 2017/12/14 11:38, Lu Baolu wrote: > Hi, > > On 12/14/2017 11:10 AM, Bob Liu wrote: >> On 2017/12/14 9:02, Lu Baolu wrote: From: Huang Ying Shared Virtual Memory (SVM) allows a kernel memory mapping to be shared between CPU and and a device which requested a supervisor

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Lu Baolu
Hi, On 12/14/2017 11:10 AM, Bob Liu wrote: > On 2017/12/14 9:02, Lu Baolu wrote: >> > From: Huang Ying >> > >> > Shared Virtual Memory (SVM) allows a kernel memory mapping to be >> > shared between CPU and and a device which requested a supervisor >> > PASID. Both devices

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Lu Baolu
Hi, On 12/14/2017 11:10 AM, Bob Liu wrote: > On 2017/12/14 9:02, Lu Baolu wrote: >> > From: Huang Ying >> > >> > Shared Virtual Memory (SVM) allows a kernel memory mapping to be >> > shared between CPU and and a device which requested a supervisor >> > PASID. Both devices and IOMMU units have

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Bob Liu
On 2017/12/14 9:02, Lu Baolu wrote: > From: Huang Ying > > Shared Virtual Memory (SVM) allows a kernel memory mapping to be > shared between CPU and and a device which requested a supervisor > PASID. Both devices and IOMMU units have TLBs that cache entries > from CPU's

Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Bob Liu
On 2017/12/14 9:02, Lu Baolu wrote: > From: Huang Ying > > Shared Virtual Memory (SVM) allows a kernel memory mapping to be > shared between CPU and and a device which requested a supervisor > PASID. Both devices and IOMMU units have TLBs that cache entries > from CPU's page tables. We need to

[PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Lu Baolu
From: Huang Ying Shared Virtual Memory (SVM) allows a kernel memory mapping to be shared between CPU and and a device which requested a supervisor PASID. Both devices and IOMMU units have TLBs that cache entries from CPU's page tables. We need to get a chance to flush them

[PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB

2017-12-13 Thread Lu Baolu
From: Huang Ying Shared Virtual Memory (SVM) allows a kernel memory mapping to be shared between CPU and and a device which requested a supervisor PASID. Both devices and IOMMU units have TLBs that cache entries from CPU's page tables. We need to get a chance to flush them at the same time when