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 11:41:55 +0100 Message-ID: <20130205104155.GR25591@8bytes.org> References: <1359983924-28952-1-git-send-email-joro@8bytes.org> <1359983924-28952-6-git-send-email-joro@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 Hi, On Tue, Feb 05, 2013 at 09:14:40AM +0000, Sethi Varun-B16395 wrote: > In case of PAMU, geometry would be meaningless without specifying the > number of subwindows. If the API user specifies a geometry but fails > to specify the number of required subwindows, we would assume a > default (max supported) value, which may be incorrect. It's going to > be really ugly. I think we should add the number of sub windows to the > domain geometry. This parameter would be used in case of a window > based iommu. So, a separate set_window API wouldn't be required. I think this can all be implemented with the interface proposed here together with a PAMU-specific DOMAIN_ATTR_PAMU_ENABLE attribute. Stuart outlined in his RFC mail how this can be done. I don't consider this ugly, it is rather a clean tradeoff between putting functionality into the generic part of the IOMMU-API and putting it into the PAMU specific part. Regards, Joerg