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

[Xen-changelog] [xen-unstable] x86: Do not permit 'AUTO_ASSIGN' parameter to PHYSDEVOP_alloc_irq_vector.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1220977685 -3600
# Node ID 7f1c71c6d4c8814eb9d9f1f23d493d9edebd1a1e
# Parent  59904b1800784e65ff6a5f43227b46fc67ad2928
x86: Do not permit 'AUTO_ASSIGN' parameter to PHYSDEVOP_alloc_irq_vector.

It's not needed for MSI handling as Xen hides the vector allocation
and MSI-device programming.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/physdev.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff -r 59904b180078 -r 7f1c71c6d4c8 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Tue Sep 09 15:33:27 2008 +0100
+++ b/xen/arch/x86/physdev.c    Tue Sep 09 17:28:05 2008 +0100
@@ -58,9 +58,6 @@ static int get_free_pirq(struct domain *
     return i;
 }
 
-/*
- * Caller hold the irq_lock
- */
 static int map_domain_pirq(struct domain *d, int pirq, int vector,
                            struct physdev_map_pirq *map)
 {
@@ -136,9 +133,7 @@ done:
     return ret;
 }
 
-/*
- * The pirq should has been unbound before this call
- */
+/* The pirq should have been unbound before this call. */
 static int unmap_domain_pirq(struct domain *d, int pirq)
 {
     int ret = 0;
@@ -452,7 +447,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
 
         irq = irq_op.irq;
         ret = -EINVAL;
-        if ( ((irq < 0) && (irq != AUTO_ASSIGN)) || (irq >= NR_IRQS) )
+        if ( (irq < 0) || (irq >= NR_IRQS) )
             break;
 
         irq_op.vector = assign_irq_vector(irq);
@@ -462,8 +457,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
         if ( msi_enable )
         {
             spin_lock_irqsave(&dom0->arch.irq_lock, flags);
-            if ( irq != AUTO_ASSIGN )
-                ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
+            ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
             spin_unlock_irqrestore(&dom0->arch.irq_lock, flags);
         }
 

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