From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754555AbdKJX7m (ORCPT ); Fri, 10 Nov 2017 18:59:42 -0500 Received: from mga07.intel.com ([134.134.136.100]:3959 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053AbdKJX7l (ORCPT ); Fri, 10 Nov 2017 18:59:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,376,1505804400"; d="scan'208";a="739867" Date: Fri, 10 Nov 2017 16:00:36 -0800 From: Jacob Pan To: Jean-Philippe Brucker Cc: "Liu, Yi L" , "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , Greg Kroah-Hartman , "Wysocki, Rafael J" , "Lan, Tianyu" , "Tian, Kevin" , "Raj, Ashok" , Alex Williamson , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v2 08/16] iommu: introduce device fault data Message-ID: <20171110160036.147d064e@jacob-builder> In-Reply-To: <0ed3e52b-2ca7-e378-817b-34b517a392da@arm.com> References: <1507244624-39189-1-git-send-email-jacob.jun.pan@linux.intel.com> <1507244624-39189-9-git-send-email-jacob.jun.pan@linux.intel.com> <439401c0-a9ff-a69a-dc10-12d72f7abbab@arm.com> <09d451dc-c0e9-1fa2-8f85-45a9b1185d48@arm.com> <20171109113629.6a9251a4@jacob-builder> <0ed3e52b-2ca7-e378-817b-34b517a392da@arm.com> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Nov 2017 13:54:59 +0000 Jean-Philippe Brucker wrote: > /* > * Note: I tried to synthesize what I believe would be useful to > device > * drivers and guests, with regards to the kind of faults that the ARM > * SMMU is capable of reporting. Other IOMMUs may report more or less > * fault reasons, and I guess one should try to associate the faults > * reason that matches best a generic one when reporting a fault. > * > * Finer reason granularity is probably not useful to anyone, and > * coarser granularity would require more work from intermediate > * components processing the fault to figure out what happened, whose > * fault it actually is and where to route it (process vs. device > driver > * vs. vIOMMU driver misprogamming tables). > */ > enum iommu_fault_reason { > IOMMU_FAULT_REASON_UNKNOWN = 0, > can we add one for iommu internal error, the specifics may not be useful for the device drivers, but it is good to know iommu is faulting, perhaps can take action that inform driver users. i.e. /* IOMMU internal error, no specific reason to report out */ IOMMU_FAULT_REASON_INTERNAL, > /* Could not access the PASID table */ > IOMMU_FAULT_REASON_PASID_FETCH, [Jacob Pan]