linux-stable/drivers/xen
Ian Campbell 89911501f3 xen: events: allocate GSIs and dynamic IRQs from separate IRQ ranges.
There are three cases which we need to care about, PV guest, PV domain
0 and HVM guest.

The PV guest case is simple since it has no access to ACPI or real
APICs and therefore has no GSIs therefore we simply dynamically
allocate all IRQs. The potentially interesting case here is PIRQ type
event channels associated with passed through PCI devices. However
even in this case the guest has no direct interaction with the
physical GSI since that happens in the PCI backend.

The PV domain 0 and HVM guest cases are actually the same. In domain 0
case the kernel sees the host ACPI and GSIs (although it only sees the
APIC indirectly via the hypervisor) and in the HVM guest case it sees
the virtualised ACPI and emulated APICs. In these cases we start
allocating dynamic IRQs at nr_irqs_gsi so that they cannot clash with
any GSI.

Currently xen_allocate_irq_dynamic starts at nr_irqs and works
backwards looking for a free IRQ in order to (try and) avoid clashing
with GSIs used in domain 0 and in HVM guests. This change avoids that
although we retain the behaviour of allowing dynamic IRQs to encroach
on the GSI range if no suitable IRQs are available since a future IRQ
clash is deemed preferable to failure right now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
2011-03-03 12:00:21 -05:00
..
xenbus xen/xenbus: fixup checkpatch issues in xenbus_probe* 2011-01-05 16:31:08 -05:00
xenfs Merge branch 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2011-01-20 16:37:28 -08:00
balloon.c xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory 2010-12-02 15:30:06 -08:00
biomerge.c xen: define BIOVEC_PHYS_MERGEABLE() 2010-10-18 10:40:28 -04:00
cpu_hotplug.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-11 12:18:16 -08:00
events.c xen: events: allocate GSIs and dynamic IRQs from separate IRQ ranges. 2011-03-03 12:00:21 -05:00
evtchn.c Merge branch 'xen/dev-evtchn' into upstream/evtchn 2010-11-18 22:43:38 -08:00
features.c
gntdev.c xen gntdev: use gnttab_map_refs and gnttab_unmap_refs 2011-01-11 14:32:06 -05:00
grant-table.c xen p2m: clear the old pte when adding a page to m2p_override 2011-01-11 14:32:14 -05:00
Kconfig Merge branch 'stable/gntdev' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-01-13 18:46:48 -08:00
Makefile Merge branch 'stable/gntdev' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-01-13 18:46:48 -08:00
manage.c xen: resume the pv console for hvm guests too 2010-12-02 14:40:48 +00:00
pci.c xen: register xen pci notifier 2010-10-27 18:56:07 +01:00
platform-pci.c xen-platform: use PCI interfaces to request IO and MEM resources. 2011-01-12 10:28:01 -05:00
swiotlb-xen.c swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough. 2010-07-27 11:51:00 -04:00
sys-hypervisor.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xencomm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00