From: Tim Deegan Subject: Re: [v3][PATCH 00/16] Fix RMRR Date: Thu, 11 Jun 2015 13:52:00 +0100 Message-ID: <20150611125200.GC1818@deinos.phlegethon.org> References: <1433985325-16676-1-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1433985325-16676-1-git-send-email-tiejun.chen@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: Tiejun Chen Cc: kevin.tian@intel.com, wei.liu2@citrix.com, ian.campbell@citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org Hi, At 09:15 +0800 on 11 Jun (1434014109), Tiejun Chen wrote: > * Two changes for runtime cycle > patch #2,xen/x86/p2m: introduce set_identity_p2m_entry, on hypervisor side > > a>. Introduce paging_mode_translate() > Otherwise, we'll see this error when boot Xen/Dom0 Righto. Looking at the patch, it would be neater to have if ( !paging_mode_translate(p2m->domain) ) return 0; at the start, instead of indenting the whole body of the function in an inner scope. > b>. Actually we still need to use "mfn_x(mfn) == INVALID_MFN" to confirm > we're getting an invalid mfn. Can you give a concrete example of when this is needed? The code now looks like this: if ( p2mt == p2m_invalid || mfn_x(mfn) == INVALID_MFN ) ret = p2m_set_entry(p2m, gfn, _mfn(gfn), PAGE_ORDER_4K, p2m_mmio_direct, p2ma); which will catch any invalid-mfn mapping, including paged-out pages &c. I suspect the case you care about is the default p2m_mmio_dm type, which would be better handeld explicitly: if ( p2mt == p2m_invalid || p2mt == p2m_mmio_dm ) ... Cheers, Tim.