From: "Jan Beulich" Subject: Re: [v3][PATCH 03/16] xen/vtd: create RMRR mapping Date: Wed, 17 Jun 2015 11:03:41 +0100 Message-ID: <5581621D020000780008603A@mail.emea.novell.com> References: <1433985325-16676-1-git-send-email-tiejun.chen@intel.com> <1433985325-16676-4-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433985325-16676-4-git-send-email-tiejun.chen@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: Tiejun Chen Cc: yang.z.zhang@intel.com, andrew.cooper3@citrix.com, kevin.tian@intel.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 11.06.15 at 03:15, wrote: > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -927,10 +927,16 @@ int set_identity_p2m_entry(struct domain *d, unsigned long gfn, > } > > gfn_unlock(p2m, gfn, 0); > - return ret; > } > + else > + ret = 0; > > - return 0; > + if( ret == 0 ) > + { > + ret = iommu_map_page(d, gfn, gfn, IOMMUF_readable|IOMMUF_writable); > + } Pointless braces and missing blank in the if() statement. I also think this should be added right when the function gets introduced. Jan