From: Xudong Hao <xudong.hao@intel.com>
To: Ian.Jackson@eu.citrix.com
Cc: eddie.dong@intel.com, aravindh@virtuata.com,
Xudong Hao <xudong.hao@intel.com>,
xen-devel@lists.xen.org, keir.xen@gmail.com, JBeulich@suse.com,
Xiantao Zhang <xiantao.zhang@intel.com>
Subject: [PATCH 3/3] libxc: add instruction length for inject trap in userspace
Date: Fri, 25 May 2012 03:07:34 +0800 [thread overview]
Message-ID: <1337886454-2400-1-git-send-email-xudong.hao@intel.com> (raw)
Add a parameter to represent instruction length in function
xc_hvm_inject_trap(), user should set this value when this
function is called.
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
tools/libxc/xc_misc.c | 5 +++--
tools/libxc/xenctrl.h | 4 ++--
tools/tests/xen-access/xen-access.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index a029d79..2989a62 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -602,8 +602,8 @@ int xc_hvm_get_mem_access(
}
int xc_hvm_inject_trap(
- xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t error_code,
- uint64_t cr2)
+ xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t inslen,
+ uint32_t error_code, uint64_t cr2)
{
DECLARE_HYPERCALL;
DECLARE_HYPERCALL_BUFFER(struct xen_hvm_inject_trap, arg);
@@ -619,6 +619,7 @@ int xc_hvm_inject_trap(
arg->domid = dom;
arg->vcpuid = vcpu;
arg->trap = trap;
+ arg->inslen = inslen;
arg->error_code = error_code;
arg->cr2 = cr2;
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 3bbc827..7ed4c64 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1578,8 +1578,8 @@ int xc_hvm_get_mem_access(
* resumes.
*/
int xc_hvm_inject_trap(
- xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t error_code,
- uint64_t cr2);
+ xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t inslen,
+ uint32_t error_code, uint64_t cr2);
/*
* LOGGING AND ERROR REPORTING
diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c
index 906f46f..98332b0 100644
--- a/tools/tests/xen-access/xen-access.c
+++ b/tools/tests/xen-access/xen-access.c
@@ -662,7 +662,7 @@ int main(int argc, char *argv[])
req.vcpu_id);
/* Reinject */
- rc = xc_hvm_inject_trap(xch, domain_id, req.vcpu_id, 3, -1, 0);
+ rc = xc_hvm_inject_trap(xch, domain_id, req.vcpu_id, 3, 1, -1, 0);
if (rc < 0)
{
ERROR("Error %d injecting int3\n", rc);
--
1.5.5
reply other threads:[~2012-05-24 19:07 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=1337886454-2400-1-git-send-email-xudong.hao@intel.com \
--to=xudong.hao@intel.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=aravindh@virtuata.com \
--cc=eddie.dong@intel.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xen.org \
--cc=xiantao.zhang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).