Messages in this thread | | | Date | Tue, 27 May 2008 10:45:39 +0100 | From | Jeremy Fitzhardinge <> | Subject | Re: Question about interrupt routing and irq allocation |
| |
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
| |