public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Joerg.Roedel@amd.com (Roedel, Joerg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] iommu/core: add fault reporting mechanism
Date: Mon, 12 Sep 2011 18:02:52 +0200	[thread overview]
Message-ID: <20110912160252.GE11701@amd.com> (raw)
In-Reply-To: <1315421604-12286-1-git-send-email-ohad@wizery.com>

On Wed, Sep 07, 2011 at 02:53:22PM -0400, Ohad Ben-Cohen wrote:
>  struct device;
> +struct iommu_domain;
> +
> +/**
> + * enum iommu_fault_types - iommu fault types
> + *
> + * @IOMMU_ERROR: Unrecoverable error
> + *
> + * Currently we only support a generic error fault type.
> + * Future users, which will require more informative fault types, will add
> + * them as needed.
> + */
> +enum iommu_fault_types {
> +	IOMMU_ERROR,
> +};

I still don't get the need for this. It would make sense to encode
different types of faults, like page-faults or interrupt-faults. That is
what I read from the name of the enum.
When I read the comment above it sounds more like you want to encode
different error-levels, like recoverable and unrecoverable error.
The exact meaning of these values need to be clarified.

> +/**
> + * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework
> + * @domain: the iommu domain where the fault has happened
> + * @dev: the device where the fault has happened
> + * @iova: the faulting address
> + * @flags: mmu fault flags (e.g. IOMMU_FAULT_READ/IOMMU_FAULT_WRITE/...)
> + * @event: the mmu fault type

Please place 'event' before iova when you keep it, and not at the end.
Then you have 'where' and 'what' of the fault first before the details
(iova, flags).

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

  parent reply	other threads:[~2011-09-12 16:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 18:53 [PATCH 1/3] iommu/core: add fault reporting mechanism Ohad Ben-Cohen
2011-09-07 18:53 ` [PATCH 2/3] iommu/omap: migrate to the generic fault report mechanism Ohad Ben-Cohen
2011-09-07 18:53 ` [PATCH 3/3] iommu/core: split mapping to page sizes as supported by the hardware Ohad Ben-Cohen
2011-09-13 10:10   ` Roedel, Joerg
2011-09-13 10:34     ` Ohad Ben-Cohen
2011-09-13 10:44       ` Roedel, Joerg
2011-09-13 12:48         ` Ohad Ben-Cohen
2011-09-12 16:02 ` Roedel, Joerg [this message]
2011-09-12 16:21   ` [PATCH 1/3] iommu/core: add fault reporting mechanism Ohad Ben-Cohen
2011-09-13 10:00     ` Roedel, Joerg
2011-09-13 10:19       ` Ohad Ben-Cohen

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=20110912160252.GE11701@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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