From: Scott Wood <scottwood@freescale.com>
To: Sethi Varun-B16395 <B16395@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
Joerg Roedel <joro@8bytes.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Tabi Timur-B04825 <B04825@freescale.com>
Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.
Date: Mon, 10 Dec 2012 19:00:44 -0600 [thread overview]
Message-ID: <1355187644.5334.23@snotra> (raw)
In-Reply-To: <C5ECD7A89D1DC44195F34B25E172658D2C09A4@039-SN2MPN1-013.039d.mgd.msft.net> (from B16395@freescale.com on Mon Dec 10 04:10:06 2012)
On 12/10/2012 04:10:06 AM, Sethi Varun-B16395 wrote:
>
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, December 04, 2012 11:53 PM
> > To: Sethi Varun-B16395
> > Cc: Wood Scott-B07421; Joerg Roedel; linux-kernel@vger.kernel.org;
> > iommu@lists.linux-foundation.org; linuxppc-dev@lists.ozlabs.org;
> Tabi
> > Timur-B04825
> > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes
> > required by fsl PAMU driver.
> >
> > On 12/04/2012 05:53:33 AM, Sethi Varun-B16395 wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Monday, December 03, 2012 10:34 PM
> > > > To: Sethi Varun-B16395
> > > > Cc: Joerg Roedel; linux-kernel@vger.kernel.org;
> iommu@lists.linux-
> > > > foundation.org; Wood Scott-B07421;
> linuxppc-dev@lists.ozlabs.org;
> > > Tabi
> > > > Timur-B04825
> > > > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain
> attributes
> > > > required by fsl PAMU driver.
> > > >
> > > > On 12/03/2012 10:57:29 AM, Sethi Varun-B16395 wrote:
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: iommu-bounces@lists.linux-foundation.org
> [mailto:iommu-
> > > > > > bounces@lists.linux-foundation.org] On Behalf Of Joerg
> Roedel
> > > > > > Sent: Sunday, December 02, 2012 7:33 PM
> > > > > > To: Sethi Varun-B16395
> > > > > > Cc: linux-kernel@vger.kernel.org;
> > > iommu@lists.linux-foundation.org;
> > > > > Wood
> > > > > > Scott-B07421; linuxppc-dev@lists.ozlabs.org; Tabi
> Timur-B04825
> > > > > > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain
> > > attributes
> > > > > > required by fsl PAMU driver.
> > > > > >
> > > > > > Hmm, we need to work out a good abstraction for this.
> > > > > >
> > > > > > On Tue, Nov 20, 2012 at 07:24:56PM +0530, Varun Sethi wrote:
> > > > > > > Added the following domain attributes required by FSL PAMU
> > > driver:
> > > > > > > 1. Subwindows field added to the iommu domain geometry
> > > attribute.
> > > > > >
> > > > > > Are the Subwindows mapped with full size or do you map only
> > > parts
> > > > > of the
> > > > > > subwindows?
> > > > > >
> > > > > [Sethi Varun-B16395] It's possible to map a part of the
> subwindow
> > > i.e.
> > > > > size of the mapping can be less than the sub window size.
> > > > >
> > > > > > > + * This attribute indicates number of DMA subwindows
> > > > supported
> > > > > by
> > > > > > > + * the geometry. If there is a single window that maps
> > > the
> > > > > entire
> > > > > > > + * geometry, attribute must be set to "1". A value of
> > > "0"
> > > > > implies
> > > > > > > + * that this mechanism is not used at all(normal paging
> > > is
> > > > > used).
> > > > > > > + * Value other than* "0" or "1" indicates the actual
> > > number
> > > > of
> > > > > > > + * subwindows.
> > > > > > > + */
> > > > > >
> > > > > > This semantic is ugly, how about a feature detection
> mechanism?
> > > > > >
> > > > > [Sethi Varun-B16395] A feature mechanism to query the type of
> > > IOMMU?
> > > >
> > > > A feature mechanism to determine whether this subwindow
> mechanism is
> > > > available, and what the limits are.
> > > >
> > > So, we use the IOMMU capability interface to find out if IOMMU
> > > supports sub windows or not, right? But still number of sub
> windows
> > > would be specified as a part of the geometry and the valid value
> for
> > > sub windows would 0,1 or actual number of sub windows.
> >
> > How does a user of the interface find out what values are possible
> for
> > the "actual number of subwindows"? How does a user of the
> interface find
> > out whether there are any limitations on specifying a value of zero
> (in
> > the case of PAMU, that would be a maximum 1 MiB naturally-aligned
> > aperture to support arbitrary 4KiB mappings)?
> How about if we say that the default value for subwindows is zero and
> this what you get when you read the geometry (iommu_get_attr) after
> initializing the domain? In that case the user would know that
> implication of setting subwindows to zero with respect to the
> aperture size.
So it would default to the maximum aperture size possible with no
subwindows? That might be OK, though is there a way to reset the
domain later on to get back to that informational state?
How about finding out the maximum number of subwindows?
> Also, should we introduce an additional API like "iommu_check_attr",
> which the user can use to validate the attribute value. For example
> in case of geometry, the user can fill up the structure and pass it
> to the iommu driver in order to verify the aperture and subwindows
> field.
Doesn't the current API raise an error if you do something
unsupported? In any case I don't think making a series of guesses and
seeing which ones are accepted is a good substitute for being able to
simply read out the relevant parameters.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Sethi Varun-B16395 <B16395@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
Joerg Roedel <joro@8bytes.org>,
Tabi Timur-B04825 <B04825@freescale.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.
Date: Mon, 10 Dec 2012 19:00:44 -0600 [thread overview]
Message-ID: <1355187644.5334.23@snotra> (raw)
In-Reply-To: <C5ECD7A89D1DC44195F34B25E172658D2C09A4@039-SN2MPN1-013.039d.mgd.msft.net> (from B16395@freescale.com on Mon Dec 10 04:10:06 2012)
On 12/10/2012 04:10:06 AM, Sethi Varun-B16395 wrote:
>=20
>=20
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, December 04, 2012 11:53 PM
> > To: Sethi Varun-B16395
> > Cc: Wood Scott-B07421; Joerg Roedel; linux-kernel@vger.kernel.org;
> > iommu@lists.linux-foundation.org; linuxppc-dev@lists.ozlabs.org; =20
> Tabi
> > Timur-B04825
> > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes
> > required by fsl PAMU driver.
> >
> > On 12/04/2012 05:53:33 AM, Sethi Varun-B16395 wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Monday, December 03, 2012 10:34 PM
> > > > To: Sethi Varun-B16395
> > > > Cc: Joerg Roedel; linux-kernel@vger.kernel.org; =20
> iommu@lists.linux-
> > > > foundation.org; Wood Scott-B07421; =20
> linuxppc-dev@lists.ozlabs.org;
> > > Tabi
> > > > Timur-B04825
> > > > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain =20
> attributes
> > > > required by fsl PAMU driver.
> > > >
> > > > On 12/03/2012 10:57:29 AM, Sethi Varun-B16395 wrote:
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: iommu-bounces@lists.linux-foundation.org =20
> [mailto:iommu-
> > > > > > bounces@lists.linux-foundation.org] On Behalf Of Joerg =20
> Roedel
> > > > > > Sent: Sunday, December 02, 2012 7:33 PM
> > > > > > To: Sethi Varun-B16395
> > > > > > Cc: linux-kernel@vger.kernel.org;
> > > iommu@lists.linux-foundation.org;
> > > > > Wood
> > > > > > Scott-B07421; linuxppc-dev@lists.ozlabs.org; Tabi =20
> Timur-B04825
> > > > > > Subject: Re: [PATCH 3/4 v5] iommu/fsl: Add iommu domain
> > > attributes
> > > > > > required by fsl PAMU driver.
> > > > > >
> > > > > > Hmm, we need to work out a good abstraction for this.
> > > > > >
> > > > > > On Tue, Nov 20, 2012 at 07:24:56PM +0530, Varun Sethi wrote:
> > > > > > > Added the following domain attributes required by FSL PAMU
> > > driver:
> > > > > > > 1. Subwindows field added to the iommu domain geometry
> > > attribute.
> > > > > >
> > > > > > Are the Subwindows mapped with full size or do you map only
> > > parts
> > > > > of the
> > > > > > subwindows?
> > > > > >
> > > > > [Sethi Varun-B16395] It's possible to map a part of the =20
> subwindow
> > > i.e.
> > > > > size of the mapping can be less than the sub window size.
> > > > >
> > > > > > > + * This attribute indicates number of DMA subwindows
> > > > supported
> > > > > by
> > > > > > > + * the geometry. If there is a single window that maps
> > > the
> > > > > entire
> > > > > > > + * geometry, attribute must be set to "1". A value of
> > > "0"
> > > > > implies
> > > > > > > + * that this mechanism is not used at all(normal paging
> > > is
> > > > > used).
> > > > > > > + * Value other than* "0" or "1" indicates the actual
> > > number
> > > > of
> > > > > > > + * subwindows.
> > > > > > > + */
> > > > > >
> > > > > > This semantic is ugly, how about a feature detection =20
> mechanism?
> > > > > >
> > > > > [Sethi Varun-B16395] A feature mechanism to query the type of
> > > IOMMU?
> > > >
> > > > A feature mechanism to determine whether this subwindow =20
> mechanism is
> > > > available, and what the limits are.
> > > >
> > > So, we use the IOMMU capability interface to find out if IOMMU
> > > supports sub windows or not, right? But still number of sub =20
> windows
> > > would be specified as a part of the geometry and the valid value =20
> for
> > > sub windows would 0,1 or actual number of sub windows.
> >
> > How does a user of the interface find out what values are possible =20
> for
> > the "actual number of subwindows"? How does a user of the =20
> interface find
> > out whether there are any limitations on specifying a value of zero =20
> (in
> > the case of PAMU, that would be a maximum 1 MiB naturally-aligned
> > aperture to support arbitrary 4KiB mappings)?
> How about if we say that the default value for subwindows is zero and =20
> this what you get when you read the geometry (iommu_get_attr) after =20
> initializing the domain? In that case the user would know that =20
> implication of setting subwindows to zero with respect to the =20
> aperture size.
So it would default to the maximum aperture size possible with no =20
subwindows? That might be OK, though is there a way to reset the =20
domain later on to get back to that informational state?
How about finding out the maximum number of subwindows?
> Also, should we introduce an additional API like "iommu_check_attr", =20
> which the user can use to validate the attribute value. For example =20
> in case of geometry, the user can fill up the structure and pass it =20
> to the iommu driver in order to verify the aperture and subwindows =20
> field.
Doesn't the current API raise an error if you do something =20
unsupported? In any case I don't think making a series of guesses and =20
seeing which ones are accepted is a good substitute for being able to =20
simply read out the relevant parameters.
-Scott=
next prev parent reply other threads:[~2012-12-11 1:00 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 13:54 [PATCH 0/4] iommu/fsl: Freescale PAMU driver and IOMMU API implementation Varun Sethi
2012-11-20 13:54 ` Varun Sethi
[not found] ` <1353419697-31269-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-11-20 13:54 ` [PATCH 1/4 v2] iommu/fsl: Store iommu domain information pointer in archdata Varun Sethi
2012-11-20 13:54 ` Varun Sethi
[not found] ` <1353419697-31269-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-11-26 5:33 ` Sethi Varun-B16395
2012-11-26 5:33 ` Sethi Varun-B16395
2012-11-26 5:33 ` Sethi Varun-B16395
[not found] ` <C5ECD7A89D1DC44195F34B25E172658D29AE62-RL0Hj/+nBVDYdknt8GnhQq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2012-11-28 17:35 ` Kumar Gala
2012-11-28 17:35 ` Kumar Gala
2012-11-28 17:35 ` Kumar Gala
2012-11-20 13:54 ` [PATCH 2/4] iommu/fsl: Add PAMU bypass enable register to ccsr_guts structure Varun Sethi
2012-11-20 13:54 ` Varun Sethi
[not found] ` <1353419697-31269-3-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-11-25 13:21 ` Kumar Gala
2012-11-25 13:21 ` Kumar Gala
2012-11-25 13:21 ` Kumar Gala
2012-11-20 13:54 ` [PATCH 3/4 v5] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver Varun Sethi
2012-11-20 13:54 ` Varun Sethi
[not found] ` <1353419697-31269-4-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-11-26 5:24 ` Sethi Varun-B16395
2012-11-26 5:24 ` Sethi Varun-B16395
2012-11-26 5:24 ` Sethi Varun-B16395
2012-12-02 14:03 ` Joerg Roedel
2012-12-02 14:03 ` Joerg Roedel
2012-12-02 14:03 ` Joerg Roedel
[not found] ` <20121202140323.GO30633-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2012-12-02 15:11 ` Tabi Timur-B04825
2012-12-02 15:11 ` Tabi Timur-B04825
2012-12-02 15:11 ` Tabi Timur-B04825
2012-12-03 16:57 ` Sethi Varun-B16395
2012-12-03 16:57 ` Sethi Varun-B16395
2012-12-03 16:57 ` Sethi Varun-B16395
2012-12-03 17:03 ` Scott Wood
2012-12-03 17:03 ` Scott Wood
2012-12-04 11:53 ` Sethi Varun-B16395
2012-12-04 11:53 ` Sethi Varun-B16395
2012-12-04 11:53 ` Sethi Varun-B16395
2012-12-04 18:22 ` Scott Wood
2012-12-04 18:22 ` Scott Wood
2012-12-10 10:10 ` Sethi Varun-B16395
2012-12-10 10:10 ` Sethi Varun-B16395
2012-12-10 10:10 ` Sethi Varun-B16395
2012-12-11 1:00 ` Scott Wood [this message]
2012-12-11 1:00 ` Scott Wood
2012-12-11 4:50 ` Sethi Varun-B16395
2012-12-11 4:50 ` Sethi Varun-B16395
2012-12-11 4:50 ` Sethi Varun-B16395
[not found] ` <C5ECD7A89D1DC44195F34B25E172658D2B2A51-RL0Hj/+nBVDYdknt8GnhQq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2012-12-03 17:27 ` Joerg Roedel
2012-12-03 17:27 ` Joerg Roedel
2012-12-03 17:27 ` Joerg Roedel
2012-12-03 17:36 ` Scott Wood
2012-12-03 17:36 ` Scott Wood
2012-12-02 8:12 ` Sethi Varun-B16395
2012-12-02 8:12 ` Sethi Varun-B16395
2012-12-02 8:12 ` Sethi Varun-B16395
2012-11-20 13:54 ` [PATCH 4/4 v5] iommu/fsl: Freescale PAMU driver and IOMMU API implementation Varun Sethi
2012-11-20 13:54 ` Varun Sethi
[not found] ` <1353419697-31269-5-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-11-20 22:52 ` Timur Tabi
2012-11-20 22:52 ` Timur Tabi
2012-11-20 22:52 ` Timur Tabi
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=1355187644.5334.23@snotra \
--to=scottwood@freescale.com \
--cc=B04825@freescale.com \
--cc=B07421@freescale.com \
--cc=B16395@freescale.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.