From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 2/3] xen/p2m: Using INVALID_MFN instead of mfn_valid Date: Thu, 16 Aug 2012 12:14:20 -0700 Message-ID: <20120816121420.5549f645@mantra.us.oracle.com> References: <1345013831-20662-1-git-send-email-xudong.hao@intel.com> <502B86420200007800095048@nat28.tlf.novell.com> <403610A45A2B5242BD291EDAE8B37D300FE8AA4F@SHSMSX102.ccr.corp.intel.com> <502CE3AB0200007800095686@nat28.tlf.novell.com> <403610A45A2B5242BD291EDAE8B37D300FE8AAC2@SHSMSX102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <403610A45A2B5242BD291EDAE8B37D300FE8AAC2@SHSMSX102.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Hao, Xudong" Cc: "tim@xen.org" , "Zhang, Xiantao" , Jan Beulich , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 16 Aug 2012 10:31:30 +0000 "Hao, Xudong" wrote: > > */ > > >> > - if ( mfn_valid(mfn_x(mfn)) && > > >> > + if ( (mfn_x(mfn) != INVALID_MFN) && > > >> > (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) ) > > >> > p2m->max_mapped_pfn = gfn + (1UL << order) - 1; > > >> BTW, here's the change in my PVH/hybrid tree that Tim D had suggested couple months ago: /* Track the highest gfn for which we have ever had a valid mapping */ - if ( mfn_valid(mfn_x(mfn)) && + if ( p2mt != p2m_invalid && p2mt != p2m_mmio_dm && (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) ) p2m->max_mapped_pfn = gfn + (1UL << order) - 1; thanks, Mukesh