From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v3 2/4] libxc: support of linear p2m list for migration of pv-domains Date: Wed, 6 Jan 2016 15:40:09 +0000 Message-ID: <20160106154009.GJ27789@citrix.com> References: <1450257860-11389-1-git-send-email-jgross@suse.com> <1450257860-11389-3-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1450257860-11389-3-git-send-email-jgross@suse.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: Juergen Gross Cc: wei.liu2@citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Dec 16, 2015 at 10:24:18AM +0100, Juergen Gross wrote: [...] > @@ -698,21 +868,19 @@ static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src, > /* 32bit guests can only use the first 4 entries of their L3 tables. > * All other are potentially used by Xen. */ > xen_first = 4; > - xen_last = 512; > + xen_last = 511; Is this a bug fix in its own right? Wei. > break; > > case XEN_DOMCTL_PFINFO_L2TAB: > /* It is hard to spot Xen mappings in a 32bit guest's L2. Most > * are normal but only a few will have Xen mappings. > - * > - * 428 = (HYPERVISOR_VIRT_START_PAE >> L2_PAGETABLE_SHIFT_PAE)&0x1ff > - * > - * ...which is conveniently unavailable to us in a 64bit build. > */ > - if ( pte_to_frame(src[428]) == ctx->x86_pv.compat_m2p_mfn0 ) > + i = (HYPERVISOR_VIRT_START_X86_32 >> L2_PAGETABLE_SHIFT_PAE) & 511; > + if ( pte_to_frame(src[i]) == ctx->x86_pv.compat_m2p_mfn0 ) > { > - xen_first = 428; > - xen_last = 512; > + xen_first = i; > + xen_last = (HYPERVISOR_VIRT_END_X86_32 >> > + L2_PAGETABLE_SHIFT_PAE) & 511; > } > break; > } > -- > 2.6.2 >