diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-13 14:59:03 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-13 14:59:03 +0100 |
commit | 44404bde3971c4f1d575ed3cd7702d2a74cb33b7 (patch) | |
tree | e9b45f23be2cff8df7b0fc31e4eb55e570473466 /xen/common/domain.c | |
parent | 88616ac08c303ae20a55fcd8f6e2882af9e43175 (diff) | |
download | xen-44404bde3971c4f1d575ed3cd7702d2a74cb33b7.tar.gz xen-44404bde3971c4f1d575ed3cd7702d2a74cb33b7.tar.bz2 xen-44404bde3971c4f1d575ed3cd7702d2a74cb33b7.zip |
x86: eliminate bogus IRQ restrictions
As pointed out in
http://lists.xensource.com/archives/html/xen-devel/2010-07/msg00077.html
the limits introduced in c/s 20072 are at least
questionable. Eliminate them in favor of a more dynamic approach:
There's no real need for an upper limit on nr_irqs (as anything beyond
nr_irqs_gsi isn't visible to domains anyway), and the split point (and
hence ratio) between GSI and MSI/MSI-X IRQs doesn't need to be hard
coded, but can instead be controlled on the command line in case there
are *very* many GSIs.
The default used for nr_irqs will be rather large with this patch, so
it may not be acceptable without also switching to a sparse irq_desc[]
as was done not so lomg ago in Linux.
The added capping of any domain's nr_pirqs is based on the observation
that no domain can possibly have more than the system wide number of
IRQs. The opposite case may in fact also require some adjustment:
Defaulting the number of non-GSI IRQs available (namely to Dom0) to a
fixed value may not be the best choice going forward, since if there
indeed are very many non-GSI interrupt sources, it won't be possible
for the kernel to make use of them without giving
"extra_guest_irqs=" on the command line (but the goal should be to
allow things to work right by default even on large systems).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/domain.c')
-rw-r--r-- | xen/common/domain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c index 9a93767630..20e89ea008 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -274,6 +274,8 @@ struct domain *domain_create( d->nr_pirqs = nr_irqs_gsi + extra_domU_irqs; else d->nr_pirqs = nr_irqs_gsi + extra_dom0_irqs; + if ( d->nr_pirqs > nr_irqs ) + d->nr_pirqs = nr_irqs; d->pirq_to_evtchn = xmalloc_array(u16, d->nr_pirqs); d->pirq_mask = xmalloc_array( |