[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/6] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute
On Fri, Jan 27, 2012 at 01:00:02PM +0200, Ohad Ben-Cohen wrote:
> On Fri, Jan 27, 2012 at 12:26 PM, Joerg Roedel <> wrote:
> > But probably we can replace the 'void *data' with a 'union
> > domain_attr'? This will give us some type-safety.
> I was thinking that since the geometry concept is actually handled by
> the core itself, it could probably have its own dedicated function.

Note that only the read-side is handled by the core. An IOMMU driver may
decide to implement a write-side for the geometry which would be not in
the core then. Having a dedicated function for the write-side does not
make sense because (for now) there is only one upcoming driver requiring
this. So we either end up with an asymetric interface for read and write
or with an api function implemented by only one driver.

I think dedicated functions also make the API harder to use because a
developer first needs to find out if a property is read/written by a
dedicated function or the set/get-attr interface.

The next attribute I have in mind btw. is the default-domain attribute
which can be used set by the core to tell the iommu driver that dma-api
specific optimizations can be applied to this domain.


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

 \ /
  Last update: 2012-01-27 14:07    [W:0.090 / U:5.952 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site