debuggers.hg

changeset 21138:537451477469

Allow all unused GSI to be configured via IO-APIC by new pv_ops dom0

Currently Xen disallows setting up any GSI < 16. This makes it
impossible by the kernel to use any PCI devices without ACPI override
but a mapping to this interrupts via IO-APIC.

The patch allows all unused interrupts to be setup via IO-APIC.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 01 09:55:27 2010 +0100 (2010-04-01)
parents 0bbf5454cd14
children 4a3e131f7498
files xen/arch/x86/mpparse.c xen/arch/x86/physdev.c
line diff
     1.1 --- a/xen/arch/x86/mpparse.c	Thu Apr 01 09:47:49 2010 +0100
     1.2 +++ b/xen/arch/x86/mpparse.c	Thu Apr 01 09:55:27 2010 +0100
     1.3 @@ -1103,6 +1103,7 @@ int mp_register_gsi (u32 gsi, int trigge
     1.4  	int			ioapic = -1;
     1.5  	int			ioapic_pin = 0;
     1.6  	int			idx, bit = 0;
     1.7 +
     1.8  	/*
     1.9  	 * Mapping between Global System Interrups, which
    1.10  	 * represent all possible interrupts, and IRQs
    1.11 @@ -1126,6 +1127,9 @@ int mp_register_gsi (u32 gsi, int trigge
    1.12  	if (ioapic_renumber_irq)
    1.13  		gsi = ioapic_renumber_irq(ioapic, gsi);
    1.14  
    1.15 +	if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
    1.16 +		return -EEXIST;
    1.17 +
    1.18  	/* 
    1.19  	 * Avoid pin reprogramming.  PRTs typically include entries  
    1.20  	 * with redundant pin->gsi mappings (but unique PCI devices);
     2.1 --- a/xen/arch/x86/physdev.c	Thu Apr 01 09:47:49 2010 +0100
     2.2 +++ b/xen/arch/x86/physdev.c	Thu Apr 01 09:55:27 2010 +0100
     2.3 @@ -476,12 +476,8 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
     2.4          ret = -EINVAL;
     2.5          if ( setup_gsi.gsi < 0 || setup_gsi.gsi >= nr_irqs_gsi )
     2.6              break;
     2.7 -        /* GSI < 16 has been setup by hypervisor */
     2.8 -        if ( setup_gsi.gsi >= 16 )
     2.9 -            ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering,
    2.10 -                            setup_gsi.polarity);
    2.11 -        else 
    2.12 -            ret = -EEXIST;
    2.13 +        ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering,
    2.14 +                              setup_gsi.polarity);
    2.15          break; 
    2.16      }
    2.17      default: