From: Tim Deegan Subject: Re: [PATCH] Backport fixes to PoD codepaths related to 1GiB pages Date: Thu, 15 Dec 2011 10:35:08 +0000 Message-ID: <20111215103508.GA4274@ocelot.phlegethon.org> References: <3ab01c6cd13fcaaa0d25.1322744193@elijah> <4EE9CD3602000078000680F3@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4EE9CD3602000078000680F3@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org At 09:34 +0000 on 15 Dec (1323941670), Jan Beulich wrote: > Should this get applied? Yes. I thought it already had my Ack, but if not: Ack. Tim > >>> On 01.12.11 at 13:56, George Dunlap wrote: > > Backport of xen-unstable.hg c/s 24189:7da681c490e0 to xen-4.1-testing > > > > The codepaths in p2m_gfn_to_mfn() and p2m_gfn_to_mfn_current() should > > call p2m_pod_check_and_popualte(), as the 2MiB and 4k codepaths do. > > This properly grabs the p2m lock. > > > > Also, p2m_pod_demand_populate() shouldn't call p2m_unlock(), as it > > didn't grab the lock in the first place. > > > > Signed-off-by: Andres Lagar-Cavilla > > Signed-off-by: George Dunlap > > > > diff -r c613d436ca09 -r 3ab01c6cd13f xen/arch/x86/mm/p2m.c > > --- a/xen/arch/x86/mm/p2m.c Tue Nov 22 19:03:04 2011 +0000 > > +++ b/xen/arch/x86/mm/p2m.c Thu Dec 01 12:56:18 2011 +0000 > > @@ -1244,7 +1244,6 @@ p2m_pod_demand_populate(struct p2m_domai > > set_p2m_entry(p2m, gfn_aligned, _mfn(POPULATE_ON_DEMAND_MFN), 9, > > p2m_populate_on_demand, p2m->default_access); > > audit_p2m(p2m, 1); > > - p2m_unlock(p2m); > > return 0; > > } > > > > @@ -1602,7 +1601,8 @@ pod_retry_l3: > > { > > if ( q != p2m_query ) > > { > > - if ( !p2m_pod_demand_populate(p2m, gfn, 18, q) ) > > + if ( !p2m_pod_check_and_populate(p2m, gfn, > > + (l1_pgentry_t *) &l3e, 18, q) ) > > goto pod_retry_l3; > > } > > else > > @@ -1733,7 +1733,8 @@ static mfn_t p2m_gfn_to_mfn_current(stru > > /* The read has succeeded, so we know that mapping exists > > */ > > if ( q != p2m_query ) > > { > > - if ( !p2m_pod_demand_populate(p2m, gfn, 18, q) ) > > + if ( !p2m_pod_check_and_populate(p2m, gfn, > > + (l1_pgentry_t *) &l3e, 18, q) ) > > goto pod_retry_l3; > > p2mt = p2m_invalid; > > printk("%s: Allocate 1GB failed!\n", __func__); > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > >