From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= Subject: Re: [xen-unstable test] 56456: regressions - FAIL Date: Mon, 18 May 2015 12:50:50 +0200 Message-ID: <5559C40A.2020106@citrix.com> References: <55572DDC.8050306@citrix.com> <5559C03C020000780007AF3A@mail.emea.novell.com> <20150518101759.GA94471@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YuJNd-0000OY-0b for xen-devel@lists.xenproject.org; Mon, 18 May 2015 11:38:45 +0000 In-Reply-To: <20150518101759.GA94471@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , Jan Beulich Cc: AndrewCooper , ian.jackson@eu.citrix.com, xen-devel List-Id: xen-devel@lists.xenproject.org El 18/05/15 a les 12.17, Tim Deegan ha escrit: > At 09:34 +0100 on 18 May (1431941676), Jan Beulich wrote: >>>>> On 16.05.15 at 13:45, wrote: >>> El 16/05/15 a les 10.51, osstest service user ha escrit: >>>> flight 56456 xen-unstable real [real] >>>> http://logs.test-lab.xenproject.org/osstest/logs/56456/ >>>> >>>> Regressions :-( >>> >>> This is my fault, paging_gva_to_gfn cannot be used to translate a PV >>> guest VA to a GFN. The patch above restores the previous path for PV >>> callers. >> >> While Tim would have the final say, I certainly would prefer to revert >> the offending patch and then apply a correct new version in its stead >> in this case (where the fix is not a simple, few lines change). > > I would be OK with a follow-up fix here, but I'm not convinced that > this is it. > > In particular, paging_mode_enabled() should be true for any PV domain > that's in log-dirty mode, so presumably the failure is only for lgd > ops on VMs that don't have lgd enabled. So maybe we can either: > - return an error for that case (but we'd want to understand how we > got there first); or The error is caused because we are trying to use paging_gva_to_gfn against a Dom0 VA, which is a PV guest. gva_to_gfn is set to sh_gva_to_gfn for a PV Dom0, but calling vtlb_lookup against a PV guest crashes Xen because the paging structures are not populated. > - 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? Thanks, Roger.