[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/3] libxc: add instruction length for inject trap in userspace
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@xxxxxxxxx> Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |