From: "Jan Beulich" Subject: Re: RIP register value in p2m_mem_access_check() Date: Wed, 06 Mar 2013 14:33:03 +0000 Message-ID: <513761AF02000078000C39F0@nat28.tlf.novell.com> References: <5137208F.7000901@gmail.com> <5137335602000078000C3815@nat28.tlf.novell.com> <513729E8.2060007@gmail.com> <5137512C02000078000C394B@nat28.tlf.novell.com> <5137494D.7010901@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5137494D.7010901@gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 06.03.13 at 14:49, Razvan Cojocaru wrote: >> That wouldn't match your observation (the two values were >> much farther apart), unless a call or jump got emulated. >> >> Further, after emulation, the user_regs.eip value should be the >> canonical one. > > Well, I've downloaded and installed a fresh copy of Xen 4.2.0 from the > official website, and added the printk() to p2m.c (the only modification > I've done): > > 1311 req->vcpu_id = v->vcpu_id; > 1312 > 1313 printk("v->arch.user_regs.eip: 0x%016lx, > __vmread(GUEST_RIP):0x%016lx\n", > 1314 v->arch.user_regs.eip, __vmread(GUEST_RIP)); > 1315 } I know close to nothing about the paths that can lead here, and hence I can't assess whether expecting consistency at this point is valid. All I can tell is that right after VM exit (i.e. at the top of vmx_vmexit_handler()) the two values ought to be consistent. Jan