From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Huang\, Ying" Subject: Re: [PATCH 1/2] mm: Add kernel MMU notifier to manage IOTLB/DEVTLB Date: Thu, 14 Dec 2017 14:43:27 +0800 Message-ID: <87efnxn71s.fsf@yhuang-dev.intel.com> References: <1513213366-22594-1-git-send-email-baolu.lu@linux.intel.com> <1513213366-22594-2-git-send-email-baolu.lu@linux.intel.com> <5A31F232.90901@linux.intel.com> <4466eac3-c4f5-47e4-e568-912a560240c1@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ascii Return-path: In-Reply-To: <4466eac3-c4f5-47e4-e568-912a560240c1@intel.com> (Dave Hansen's message of "Wed, 13 Dec 2017 22:28:37 -0800") Sender: owner-linux-mm@kvack.org To: Dave Hansen Cc: Lu Baolu , Bob Liu , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Alex Williamson , Joerg Roedel , David Woodhouse , Rik van Riel , Michal Hocko , Dave Jiang , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Vegard Nossum , Andy Lutomirski , Matthew Wilcox , Andrew Morton , "Paul E . McKenney" , "Kirill A . Shutemov" , Kees Coo k , "xieyisheng (A)" List-Id: iommu@lists.linux-foundation.org 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 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org