All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rzvncj@gmail.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: EIP, xc_domain_hvm_getcontext_partial() and page fault events
Date: Tue, 05 Mar 2013 16:30:18 +0200	[thread overview]
Message-ID: <5136017A.50004@gmail.com> (raw)

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

                 reply	other threads:[~2013-03-05 14:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5136017A.50004@gmail.com \
    --to=rzvncj@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.