From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Cc: "Liu, Yi L" <yi.l.liu@intel.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Joerg Roedel <joro@8bytes.org>,
David Woodhouse <dwmw2@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
"Lan, Tianyu" <tianyu.lan@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
"Raj, Ashok" <ashok.raj@intel.com>,
Alex Williamson <alex.williamson@redhat.com>,
jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH v2 08/16] iommu: introduce device fault data
Date: Mon, 13 Nov 2017 08:12:04 -0800 [thread overview]
Message-ID: <20171113081204.4b2b8516@jacob-builder> (raw)
In-Reply-To: <6ffb6485-669d-aecb-3088-9a5ef7563840@arm.com>
On Mon, 13 Nov 2017 13:19:50 +0000
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> wrote:
> On 11/11/17 00:00, Jacob Pan wrote:
> > On Fri, 10 Nov 2017 13:54:59 +0000
> > Jean-Philippe Brucker <jean-philippe.brucker@arm.com> 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,
>
> Yes, and maybe it should replace IOMMU_FAULT_REASON_UNKNOWN, since the
> device driver would probably handle it the same way. I guess the
> INTERNAL fault is always fatal, meaning that the IOMMU is shutting
> down and there is no hope to recover? I can't see a good reason to
> inform users of non-fatal internal faults, the IOMMU driver will
> print those to dmesg and keep going. For fatal faults we're telling
> users to stop issuing transactions so the IOMMU driver doesn't get
> flooded by events, for example.
>
Internal faults are not always fatal in vt-d, e.g. programming reserved
bits, though it should fail in the first place when programming it
synchronously as the code does today.
I agree we put all internal faults under IOMMU_FAULT_REASON_INTERNAL,
no more UNKNOWN, it is ambiguous in that unknown to device but known to
iommu.
next prev parent reply other threads:[~2017-11-13 16:11 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 23:03 [PATCH v2 00/16] IOMMU driver support for SVM virtualization Jacob Pan
2017-10-05 23:03 ` [PATCH v2 01/16] iommu: introduce bind_pasid_table API function Jacob Pan
2017-10-10 13:14 ` Joerg Roedel
2017-10-10 21:32 ` Jacob Pan
2017-10-10 16:45 ` Jean-Philippe Brucker
2017-10-10 21:42 ` Jacob Pan
2017-10-11 9:17 ` Jean-Philippe Brucker
2017-10-05 23:03 ` [PATCH v2 02/16] iommu/vt-d: add bind_pasid_table function Jacob Pan
2017-10-10 13:21 ` Joerg Roedel
2017-10-12 11:12 ` Liu, Yi L
2017-10-12 17:38 ` Jacob Pan
2017-10-05 23:03 ` [PATCH v2 03/16] iommu: introduce iommu invalidate API function Jacob Pan
2017-10-10 13:35 ` Joerg Roedel
2017-10-10 22:09 ` Jacob Pan
2017-10-11 7:54 ` Liu, Yi L
2017-10-11 9:51 ` Joerg Roedel
2017-10-11 11:54 ` Liu, Yi L
2017-10-11 12:15 ` Joerg Roedel
2017-10-11 12:48 ` Jean-Philippe Brucker
2017-10-12 7:43 ` Joerg Roedel
2017-10-12 9:38 ` Bob Liu
2017-10-12 9:50 ` Liu, Yi L
2017-10-12 10:07 ` Bob Liu
2017-10-12 10:26 ` Jean-Philippe Brucker
2017-10-12 10:33 ` Liu, Yi L
2017-10-05 23:03 ` [PATCH v2 04/16] iommu/vt-d: support flushing more TLB types Jacob Pan
2017-10-26 13:02 ` [v2,04/16] " Lukoshkov, Maksim
2017-10-31 20:39 ` Jacob Pan
2017-10-05 23:03 ` [PATCH v2 05/16] iommu/vt-d: add iommu invalidate function Jacob Pan
2017-10-05 23:03 ` [PATCH v2 06/16] iommu/vt-d: move device_domain_info to header Jacob Pan
2017-10-05 23:03 ` [PATCH v2 07/16] iommu/vt-d: assign PFSID in device TLB invalidation Jacob Pan
2017-10-05 23:03 ` [PATCH v2 08/16] iommu: introduce device fault data Jacob Pan
2017-10-10 19:29 ` Jean-Philippe Brucker
2017-10-10 21:43 ` Jacob Pan
2017-10-20 10:07 ` Liu, Yi L
2017-11-06 19:01 ` Jean-Philippe Brucker
2017-11-07 8:40 ` Liu, Yi L
2017-11-07 11:38 ` Jean-Philippe Brucker
2017-11-09 19:36 ` Jacob Pan
2017-11-10 13:54 ` Jean-Philippe Brucker
2017-11-10 22:18 ` Jacob Pan
2017-11-13 13:06 ` Jean-Philippe Brucker
2017-11-13 16:57 ` Jacob Pan
2017-11-13 17:23 ` Jean-Philippe Brucker
2017-11-11 0:00 ` Jacob Pan
2017-11-13 13:19 ` Jean-Philippe Brucker
2017-11-13 16:12 ` Jacob Pan [this message]
2017-10-05 23:03 ` [PATCH v2 09/16] driver core: add iommu device fault reporting data Jacob Pan
2017-10-06 5:43 ` Greg Kroah-Hartman
2017-10-06 7:11 ` Christoph Hellwig
2017-10-06 8:26 ` Greg Kroah-Hartman
2017-10-06 8:39 ` Joerg Roedel
2017-10-06 16:22 ` Jacob Pan
2017-10-05 23:03 ` [PATCH v2 10/16] iommu: introduce device fault report API Jacob Pan
2017-10-06 9:36 ` Jean-Philippe Brucker
2017-10-09 18:50 ` Jacob Pan
2017-10-10 13:40 ` Joerg Roedel
2017-10-11 17:21 ` Jacob Pan
2017-10-05 23:03 ` [PATCH v2 11/16] iommu/vt-d: use threaded irq for dmar_fault Jacob Pan
2017-10-05 23:03 ` [PATCH v2 12/16] iommu/vt-d: report unrecoverable device faults Jacob Pan
2017-10-05 23:03 ` [PATCH v2 13/16] iommu/intel-svm: notify page request to guest Jacob Pan
2017-10-05 23:03 ` [PATCH v2 14/16] iommu/intel-svm: replace dev ops with fault report API Jacob Pan
2017-10-05 23:03 ` [PATCH v2 15/16] iommu: introduce page response function Jacob Pan
2017-10-05 23:03 ` [PATCH v2 16/16] iommu/vt-d: add intel iommu " Jacob Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113081204.4b2b8516@jacob-builder \
--to=jacob.jun.pan@linux.intel.com \
--cc=alex.williamson@redhat.com \
--cc=ashok.raj@intel.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe.brucker@arm.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tianyu.lan@intel.com \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).