From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biC0r-00058n-Em for qemu-devel@nongnu.org; Thu, 08 Sep 2016 22:57:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biC0n-0000Xu-Ap for qemu-devel@nongnu.org; Thu, 08 Sep 2016 22:57:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biC0n-0000XK-5X for qemu-devel@nongnu.org; Thu, 08 Sep 2016 22:57:53 -0400 From: Peter Xu Date: Fri, 9 Sep 2016 10:57:41 +0800 Message-Id: <1473389864-19694-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH v4 0/3] Introduce IOMMUNotifier struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dgibson@redhat.com, jasowang@redhat.com, mst@redhat.com, pbonzini@redhat.com, cornelia.huck@de.ibm.com, wexu@redhat.com, vkaplans@redhat.com, alex.williamson@redhat.com, peterx@redhat.com V4: - change "notifier_caps" into "notifier_flags" [David] - rename IOMMU_NOTIFIER_{CHANGE|INVALIDATION} with MAP/UNMAP [David] - introduce IOMMUOps.notify_flag_changed, to replace notify_started and notify_stopped [David, Paolo] V3: - use QLIST instead of embedding Notifier into IOMMUNotifier [Paolo] - fix a build error for ppc64-softmmu The idea originates from one of Alex's reply: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg00254.html But after further discussions, it seems that only adding a simple type for notifier is not enough. This series introduced IOMMUNotifier struct to replace the old Notifier interface. Along with it, we can provide registration for one (or multiple) of the IOMMU notifications: - cache invalidations - entry changes This is a support material for Jason's vhost dmar patchset. Please read commit messages for detailed information. Thanks, Peter Xu (3): memory: introduce IOMMUNotifier and its caps memory: introduce IOMMUOps.notify_flag_changed intel_iommu: allow UNMAP notifiers hw/i386/intel_iommu.c | 18 ++++++++----- hw/ppc/spapr_iommu.c | 14 ++++++++-- hw/vfio/common.c | 3 ++- include/exec/memory.h | 47 +++++++++++++++++++++++++-------- include/hw/vfio/vfio-common.h | 2 +- memory.c | 60 +++++++++++++++++++++++++++++++++---------- 6 files changed, 109 insertions(+), 35 deletions(-) -- 2.7.4