From: Ian Campbell Subject: Re: libxc: correctly unmap pages after core-dumping a pv guest Date: Mon, 23 May 2011 13:46:23 +0100 Message-ID: <1306154783.20576.98.camel@zakaz.uk.xensource.com> References: <201105231342.28471.gross@univention.de> <201105231424.01099.gross@univention.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <201105231424.01099.gross@univention.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Markus =?ISO-8859-1?Q?Gro=DF?= Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2011-05-23 at 13:24 +0100, Markus Gro=C3=9F wrote: > I forgot to put [PATCH] in the subject, sorry about that. That doesn't matter too much (it just increases the chance of attracting a maintainers attention). What does matter though is that we need your Signed-off-by per the DCO, [0]. Please can you resend with that? Thanks! Ian. [0] http://lwn.net/Articles/437739/ >=20 > Am Montag 23 Mai 2011 13:42:28 schrieb Markus Gro=C3=9F: > > Hi, > >=20 > > while implementing core dumping functionality for the libxl driver > > of libvirt, I discovered an issue with mapping pages of a pv guest. > >=20 > > After dumping the core of a pv guest the domain was not cleared up > > properly and some pages were not unmapped. This issue is similar > > to the one reported here: > > http://lists.xensource.com/archives/html/xen-devel/2011-05/msg01314.h= tml > >=20 > > In xc_domain_dumpcore_via_callback in the file xc_core.c the function > > xc_core_arch_map_p2m is called to map P2M_FL_ENTRIES pages to the var= iable p2m. > > But to unmap the pages later, the dinfo->p2m_size has to be set accor= dingly. > > This was not done, instead a variable named p2m_size was set. > > This way P2M_FL_ENTRIES was always zero and the pages were left mappe= d. > >=20 > > The following patch fixes this. > >=20 > > Best regards, > > Markus > > =20 > > diff -r 7c7ef1b6f4e5 tools/libxc/xc_core.c > > --- a/tools/libxc/xc_core.c Tue Apr 26 14:11:18 2011 +0100 > > +++ b/tools/libxc/xc_core.c Mon May 23 13:36:23 2011 +0200 > > @@ -468,7 +468,6 @@ > > =20 > > int auto_translated_physmap; > > xen_pfn_t *p2m =3D NULL; > > - unsigned long p2m_size =3D 0; > > struct xen_dumpcore_p2m *p2m_array =3D NULL; > > =20 > > uint64_t *pfn_array =3D NULL; > > @@ -569,7 +568,7 @@ > > } > > =20 > > sts =3D xc_core_arch_map_p2m(xch, dinfo->guest_width, &info,= live_shinfo, > > - &p2m, &p2m_size); > > + &p2m, &dinfo->p2m_size); > > if ( sts !=3D 0 ) > > goto out; > > } > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel