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

[Xen-changelog] [xen-unstable] [IA64] Update PV-on-HVM to follow status of interrupt controller



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 251630d85510055157e8dc6a50cc7eb7de5893bf
# Parent  52e6bf6dc74435a101a5fa487601d556bd937a1d
[IA64] Update PV-on-HVM to follow status of interrupt controller

Follow-on to xen-unstable cangeset:
http://xenbits.xensource.com/xen-unstable.hg?cs=fe5ed694b0c2

    - Follow to change a method of interrupt handling in latest
      changeset.
    - Modify to change the spec of callback IRQ in hypervisor side.
    - Modify to follow status of interrupt mask register of virtual
      interupt controller.
    - Modify to deliver interupts to a CPU specified with virtual
      interrupt controller.

http://lists.xensource.com/archives/html/xen-ia64-devel/2006-11/msg00159.html

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/vmx/vlsapic.c     |   10 ++++++++--
 xen/arch/ia64/vmx/vmx_process.c |   18 +++++++++---------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff -r 52e6bf6dc744 -r 251630d85510 xen/arch/ia64/vmx/vlsapic.c
--- a/xen/arch/ia64/vmx/vlsapic.c       Thu Nov 30 15:57:15 2006 -0700
+++ b/xen/arch/ia64/vmx/vlsapic.c       Thu Nov 30 15:57:20 2006 -0700
@@ -103,8 +103,10 @@ static int vmx_vcpu_unpend_interrupt(VCP
     ret = test_and_clear_bit(vector, &VCPU(vcpu, irr[0]));
     local_irq_restore(spsr);
 
-    if (ret)
+    if (ret) {
         vcpu->arch.irq_new_pending = 1;
+        wmb();
+    }
 
     return ret;
 }
@@ -488,8 +490,10 @@ int vmx_vcpu_pend_interrupt(VCPU *vcpu, 
     ret = test_and_set_bit(vector, &VCPU(vcpu, irr[0]));
     local_irq_restore(spsr);
 
-    if (!ret)
+    if (!ret) {
         vcpu->arch.irq_new_pending = 1;
+        wmb();
+    }
 
     return ret;
 }
@@ -511,6 +515,7 @@ void vmx_vcpu_pend_batch_interrupt(VCPU 
     }
     local_irq_restore(spsr);
     vcpu->arch.irq_new_pending = 1;
+    wmb();
 }
 
 /*
@@ -572,6 +577,7 @@ void guest_write_eoi(VCPU *vcpu)
     VLSAPIC_INSVC(vcpu,vec>>6) &= ~(1UL <<(vec&63));
     VCPU(vcpu, eoi)=0;    // overwrite the data
     vcpu->arch.irq_new_pending=1;
+    wmb();
 }
 
 int is_unmasked_irq(VCPU *vcpu)
diff -r 52e6bf6dc744 -r 251630d85510 xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c   Thu Nov 30 15:57:15 2006 -0700
+++ b/xen/arch/ia64/vmx/vmx_process.c   Thu Nov 30 15:57:20 2006 -0700
@@ -225,15 +225,15 @@ void leave_hypervisor_tail(struct pt_reg
         if (v->vcpu_id == 0) {
             int callback_irq =
                 d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
-            if (callback_irq != 0 && local_events_need_delivery()) {
-                /*inject para-device call back irq*/
-                v->vcpu_info->evtchn_upcall_mask = 1;
-                vmx_vcpu_pend_interrupt(v, callback_irq);
-            }
-        }
-
-        if ( v->arch.irq_new_pending ) {
-            v->arch.irq_new_pending = 0;
+            if (callback_irq != 0) {
+                /* change level for para-device callback irq */
+                vmx_vioapic_set_irq(d, callback_irq,
+                                    local_events_need_delivery());
+            }
+        }
+
+        rmb();
+        if (xchg(&v->arch.irq_new_pending, 0)) {
             v->arch.irq_new_condition = 0;
             vmx_check_pending_irq(v);
             return;

_______________________________________________
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®.