From: <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: xen: get_free_pirq: make sure that the returned pirq is allocated
Date: Wed, 31 Aug 2011 11:24:06 +0100 [thread overview]
Message-ID: <1314786246-15149-3-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <1314786246-15149-1-git-send-email-stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff -r 54845807a8ad xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Tue Aug 30 11:56:37 2011 +0000
+++ b/xen/arch/x86/irq.c Tue Aug 30 11:58:00 2011 +0000
@@ -1584,13 +1584,19 @@ int get_free_pirq(struct domain *d, int
{
for ( i = 16; i < nr_irqs_gsi; i++ )
if ( is_free_pirq(d, pirq_info(d, i)) )
+ {
+ pirq_get_info(d, i);
return i;
+ }
}
else
{
for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
if ( is_free_pirq(d, pirq_info(d, i)) )
+ {
+ pirq_get_info(d, i);
return i;
+ }
}
return -ENOSPC;
next prev parent reply other threads:[~2011-08-31 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 10:24 xen: fix hvm_domain_use_pirq's behavior stefano.stabellini
2011-08-31 10:24 ` xen: __hvm_pci_intx_assert should check for gsis remapped onto pirqs stefano.stabellini
2011-08-31 10:27 ` Stefano Stabellini
2011-08-31 10:24 ` stefano.stabellini [this message]
2011-08-31 10:26 ` xen: fix hvm_domain_use_pirq's behavior Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314786246-15149-3-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).