All of lore.kernel.org
 help / color / mirror / Atom feed
* EIP, xc_domain_hvm_getcontext_partial() and page fault events
@ 2013-03-05 14:30 Razvan Cojocaru
  0 siblings, 0 replies; only message in thread
From: Razvan Cojocaru @ 2013-03-05 14:30 UTC (permalink / raw)
  To: xen-devel@lists.xen.org

Hello,

I'm using page fault mem_events from dom0 userspace. When I receive one 
such mem_event, I'm retrieving register values for the VCPU that has 
caused it, using xc_domain_hvm_getcontext_partial().

At the same time, I'm printing out v->arch.user_regs.eip from 
p2m_mem_access_check() in arch/x86/mm/p2m.c, and I'm noticing that the 
EIP value I'm getting from xc_domain_hvm_getcontext_partial() is less 
than the EIP value stored in v->arch.user_regs.eip. This, I assume, can 
be explained by the fact that in p2m_mem_access_check() EIP points to 
the instruction _after_ the instruction that caused the page fault, and 
it's being rewound by the time I query it from dom0 userspace.

Now, what I am after is a way to get the "proper", rewound, EIP (and the 
rest of the registers from when EIP was _before_ the fault instruction) 
in p2m_mem_access_check(). Is there a way to achieve this?


Thanks,
Razvan Cojocaru

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-05 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 14:30 EIP, xc_domain_hvm_getcontext_partial() and page fault events Razvan Cojocaru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.