From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: dom0 pvops crash Date: Mon, 8 Feb 2010 10:06:17 +0200 Message-ID: <20100208080617.GM2861@reaktio.net> References: <4B5DF8E5.9040906@goop.org> <1264613173.16526.97718.camel@zakaz.uk.xensource.com> <20100207193517.GJ2861@reaktio.net> <1265578978.2938.3.camel@localhost.localdomain> <1265581335.658.2.camel@agari.van.xensource.com> <20100208074140.GL2861@reaktio.net> <1265615222.2938.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1265615222.2938.4.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Ian Jackson , Keir Fraser , Daniel Stodden List-Id: xen-devel@lists.xenproject.org On Mon, Feb 08, 2010 at 07:47:02AM +0000, Ian Campbell wrote: > On Mon, 2010-02-08 at 07:41 +0000, Pasi K=E4rkk=E4inen wrote:=20 > > On Sun, Feb 07, 2010 at 02:22:15PM -0800, Daniel Stodden wrote: > > > On Sun, 2010-02-07 at 16:42 -0500, Ian Campbell wrote: > > > > 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, unsigned 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 functi= on 'is_xen_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 fr= om any header.. > > > >=20 > > > > IIRC on some kernels it was called just xen_domain(), I'm not sur= e but I > > > > think my patch was against plain 2.6.32. I think the function (wh= atever > > > > it is called) also moved around in the headers recently. > > >=20 > > > is_running_on_xen() > > >=20 > >=20 > > I'm using kernel.org 2.6.32.7, and I can't find is_running_on_xen() e= ither. >=20 > 2.6.32.7 has xen_domain() defined in include/xen/xen.h. Probably > xen_pv_domain() is the correct check though. >=20 # grep xen_domain include/xen/xen.h grep: include/xen/xen.h: No such file or directory # grep xen_domain include/xen/interface/xen.h typedef uint8_t xen_domain_handle_t[16]; # ls include/xen events.h features.h hvc-console.h Kbuild xenbus.h xen-ops.h evtchn.h grant_table.h interface page.h xencomm.h # grep xen_domain include/xen/* # # grep xen_domain include/xen/interface/* include/xen/interface/xen.h:typedef uint8_t xen_domain_handle_t[16]; # -- Pasi