xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Xudong Hao <xudong.hao@intel.com>
To: JBeulich@suse.com, keir.xen@gmail.com
Cc: aravindh@virtuata.com, eddie.dong@intel.com,
	xen-devel@lists.xen.org, Xudong Hao <xudong.hao@intel.com>,
	Ian.Jackson@eu.citrix.com,
	Xiantao Zhang <xiantao.zhang@intel.com>
Subject: [PATCH v2 3/4] xen: Add instruction length parameter in hypercall HVMOP_inject_trap
Date: Wed, 30 May 2012 10:35:47 +0800	[thread overview]
Message-ID: <1338345347-22433-4-git-send-email-xudong.hao@intel.com> (raw)
In-Reply-To: <1338345347-22433-1-git-send-email-xudong.hao@intel.com>

Add parameter inslen for hypercall HVMOP_inject_trap, supply interface used by
passing instruction length from userspace.

Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 xen/arch/x86/hvm/hvm.c          |    1 +
 xen/include/public/hvm/hvm_op.h |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index f3c87bc..2921e9e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4290,6 +4290,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
         else 
         {
             v->arch.hvm_vcpu.inject_trap.vector = tr.trap;
+            v->arch.hvm_vcpu.inject_trap.inslen = tr.inslen;
             v->arch.hvm_vcpu.inject_trap.error_code = tr.error_code;
             v->arch.hvm_vcpu.inject_trap.cr2 = tr.cr2;
         }
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index 6a78f75..4eccc85 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -221,6 +221,8 @@ struct xen_hvm_inject_trap {
     uint32_t trap;
     /* Error code, or -1 to skip */
     uint32_t error_code;
+    /* Intruction length */
+    uint32_t inslen;
     /* CR2 for page faults */
     uint64_aligned_t cr2;
 };
-- 
1.5.5

  parent reply	other threads:[~2012-05-30  2:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30  2:35 [PATCH v2 0/4] XEN: fix vmx exception mistake Xudong Hao
2012-05-30  2:35 ` [PATCH v2 1/4] xen: Define new struct hvm_trap and cleanup vmx exception Xudong Hao
2012-05-30  2:35 ` [PATCH v2 2/4] VMX: Fix the mistake of exception execution Xudong Hao
2012-05-30  9:18   ` Jan Beulich
2012-05-30 11:24     ` Hao, Xudong
2012-05-30  2:35 ` Xudong Hao [this message]
2012-05-30  9:19   ` [PATCH v2 3/4] xen: Add instruction length parameter in hypercall HVMOP_inject_trap Jan Beulich
2012-05-30 10:40 ` [PATCH v2 0/4] XEN: fix vmx exception mistake Keir Fraser
2012-05-30 11:16   ` Hao, Xudong
2012-05-30 12:21     ` Keir Fraser
2012-05-31  2:00       ` Hao, Xudong
2012-05-31 23:21         ` Aravindh Puthiyaparambil
2012-06-01  0:46           ` Hao, Xudong

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=1338345347-22433-4-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).