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.4-testing] x86: vioapic: fix remote irr bit setti

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86: vioapic: fix remote irr bit setting for level triggered interrupts
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Oct 2009 04:05:59 -0700
Delivery-date: Wed, 28 Oct 2009 04:06:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256727742 0
# Node ID 522b1808050b37e592d2c82eb3e5f8dd16008301
# Parent  6f8d8b88edd61e1f1d6264471f6a5996028bb9c8
x86: vioapic: fix remote irr bit setting for level triggered interrupts

Clear all entries' remote irr bits once the RTE entries' vector field
match with EOI message's vector.

Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
xen-unstable changeset:   20378:5e110d89b647
xen-unstable date:        Wed Oct 28 10:59:14 2009 +0000
---
 xen/arch/x86/hvm/vioapic.c |   61 +++++++++++++++++----------------------------
 1 files changed, 24 insertions(+), 37 deletions(-)

diff -r 6f8d8b88edd6 -r 522b1808050b xen/arch/x86/hvm/vioapic.c
--- a/xen/arch/x86/hvm/vioapic.c        Tue Oct 27 13:02:20 2009 +0000
+++ b/xen/arch/x86/hvm/vioapic.c        Wed Oct 28 11:02:22 2009 +0000
@@ -431,17 +431,6 @@ void vioapic_irq_positive_edge(struct do
     }
 }
 
-static int get_eoi_gsi(struct hvm_hw_vioapic *vioapic, int vector)
-{
-    int i;
-
-    for ( i = 0; i < VIOAPIC_NUM_PINS; i++ )
-        if ( vioapic->redirtbl[i].fields.vector == vector )
-            return i;
-
-    return -1;
-}
-
 void vioapic_update_EOI(struct domain *d, int vector)
 {
     struct hvm_hw_vioapic *vioapic = domain_vioapic(d);
@@ -451,32 +440,30 @@ void vioapic_update_EOI(struct domain *d
 
     spin_lock(&d->arch.hvm_domain.irq_lock);
 
-    if ( (gsi = get_eoi_gsi(vioapic, vector)) == -1 )
-    {
-        gdprintk(XENLOG_WARNING, "Can't find redir item for %d EOI\n", vector);
-        goto out;
-    }
-
-    ent = &vioapic->redirtbl[gsi];
-
-    ent->fields.remote_irr = 0;
-
-    if ( iommu_enabled )
-    {
-        spin_unlock(&d->arch.hvm_domain.irq_lock);
-        hvm_dpci_eoi(current->domain, gsi, ent);
-        spin_lock(&d->arch.hvm_domain.irq_lock);
-    }
-
-    if ( (ent->fields.trig_mode == VIOAPIC_LEVEL_TRIG) &&
-         !ent->fields.mask &&
-         hvm_irq->gsi_assert_count[gsi] )
-    {
-        ent->fields.remote_irr = 1;
-        vioapic_deliver(vioapic, gsi);
-    }
-
- out:
+    for ( gsi = 0; gsi < VIOAPIC_NUM_PINS; gsi++ )
+    {
+        ent = &vioapic->redirtbl[gsi];
+        if ( ent->fields.vector != vector )
+            continue;
+
+        ent->fields.remote_irr = 0;
+
+        if ( iommu_enabled )
+        {
+            spin_unlock(&d->arch.hvm_domain.irq_lock);
+            hvm_dpci_eoi(d, gsi, ent);
+            spin_lock(&d->arch.hvm_domain.irq_lock);
+        }
+
+        if ( (ent->fields.trig_mode == VIOAPIC_LEVEL_TRIG) &&
+             !ent->fields.mask &&
+             hvm_irq->gsi_assert_count[gsi] )
+        {
+            ent->fields.remote_irr = 1;
+            vioapic_deliver(vioapic, gsi);
+        }
+    }
+
     spin_unlock(&d->arch.hvm_domain.irq_lock);
 }
 

_______________________________________________
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.4-testing] x86: vioapic: fix remote irr bit setting for level triggered interrupts, Xen patchbot-3.4-testing <=