WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.0.3-testing] [XEN][HVM] Arrange that we only cons

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.3-testing] [XEN][HVM] Arrange that we only consider sending a PV-on-HVM event channel
From: "Xen patchbot-3.0.3-testing" <patchbot-3.0.3-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 02 Oct 2006 12:40:59 -0700
Delivery-date: Tue, 03 Oct 2006 01:23:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Steven Smith <ssmith@xxxxxxxxxxxxx>
# Date 1159540819 -3600
# Node ID ef8df1e5884ff55b68c24fae44deaa8507a00425
# Parent  509ff527c59d2ea8aca36f901d0f3fe67f4d52c8
[XEN][HVM] Arrange that we only consider sending a PV-on-HVM event channel
callback interrupt in vcpu 0.  This avoids a race in SMP HVM domains
which could lead to interrupts never getting delivered.  It is safe
because HVM domains always bind their event channels to vcpu 0.

Bug pointed out by Keir.

Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
 xen/arch/x86/hvm/svm/intr.c |    9 ++++++---
 xen/arch/x86/hvm/vmx/io.c   |   11 +++++++----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff -r 509ff527c59d -r ef8df1e5884f xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c       Fri Sep 29 14:42:49 2006 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c       Fri Sep 29 15:40:19 2006 +0100
@@ -121,9 +121,12 @@ asmlinkage void svm_intr_assist(void)
           pic_set_irq(pic, pt->irq, 1);
       }
 
-      callback_irq = v->domain->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
-      if ( callback_irq != 0)
-          pic_set_xen_irq(pic, callback_irq, local_events_need_delivery());
+      if (v->vcpu_id == 0) {
+          callback_irq =
+              v->domain->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
+          if ( callback_irq != 0)
+              pic_set_xen_irq(pic, callback_irq, local_events_need_delivery());
+      }
 
       if ( cpu_has_pending_irq(v) )
           intr_vector = cpu_get_interrupt(v, &intr_type);
diff -r 509ff527c59d -r ef8df1e5884f xen/arch/x86/hvm/vmx/io.c
--- a/xen/arch/x86/hvm/vmx/io.c Fri Sep 29 14:42:49 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/io.c Fri Sep 29 15:40:19 2006 +0100
@@ -78,7 +78,6 @@ asmlinkage void vmx_intr_assist(void)
     struct hvm_domain *plat=&v->domain->arch.hvm_domain;
     struct periodic_time *pt = &plat->pl_time.periodic_tm;
     struct hvm_virpic *pic= &plat->vpic;
-    int callback_irq;
     unsigned int idtv_info_field;
     unsigned long inst_len;
     int    has_ext_irq;
@@ -91,9 +90,13 @@ asmlinkage void vmx_intr_assist(void)
         pic_set_irq(pic, pt->irq, 1);
     }
 
-    callback_irq = v->domain->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
-    if ( callback_irq != 0 )
-        pic_set_xen_irq(pic, callback_irq, local_events_need_delivery());
+    if (v->vcpu_id == 0) {
+        int callback_irq;
+        callback_irq =
+            v->domain->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
+        if ( callback_irq != 0 )
+            pic_set_xen_irq(pic, callback_irq, local_events_need_delivery());
+    }
 
     has_ext_irq = cpu_has_pending_irq(v);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0.3-testing] [XEN][HVM] Arrange that we only consider sending a PV-on-HVM event channel, Xen patchbot-3.0.3-testing <=