[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120130142424.GR19255@amd.com>
Date: Mon, 30 Jan 2012 15:24:24 +0100
From: Joerg Roedel <joerg.roedel@....com>
To: Scott Wood <scottwood@...escale.com>
CC: Joerg Roedel <joro@...tes.org>,
Sethi Varun-B16395 <B16395@...escale.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
Tony Lindgren <tony@...mide.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Wood Scott-B07421 <B07421@...escale.com>,
David Brown <davidb@...eaurora.org>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute
On Fri, Jan 27, 2012 at 03:22:43PM -0600, Scott Wood wrote:
> OK, so there's a geometry that is read-only, and potentially a
> driver-specific geometry that is read/write. The default config for
> PAMU would likely be a 1 MiB aperture in which the dma api can do
> arbitrary 4k mappings -- this fits within the get generic geometry
> operation.
Better: There is a read-only geometry for _all_ IOMMUs. Some IOMMUs may
also allow to write the geometry, like PAMU.
> Should generic get geometry return an error if the driver-specific
> geometry has been set to something that doesn't fit within the generic
> geometry model?
A domain can only have one geometry. So if you set a new geometry
subsequent calls to get_attr will return the new geometry.
> I said a generic attribute (not GART specific) -- but if we're never
> going to use the generic geometry struct for a set operation, bundling
> it should be OK.
The generic struct should be used to set the geometry. But you can read
out the old geometry and set force_aperture to the same value in the new
geometry. Drivers should actually return -EINVAL when the user tries to
set an unsupported value for force_aperture.
> No, at this point I'm just trying to follow the API development while
> tending to other tasks. I think Varun is working on the code for now.
Okay, maybe it is better to follow a 'release early, release often'
model here. So we can work out the issues together.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists