From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang Subject: Re: [PATCH] amd iommu: disable iommu emulation on non-iommu systems Date: Fri, 3 Feb 2012 15:28:09 +0100 Message-ID: <4F2BEEF9.1050909@amd.com> References: <4F213167.3010400@amd.com> <4F296F180200007800070594@nat28.tlf.novell.com> <4F2BEA93.6090401@amd.com> <4F2BF9050200007800070F69@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F2BF9050200007800070F69@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: KeirFraser , "xen-devel@lists.xensource.com" , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 02/03/2012 03:11 PM, Jan Beulich wrote: >>>> On 03.02.12 at 15:09, Wei Wang wrote: >> On 02/01/2012 04:58 PM, Jan Beulich wrote: >>> ... Further, are the extra checks needed at all >>> (i.e. wouldn't domain_iommu() return NULL in all of these cases >>> anyway due to the same checks being added to guest_iommu_init())? >>> If so, the checks you add to guest_iommu_destroy() are pointless >>> too. >> >> It is just to make sure those functions are not called by an unexpected >> code path since it is non-static. But I can remove it if you prefer that. > > Keir already committed the patch, but converting things like this > (where the impossible is being checked) to assertions is preferred > imo (meaning less redundant, possibly dead code in production > builds), so a follow-up patch would be appreciated. No problem. Do it right away. Thanks, Wei > Jan > >