xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Eddie Dong <eddie.dong@intel.com>
To: Tim.Deegan@citrix.com
Cc: xen-devel@lists.xensource.com
Subject: [PATCH 01 of 20] pre-cleanup1: Extend nhvm_vmcx_guest_intercepts_trap to include errcode to
Date: Thu, 02 Jun 2011 16:57:14 +0800	[thread overview]
Message-ID: <332616c43f52f85893f4.1307005034@nest-wsm.los-vmm.org> (raw)
In-Reply-To: <patchbomb.1307005033@nest-wsm.los-vmm.org>

# HG changeset patch
# User Eddie Dong <eddie.dong@intel.com>
# Date 1307003600 -28800
# Node ID 332616c43f52f85893f41537e9e6324a3fa01a57
# Parent  0c446850d85e654dfde039a0a1a5acd4e6b3c278
pre-cleanup1: Extend nhvm_vmcx_guest_intercepts_trap to include errcode to
assist decision of TRAP_page_fault in VMX.

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>

diff -r 0c446850d85e -r 332616c43f52 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Wed May 11 12:58:04 2011 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Thu Jun 02 16:33:20 2011 +0800
@@ -1152,7 +1152,7 @@ void hvm_inject_exception(unsigned int t
         return;
     }
 
-    if ( nhvm_vmcx_guest_intercepts_trap(v, trapnr) )
+    if ( nhvm_vmcx_guest_intercepts_trap(v, trapnr, errcode) )
     {
         enum nestedhvm_vmexits nsret;
 
@@ -4175,10 +4175,10 @@ uint32_t nhvm_vcpu_asid(struct vcpu *v)
     return -EOPNOTSUPP;
 }
 
-int nhvm_vmcx_guest_intercepts_trap(struct vcpu *v, unsigned int trap)
+int nhvm_vmcx_guest_intercepts_trap(struct vcpu *v, unsigned int trap, int errcode)
 {
     if (hvm_funcs.nhvm_vmcx_guest_intercepts_trap)
-        return hvm_funcs.nhvm_vmcx_guest_intercepts_trap(v, trap);
+        return hvm_funcs.nhvm_vmcx_guest_intercepts_trap(v, trap, errcode);
     return -EOPNOTSUPP;
 }
 
diff -r 0c446850d85e -r 332616c43f52 xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c	Wed May 11 12:58:04 2011 +0100
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c	Thu Jun 02 16:33:20 2011 +0800
@@ -895,7 +895,7 @@ nsvm_vmcb_guest_intercepts_exitcode(stru
 }
 
 int
