From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbdH2UQB (ORCPT ); Tue, 29 Aug 2017 16:16:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40406 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbdH2UQA (ORCPT ); Tue, 29 Aug 2017 16:16:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D07BA7EA83 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jglisse@redhat.com Date: Tue, 29 Aug 2017 16:15:56 -0400 From: Jerome Glisse To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Linus Torvalds , Bernhard Held , Adam Borowski , Andrea Arcangeli , Radim =?utf-8?B?S3LEjW3DocWZ?= , Wanpeng Li , Paolo Bonzini , Takashi Iwai , Nadav Amit , Mike Galbraith , "Kirill A . Shutemov" , axie , Andrew Morton , Dan Williams , Ross Zwisler Subject: Re: [PATCH 0/4] mmu_notifier semantic update Message-ID: <20170829201555.GG7546@redhat.com> References: <20170829201132.9292-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170829201132.9292-1-jglisse@redhat.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 29 Aug 2017 20:16:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 29, 2017 at 04:11:28PM -0400, Jérôme Glisse wrote: > So we do not want to allow sleep during call to mmu_notifier_invalidate_page() > but some code do not have surrounding mmu_notifier_invalidate_range_start()/ > mmu_notifier_invalidate_range_end() or mmu_notifier_invalidate_range() > > This patch serie just make sure that there is at least a call (outside spinlock > section) to mmu_notifier_invalidate_range() after mmu_notifier_invalidate_page() > > This fix issue with AMD IOMMU v2 while avoiding to introduce issue for others > user of the mmu_notifier API. For releavent threads see: > > https://lkml.kernel.org/r/20170809204333.27485-1-jglisse@redhat.com > https://lkml.kernel.org/r/20170804134928.l4klfcnqatni7vsc@black.fi.intel.com > https://marc.info/?l=kvm&m=150327081325160&w=2 Please ignore this. Instead plan is to kill invalidate_page() switch it to invalidate_range() and make sure there is always range_start/ range_end happening around. Jérôme