From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: potential bug where mem_event_request_t gfn value == -1? Date: Mon, 9 Jan 2012 10:02:29 +0000 Message-ID: <20120109100229.GD26595@ocelot.phlegethon.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Bob Jung Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 20:49 +0000 on 06 Jan (1325882993), Bob Jung wrote: > > Hi there, > > I am running an adapted version of tools/tests/xen_access/xen_access.c to get and respond to memory events to do some analysis. Anyways, after registering for and receiving single stepping events in my ring buffer where the me_event_request_t's reason field == MEM_EVENT_REASON_SINGLESTEP, I sometimes see that the gfn in the request is -1. > > the guest is HVM windows 32 bit. For 99.99% of the single step traps the req.gfn value is the correct guest frame number value, but every now and again I get a -1 > > Does anyone know why this could happen? If could happen if the VA in %rip at the time isn't mapped to anything in the guest's pagetables (for example, if the guest is demand-paging the program that's running). You should be able to test this by looking at the valie if %rip returned in the gla field. There's some pagetable-walking code in tools/libxc/xc_pagetab.c Cheers, Tim.