From: Keir Fraser Date: Tue, 9 Sep 2008 16:28:05 +0000 (+0100) Subject: x86: Do not permit 'AUTO_ASSIGN' parameter to PHYSDEVOP_alloc_irq_vector. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14111^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2c4bad2fa24338d979f81f470f01231fbc91375f;p=xen.git 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 --- diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index af7ed5adf1..98eaf066b3 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -58,9 +58,6 @@ static int get_free_pirq(struct domain *d, int type, int index) 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_HANDLE(void) arg) 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_HANDLE(void) arg) 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); }