[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvm: Rename injection_pending() to event_injection_faulted().



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172226916 0
# Node ID e8470a1a01afe85e3dcdf42cfa149b09a06c0653
# Parent  8407279d3751ff27e7f1826298c9adb2c46d71de
hvm: Rename injection_pending() to event_injection_faulted().
Fix the VMX and SVM handlers to reflect the new semantics (which is
what is actually required by the one caller, in shadow fault path).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c     |   10 +++++-----
 xen/arch/x86/hvm/vmx/vmx.c     |    8 +++-----
 xen/arch/x86/mm/shadow/multi.c |    2 +-
 xen/include/asm-x86/hvm/hvm.h  |    8 ++++----
 4 files changed, 13 insertions(+), 15 deletions(-)

diff -r 8407279d3751 -r e8470a1a01af xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Thu Feb 22 21:32:17 2007 -0800
+++ b/xen/arch/x86/hvm/svm/svm.c        Fri Feb 23 10:35:16 2007 +0000
@@ -982,10 +982,10 @@ static void svm_hvm_inject_exception(
         v->arch.hvm_svm.vmcb->cr2 = v->arch.hvm_svm.cpu_cr2 = cr2;
 }
 
-static int svm_injection_pending(struct vcpu *v)
-{
-    struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
-    return (vmcb->vintr.fields.irq || vmcb->exitintinfo.fields.v);
+static int svm_event_injection_faulted(struct vcpu *v)
+{
+    struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
+    return vmcb->exitintinfo.fields.v;
 }
 
 int start_svm(void)
@@ -1064,7 +1064,7 @@ int start_svm(void)
     hvm_funcs.init_ap_context = svm_init_ap_context;
     hvm_funcs.init_hypercall_page = svm_init_hypercall_page;
 
-    hvm_funcs.injection_pending = svm_injection_pending;
+    hvm_funcs.event_injection_faulted = svm_event_injection_faulted;
 
     hvm_enable();
 
diff -r 8407279d3751 -r e8470a1a01af xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Feb 22 21:32:17 2007 -0800
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Fri Feb 23 10:35:16 2007 +0000
@@ -990,16 +990,14 @@ static void vmx_update_vtpr(struct vcpu 
     /* VMX doesn't have a V_TPR field */
 }
 
-static int vmx_injection_pending(struct vcpu *v)
+static int vmx_event_injection_faulted(struct vcpu *v)
 {
     unsigned int idtv_info_field;
 
     ASSERT(v == current);
 
     idtv_info_field = __vmread(IDT_VECTORING_INFO_FIELD);
-
-    return (v->arch.hvm_vmx.vector_injected ||
-            (idtv_info_field & INTR_INFO_VALID_MASK));
+    return (idtv_info_field & INTR_INFO_VALID_MASK);
 }
 
 /* Setup HVM interfaces */
@@ -1038,7 +1036,7 @@ static void vmx_setup_hvm_funcs(void)
 
     hvm_funcs.init_hypercall_page = vmx_init_hypercall_page;
 
-    hvm_funcs.injection_pending = vmx_injection_pending;
+    hvm_funcs.event_injection_faulted = vmx_event_injection_faulted;
 }
 
 int start_vmx(void)
diff -r 8407279d3751 -r e8470a1a01af xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Thu Feb 22 21:32:17 2007 -0800
+++ b/xen/arch/x86/mm/shadow/multi.c    Fri Feb 23 10:35:16 2007 +0000
@@ -2909,7 +2909,7 @@ static int sh_page_fault(struct vcpu *v,
          * stack is currently considered to be a page table, so we should
          * unshadow the faulting page before exiting.
          */
-        if ( unlikely(hvm_injection_pending(v)) )
+        if ( unlikely(hvm_event_injection_faulted(v)) )
         {
             gdprintk(XENLOG_DEBUG, "write to pagetable during event "
                      "injection: cr2=%#lx, mfn=%#lx\n", 
diff -r 8407279d3751 -r e8470a1a01af xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h     Thu Feb 22 21:32:17 2007 -0800
+++ b/xen/include/asm-x86/hvm/hvm.h     Fri Feb 23 10:35:16 2007 +0000
@@ -135,7 +135,7 @@ struct hvm_function_table {
 
     void (*init_hypercall_page)(struct domain *d, void *hypercall_page);
 
-    int  (*injection_pending)(struct vcpu *v);
+    int  (*event_injection_faulted)(struct vcpu *v);
 };
 
 extern struct hvm_function_table hvm_funcs;
@@ -264,9 +264,9 @@ hvm_inject_exception(unsigned int trapnr
 
 int hvm_bringup_ap(int vcpuid, int trampoline_vector);
 
-static inline int hvm_injection_pending(struct vcpu *v)
-{
-    return hvm_funcs.injection_pending(v);
+static inline int hvm_event_injection_faulted(struct vcpu *v)
+{
+    return hvm_funcs.event_injection_faulted(v);
 }
 
 #endif /* __ASM_X86_HVM_HVM_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.