From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751584AbdF1KQO (ORCPT ); Wed, 28 Jun 2017 06:16:14 -0400 Received: from 8bytes.org ([81.169.241.247]:47590 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbdF1KQG (ORCPT ); Wed, 28 Jun 2017 06:16:06 -0400 Date: Wed, 28 Jun 2017 12:16:03 +0200 From: Joerg Roedel To: Jacob Pan Cc: iommu@lists.linux-foundation.org, LKML , David Woodhouse , "Liu, Yi L" , Lan Tianyu , "Tian, Kevin" , Raj Ashok , Alex Williamson , Jean Delvare Subject: Re: [PATCH 5/9] iommu: Introduce fault notifier API 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-Disposition: inline In-Reply-To: <1498592883-56224-6-git-send-email-jacob.jun.pan@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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