lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <483BD843.5080009@goop.org>
Date:	Tue, 27 May 2008 10:45:39 +0100
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Avi Kivity <avi@...ranet.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Keir Fraser <Keir.Fraser@...citrix.com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