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-unstable] [IA64] fix usage of ia64_xen_vector

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] fix usage of ia64_xen_vector
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2006 16:21:01 +0000
Delivery-date: Fri, 28 Jul 2006 09:28:26 -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 awilliam@xxxxxxxxxxx
# Node ID 9e12c09a0089d2de130b78412db160fa093cb9ff
# Parent  306d7857928cfebfcc7f1a9d259e696797a4cfc2
[IA64] fix usage of ia64_xen_vector

Must look up the vector via the GSI to test if it's in use.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 xen/arch/ia64/linux-xen/iosapic.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 306d7857928c -r 9e12c09a0089 xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Tue Jul 11 12:51:18 2006 -0600
+++ b/xen/arch/ia64/linux-xen/iosapic.c Tue Jul 11 12:53:04 2006 -0600
@@ -1155,7 +1155,7 @@ int iosapic_guest_read(unsigned long phy
 
 int iosapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
 {
-       unsigned int id, gsi, vec, dest, high32;
+       unsigned int id, gsi, vec, xen_vec, dest, high32;
        char rte_index;
        struct iosapic *ios;
        struct iosapic_intr_info *info;
@@ -1185,13 +1185,17 @@ int iosapic_guest_write(unsigned long ph
 
        /* Sanity check. Vector should be allocated before this update */
        if ((rte_index > ios->num_rte) ||
-           test_bit(vec, ia64_xen_vector) ||
            ((vec > IA64_FIRST_DEVICE_VECTOR) &&
             (vec < IA64_LAST_DEVICE_VECTOR) &&
             (!test_bit(vec - IA64_FIRST_DEVICE_VECTOR, ia64_vector_mask))))
            return -EINVAL;
 
        gsi = ios->gsi_base + rte_index;
+       xen_vec = gsi_to_vector(gsi);
+       if (xen_vec >= 0 && test_bit(xen_vec, ia64_xen_vector)) {
+               printk("WARN: GSI %d in use by Xen.\n", gsi);
+               return -EINVAL;
+       }
        info = &iosapic_intr_info[vec];
        spin_lock_irqsave(&irq_descp(vec)->lock, flags);
        spin_lock(&iosapic_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-unstable] [IA64] fix usage of ia64_xen_vector, Xen patchbot-unstable <=