From: Tim Deegan Subject: Re: [xen-unstable test] 56456: regressions - FAIL Date: Tue, 19 May 2015 11:20:34 +0100 Message-ID: <20150519102034.GD12275@deinos.phlegethon.org> References: <55572DDC.8050306@citrix.com> <5559C03C020000780007AF3A@mail.emea.novell.com> <20150518101759.GA94471@deinos.phlegethon.org> <5559C40A.2020106@citrix.com> <5559E6E2020000780007B02C@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yuede-0002Lq-JI for xen-devel@lists.xenproject.org; Tue, 19 May 2015 10:20:42 +0000 Content-Disposition: inline In-Reply-To: <5559E6E2020000780007B02C@mail.emea.novell.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: Jan Beulich Cc: AndrewCooper , ian.jackson@eu.citrix.com, xen-devel , Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org At 12:19 +0100 on 18 May (1431951570), Jan Beulich wrote: > >>> On 18.05.15 at 12:50, wrote: > > El 18/05/15 a les 12.17, Tim Deegan ha escrit: > >> - have map_dirty_bitmap() DTRT, with something like access_ok() + > >> a linear-pagetable lookup to find the frame. > > > > That was my first intention, but AFAICT we have no function in tree to > > resolve a PV guest VA into a GFN/MFN. The closest thing I could find was > > using guest_walk_tables + guest_walk_to_gfn in order to obtain the gfn. > > Should I send a patch to introduce a pv_gva_to_gfn function based on that? > > Isn't that what we have the linear page table and guest_map_l1e() > for? Yes, or in this case guest_get_eff_l1e(). We'd want to make sure we get_page() the underlying page as well to guard against it being freed and reused while we have a mapping. That won't check user/supervisor or write permissions in the upper levels of the tree. OTOH, __copy_to_user() doesn't either, so maybe we don't care. Jan, if you're happy with that then so am I. Cheers, Tim.