From: Ian Campbell Subject: Re: dom0 pvops crash Date: Sun, 7 Feb 2010 21:42:58 +0000 Message-ID: <1265578978.2938.3.camel@localhost.localdomain> References: <4B5DF8E5.9040906@goop.org> <1264613173.16526.97718.camel@zakaz.uk.xensource.com> <20100207193517.GJ2861@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100207193517.GJ2861@reaktio.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Pasi =?ISO-8859-1?Q?K=E4rkk=E4inen?= Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Ian Jackson , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Sun, 2010-02-07 at 19:35 +0000, Pasi K=E4rkk=E4inen wrote:=20 > On Wed, Jan 27, 2010 at 05:26:13PM +0000, Ian Campbell wrote: > > diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c > > index 65215ab..49f8e83 100644 > > --- a/arch/x86/mm/pgtable.c > > +++ b/arch/x86/mm/pgtable.c > > @@ -28,7 +28,10 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsi= gned long address) > > struct page *pte; > > =20 > > #ifdef CONFIG_HIGHPTE > > - pte =3D alloc_pages(PGALLOC_GFP | __GFP_HIGHMEM, 0); > > + if (is_xen_domain()) > > + pte =3D alloc_pages(PGALLOC_GFP, 0); > > + else > > + pte =3D alloc_pages(PGALLOC_GFP | __GFP_HIGHMEM, 0); > > #else > > pte =3D alloc_pages(PGALLOC_GFP, 0); > > #endif > >=20 >=20 > I just tried this patch, but it fails to compile: >=20 > arch/x86/mm/pgtable.c: In function 'pte_alloc_one': > arch/x86/mm/pgtable.c:19: error: implicit declaration of function 'is_x= en_domain' > make[2]: *** [arch/x86/mm/pgtable.o] Error 1 > make[1]: *** [arch/x86/mm] Error 2 > make: *** [arch/x86] Error 2 >=20 > I tried grepping around for that function but didn't find it from any h= eader.. IIRC on some kernels it was called just xen_domain(), I'm not sure but I think my patch was against plain 2.6.32. I think the function (whatever it is called) also moved around in the headers recently. For the purposes of testing you could just ignore the conditional part of the patch and simply drop the __GFP_HIGHMEM altogether. Ian.