From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute Date: Tue, 5 Feb 2013 14:05:34 +0100 Message-ID: <20130205130534.GS25591@8bytes.org> References: <1359983924-28952-1-git-send-email-joro@8bytes.org> <1359983924-28952-6-git-send-email-joro@8bytes.org> <20130205104155.GR25591@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Sethi Varun-B16395 Cc: Wood Scott-B07421 , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On Tue, Feb 05, 2013 at 10:52:03AM +0000, Sethi Varun-B16395 wrote: > DOMAIN_ATTR_PAMU_ENABLE is required to enable a particular DMA window. > My point is about the domain geometry, which is incomplete in case of > PAMU without the number of subwindows. Geometry parameters are used > for initializing the PAMU window settings. Individual subwindows can > only be enabled, once the PAMU window has been initialized using the > geometry settings. I understand that. What you do is: /* Set geometry */ set_attr(domain, DOMAIN_ATTR_GEOMETRY); /* Set number of PAMU subwindows */ set_attr(domain, DOMAIN_ATTR_WINDOWS); /* Commit changes to hardware and enable the window */ set_attr(domain, DOMAIN_ATTR_PAMU_ENABLE); And I don't see any problem with that. The domain_attr interface was introduced to cope with device specifics, we don't change global interface data structures for that. Joerg