From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>, Avi Kivity <avi@qumranet.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: Question about interrupt routing and irq allocation
Date: Tue, 27 May 2008 10:45:39 +0100 [thread overview]
Message-ID: <483BD843.5080009@goop.org> (raw)
In-Reply-To: <20080527083729.GF29246@elte.hu>
Ingo Molnar wrote:
> hm, in theory the highest quality method would be to do this on the
> genirq level and register your own special "Xen irq-chip" methods. [see
> include/linux/irq.h's "struct irq_chip" and kernel/irq/*.c]
>
I already have one of those for pv guests, and I think I can reuse it
more or less unchanged.
> you can use set_irq_chip() to claim a specific irq and set up its
> handling at the highest level. That way you dont have to do anything in
> the x86 hw vector space at all and you'd avoid all the overhead and
> complications of x86 irq vectors. You can control how these interrupts
> are named in /proc/interrupts, etc.
>
Yeah, that was my plan.
> but this needs synchronization with all the other entities that claim
> specific irqs and expect to be able to get them. MSI already does that
> to a certain level, see arch_setup_msi_irq() / set_irq_msi(). But that
> wastes x86 vectors and we dont really want to waste them as you dont
> actually want to use any separate per irq hw vectoring mechanism for
> these interrupts.
>
OK. So if I just used create_irq() that would get me an irq I can use,
but would also end up allocating a vector too.
> So the most intelligent method would be to reserve the Linux irq itself
> but not the vector, i.e. allocate from irq_cfg[] in
> arch/x86/kernel/io_apic_64.c so that the irq number does not get reused
> - setting irq_cfg[irq].vector to -1 will achieve that.
>
I'm initially targeting 32-bit, though obviously I'd like something that
works for both 32 and 64 bit. irq_cfg[] is missing in io_apic_32.c;
would I achieve the same effect by setting irq_vector[irq] = 0xff or
something?
Thanks,
J
next prev parent reply other threads:[~2008-05-27 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 22:08 Question about interrupt routing and irq allocation Jeremy Fitzhardinge
2008-05-27 8:37 ` Ingo Molnar
2008-05-27 9:45 ` Jeremy Fitzhardinge [this message]
2008-05-27 14:56 ` Ingo Molnar
2008-05-27 16:24 ` Jeremy Fitzhardinge
2008-05-28 9:35 ` Eric W. Biederman
2008-05-28 10:40 ` Jeremy Fitzhardinge
2008-05-28 16:04 ` Eric W. Biederman
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=483BD843.5080009@goop.org \
--to=jeremy@goop.org \
--cc=Keir.Fraser@eu.citrix.com \
--cc=andi@firstfloor.org \
--cc=avi@qumranet.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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