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

From: Huang\, Ying
Date: Thu Dec 14 2017 - 01:43:42 EST


Hi, Dave,

Dave Hansen <dave.hansen@xxxxxxxxx> 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 stale compared to that on the cpu for kernel
>> mappings.
>
> What's the plan to deal with all of the ways other than vmalloc() that
> the kernel changes the page tables?

The kernel MMU notifier is called in flush_tlb_kernel_range(). So IOMMU
will be notified for TLB flushing caused by all ways that the kernel
changes the page tables including vmalloc, kmap, etc.

Best Regards,
Huang, Ying