From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751800AbdH2ULk (ORCPT ); Tue, 29 Aug 2017 16:11:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57428 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbdH2ULj (ORCPT ); Tue, 29 Aug 2017 16:11:39 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6FF817EA8D 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 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Linus Torvalds , Bernhard Held , Adam Borowski , Andrea Arcangeli , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Wanpeng Li , Paolo Bonzini , Takashi Iwai , Nadav Amit , Mike Galbraith , "Kirill A . Shutemov" , axie , Andrew Morton , Dan Williams , Ross Zwisler Subject: [PATCH 0/4] mmu_notifier semantic update Date: Tue, 29 Aug 2017 16:11:28 -0400 Message-Id: <20170829201132.9292-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:11:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie Cc: Andrew Morton Cc: Dan Williams Cc: Ross Zwisler Jérôme Glisse (4): mm/mmu_notifier: document new behavior for mmu_notifier_invalidate_page() dax/mmu_notifier: update to new mmu_notifier semantic mm/rmap: update to new mmu_notifier_invalidate_page() semantic iommu/amd: update to new mmu_notifier_invalidate_page() semantic drivers/iommu/amd_iommu_v2.c | 8 -------- fs/dax.c | 8 ++++++-- include/linux/mmu_notifier.h | 6 ++++++ mm/rmap.c | 18 +++++++++++++++++- 4 files changed, 29 insertions(+), 11 deletions(-) -- 2.13.5