From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 5/9] iommu: Introduce fault notifier API Date: Wed, 28 Jun 2017 12:16:03 +0200 Message-ID: <20170628101603.GH14532@8bytes.org> References: <1498592883-56224-1-git-send-email-jacob.jun.pan@linux.intel.com> <1498592883-56224-6-git-send-email-jacob.jun.pan@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1498592883-56224-6-git-send-email-jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Jacob Pan Cc: Lan Tianyu , "Tian, Kevin" , LKML , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Jean Delvare , David Woodhouse List-Id: iommu@lists.linux-foundation.org On Tue, Jun 27, 2017 at 12:47:59PM -0700, Jacob Pan wrote: > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index d973555..07cfd92 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -48,6 +48,7 @@ struct iommu_group { > struct list_head devices; > struct mutex mutex; > struct blocking_notifier_head notifier; > + struct blocking_notifier_head fault_notifier; Do you really need a notifier chain here? Will there ever be more than one callback registered to it? > +struct iommu_fault_event { > + struct device *dev; Putting a 'struct device *' member in a uapi struct looks fundamentally wrong. Joerg