From: Razvan Cojocaru <rzvncj@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: RIP register value in p2m_mem_access_check()
Date: Wed, 06 Mar 2013 15:49:01 +0200 [thread overview]
Message-ID: <5137494D.7010901@gmail.com> (raw)
In-Reply-To: <5137512C02000078000C394B@nat28.tlf.novell.com>
> 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 then launched my guest VM, and tested it with the xen-access tool from
tools/tests/xen-access, which I've run like this (1 is the machine ID,
as printed out by 'sudo xm list'):
sudo ./xen-access 1 write
Here's what the hypervisor wrote (values that are different appear once
per each VCPU):
(XEN) HVM1: Booting from 0000:7c00
(XEN) v->arch.user_regs.eip: 0x00000000fc002de9,
__vmread(GUEST_RIP):0x0000000000007c17
(XEN) v->arch.user_regs.eip: 0x0000000000007c17,
__vmread(GUEST_RIP):0x0000000000000667
(XEN) v->arch.user_regs.eip: 0x0000000000000667,
__vmread(GUEST_RIP):0x0000000000000116
(XEN) v->arch.user_regs.eip: 0x0000000000000116,
__vmread(GUEST_RIP):0x0000000000000116
(XEN) v->arch.user_regs.eip: 0x0000000000000116,
__vmread(GUEST_RIP):0x00000000000005ab
(XEN) v->arch.user_regs.eip: 0x00000000000005ab,
__vmread(GUEST_RIP):0x00000000000001e7
(XEN) v->arch.user_regs.eip: 0x00000000000001e7,
__vmread(GUEST_RIP):0x00000000000001f3
(XEN) v->arch.user_regs.eip: 0x00000000000001f3,
__vmread(GUEST_RIP):0x0000000000000b71
(XEN) v->arch.user_regs.eip: 0x0000000000000b71,
__vmread(GUEST_RIP):0x0000000000000782
(XEN) v->arch.user_regs.eip: 0x0000000000000782,
__vmread(GUEST_RIP):0x0000000000000782
(XEN) v->arch.user_regs.eip: 0x0000000000000782,
__vmread(GUEST_RIP):0x0000000000000782
Not sure what's going on, but this time the only code I've added is the
printk(). Any thoughts?
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2013-03-06 13:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 10:55 RIP register value in p2m_mem_access_check() Razvan Cojocaru
2013-03-06 11:15 ` Jan Beulich
2013-03-06 11:35 ` Razvan Cojocaru
2013-03-06 13:22 ` Jan Beulich
2013-03-06 13:25 ` Razvan Cojocaru
2013-03-06 13:49 ` Razvan Cojocaru [this message]
2013-03-06 14:26 ` Razvan Cojocaru
2013-03-06 14:33 ` Jan Beulich
2013-03-06 14:47 ` Razvan Cojocaru
2013-03-07 16:49 ` Tim Deegan
2013-03-07 17:04 ` Jan Beulich
2013-03-07 17:31 ` Razvan Cojocaru
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=5137494D.7010901@gmail.com \
--to=rzvncj@gmail.com \
--cc=JBeulich@suse.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.