-nsvm_vmcb_guest_intercepts_trap(struct vcpu *v, unsigned int trapnr)
+nsvm_vmcb_guest_intercepts_trap(struct vcpu *v, unsigned int trapnr, int errcode)
 {
     return nsvm_vmcb_guest_intercepts_exitcode(v,
         guest_cpu_user_regs(), VMEXIT_EXCEPTION_DE + trapnr);
diff -r 0c446850d85e -r 332616c43f52 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Wed May 11 12:58:04 2011 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Thu Jun 02 16:33:20 2011 +0800
@@ -164,7 +164,8 @@ struct hvm_function_table {
     uint64_t (*nhvm_vcpu_guestcr3)(struct vcpu *v);
     uint64_t (*nhvm_vcpu_hostcr3)(struct vcpu *v);
     uint32_t (*nhvm_vcpu_asid)(struct vcpu *v);
-    int (*nhvm_vmcx_guest_intercepts_trap)(struct vcpu *v, unsigned int trapnr);
+    int (*nhvm_vmcx_guest_intercepts_trap)(struct vcpu *v, 
+                               unsigned int trapnr, int errcode);
 
     bool_t (*nhvm_vmcx_hap_enabled)(struct vcpu *v);
 
@@ -443,7 +444,8 @@ uint64_t nhvm_vcpu_hostcr3(struct vcpu *
 uint32_t nhvm_vcpu_asid(struct vcpu *v);
 
 /* returns true, when l1 guest intercepts the specified trap */
-int nhvm_vmcx_guest_intercepts_trap(struct vcpu *v, unsigned int trapnr);
+int nhvm_vmcx_guest_intercepts_trap(struct vcpu *v, 
+                                    unsigned int trapnr, int errcode);
 
 /* returns true when l1 guest wants to use hap to run l2 guest */
 bool_t nhvm_vmcx_hap_enabled(struct vcpu *v);
diff -r 0c446850d85e -r 332616c43f52 xen/include/asm-x86/hvm/svm/nestedsvm.h
--- a/xen/include/asm-x86/hvm/svm/nestedsvm.h	Wed May 11 12:58:04 2011 +0100
+++ b/xen/include/asm-x86/hvm/svm/nestedsvm.h	Thu Jun 02 16:33:20 2011 +0800
@@ -114,7 +114,8 @@ uint64_t nsvm_vcpu_hostcr3(struct vcpu *
 uint32_t nsvm_vcpu_asid(struct vcpu *v);
 int nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
     struct cpu_user_regs *regs, uint64_t exitcode);
-int nsvm_vmcb_guest_intercepts_trap(struct vcpu *v, unsigned int trapnr);
+int nsvm_vmcb_guest_intercepts_trap(struct vcpu *v, unsigned int trapnr,
+                                    int errcode);
 bool_t nsvm_vmcb_hap_enabled(struct vcpu *v);
 enum hvm_intblk nsvm_intr_blocked(struct vcpu *v);

  reply	other threads:[~2011-06-02  8:57 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02  8:57 [PATCH 00 of 20] NestedVMX support Eddie Dong
2011-06-02  8:57 ` Eddie Dong [this message]
2011-06-02  8:57 ` [PATCH 02 of 20] pre-cleanup2: Move IDT_VECTORING processing code out of intr_assist Eddie Dong
2011-06-02  8:57 ` [PATCH 03 of 20] Add data structure for nestedvmx Eddie Dong
2011-06-02  8:57 ` [PATCH 04 of 20] Add APIs for nestedhvm_ops Eddie Dong
2011-06-02  8:57 ` [PATCH 05 of 20] Emulation of guest VMXON/OFF instruction Eddie Dong
2011-06-02 14:36   ` Tim Deegan
2011-06-03  5:54     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 06 of 20] Define structure and access APIs for virtual VMCS Eddie Dong
2011-06-02  8:57 ` [PATCH 07 of 20] Emulation of guest vmptrld Eddie Dong
2011-06-02 14:45   ` Tim Deegan
2011-06-03  6:07     ` Dong, Eddie
2011-06-03  8:42       ` Tim Deegan
2011-06-07  1:48         ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 08 of 20] Emulation of guest VMPTRST Eddie Dong
2011-06-02  8:57 ` [PATCH 09 of 20] Emulation of guest VMCLEAR Eddie Dong
2011-06-02  8:57 ` [PATCH 10 of 20] Emulation of guest VMWRITE Eddie Dong
2011-06-02  8:57 ` [PATCH 11 of 20] Emulation of guest VMREAD Eddie Dong
2011-06-02  8:57 ` [PATCH 12 of 20] Add APIs to switch n1/n2 VMCS Eddie Dong
2011-06-02 14:50   ` Tim Deegan
2011-06-03  7:30     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 13 of 20] Emulation of VMRESUME/VMLAUNCH Eddie Dong
2011-06-02  8:57 ` [PATCH 14 of 20] Extend VMCS control fields for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 15 of 20] Switch shadow/virtual VMCS between n1/n2 guests Eddie Dong
2011-06-02 14:56   ` Tim Deegan
2011-06-03  7:57     ` Dong, Eddie
2011-06-02 14:58   ` Tim Deegan
2011-06-02  8:57 ` [PATCH 16 of 20] interrupt/exception handling for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 17 of 20] VM exit handler of n2-guest Eddie Dong
2011-06-02 14:59   ` Tim Deegan
2011-06-03  8:06     ` Dong, Eddie
2011-06-03  8:43       ` Tim Deegan
2011-06-02  8:57 ` [PATCH 18 of 20] Lazy FPU for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 19 of 20] Add VMXE bits in virtual CR4 Eddie Dong
2011-06-02 15:01   ` Tim Deegan
2011-06-03  8:12     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 20 of 20] n2 MSR handling and capability exposure Eddie Dong
2011-06-02 15:07   ` Tim Deegan
2011-06-02 15:11     ` Tim Deegan
2011-06-02 19:20       ` Keir Fraser
2011-06-03  8:39       ` Dong, Eddie
2011-06-03  8:25     ` Dong, Eddie
2011-06-02 14:33 ` [PATCH 00 of 20] NestedVMX support Tim Deegan
2011-06-03  5:47   ` Dong, Eddie
  -- strict thread matches above, loose matches on Subject: below --
2011-06-09  8:25 [PATCH 00 of 20] Rebased Nested VMX v2 Eddie Dong
2011-06-09  8:25 ` [PATCH 01 of 20] pre-cleanup1: Extend nhvm_vmcx_guest_intercepts_trap to include errcode to Eddie Dong
2011-06-09  9:46   ` Christoph Egger

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=332616c43f52f85893f4.1307005034@nest-wsm.los-vmm.org \
    --to=eddie.dong@intel.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=xen-devel@lists.xensource.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).