[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] RIP register value in p2m_mem_access_check()



>>> On 07.03.13 at 17:49, Tim Deegan <tim@xxxxxxx> wrote:
> At 14:33 +0000 on 06 Mar (1362580383), Jan Beulich wrote:
>> >>> On 06.03.13 at 14:49, Razvan Cojocaru <rzvncj@xxxxxxxxx> 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.
> 
> I don't think so -- v->arch.user_regs is only brought up to date during
> context switches.  For the currently running vcpu you should be looking
> at guest_cpu_user_regs().

Oh, of course, yes - I was mixing them up quite badly. Sorry
for that.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.