From: "Jan Beulich" Subject: Re: [RFC v2 15/15] Add a command line parameter for VT-d posted-interrupts Date: Wed, 10 Jun 2015 07:52:27 +0100 Message-ID: <5577FACB0200007800082E34@mail.emea.novell.com> References: <1431076038-7497-1-git-send-email-feng.wu@intel.com> <1431076038-7497-16-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431076038-7497-16-git-send-email-feng.wu@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Feng Wu Cc: kevin.tian@intel.com, keir@xen.org, george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 08.05.15 at 11:07, wrote: > @@ -101,6 +101,12 @@ static void __init parse_iommu_param(char *s) > if ( iommu_intremap == 0 ) > iommu_intpost = 0; > } > + else if ( !strcmp(s, "intpost") ) > + { > + iommu_intpost = val; > + if ( iommu_intremap == 0 ) > + iommu_intpost = 0; > + } This again highlights that you shouldn't be (repeatedly) doing the "if no intremap then no intpost" here and elsewhere. Just do this in one or two central places (two in case intremap getting cleared requires intpost to be cleared in turn, while also requiring the connection to be represented correctly before starting IOMMU setup). Jan