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]
Date:	Sun, 12 Dec 2010 22:49:38 +0100
From:	Jan Kiszka <jan.kiszka@....de>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	linux-kernel@...r.kernel.org, kvm <kvm@...r.kernel.org>,
	Tom Lyon <pugs@...co.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jan Kiszka <jan.kiszka@...mens.com>
Subject: Re: [PATCH v2 2/4] genirq: Inform handler about line sharing state

Am 12.12.2010 17:53, Thomas Gleixner wrote:
> On Sun, 12 Dec 2010, Jan Kiszka wrote:
> 
>> From: Jan Kiszka <jan.kiszka@...mens.com>
>>
>> This enabled interrupt handlers to retrieve the current line sharing state via
>> the new interrupt status word so that they can adapt to it.
>>
>> The switch from shared to exclusive is generally uncritical and can thus be
>> performed on demand. However, preparing a line for shared mode may require
>> preparational steps of the currently registered handler. It can therefore
>> request an ahead-of-time notification via IRQF_ADAPTIVE. The notification
>> consists of an exceptional handler invocation with IRQS_MAKE_SHAREABLE set in
>> the status word.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
>> ---
>>  include/linux/interrupt.h |   10 ++++++++++
>>  include/linux/irqdesc.h   |    2 ++
>>  kernel/irq/irqdesc.c      |    2 ++
>>  kernel/irq/manage.c       |   44 +++++++++++++++++++++++++++++++++++++++++---
>>  4 files changed, 55 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
>> index 16cdbbf..c6323a2 100644
>> --- a/include/linux/interrupt.h
>> +++ b/include/linux/interrupt.h
>> @@ -55,6 +55,7 @@
>>   *                Used by threaded interrupts which need to keep the
>>   *                irq line disabled until the threaded handler has been run.
>>   * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend
>> + * IRQF_ADAPTIVE - Request notification about upcoming interrupt line sharing
>>   *
>>   */
>>  #define IRQF_DISABLED		0x00000020
>> @@ -67,6 +68,7 @@
>>  #define IRQF_IRQPOLL		0x00001000
>>  #define IRQF_ONESHOT		0x00002000
>>  #define IRQF_NO_SUSPEND		0x00004000
>> +#define IRQF_ADAPTIVE		0x00008000
>>  
>>  #define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND)
>>  
>> @@ -126,6 +128,14 @@ struct irqaction {
>>  
>>  extern irqreturn_t no_action(int cpl, void *dev_id);
>>  
>> +/*
>> + * Driver-readable IRQ line status flags:
>> + * IRQS_SHARED - line is shared between multiple handlers
>> + * IRQS_MAKE_SHAREABLE - in the process of making an exclusive line shareable
>> + */
>> +#define IRQS_SHARED		0x00000001
>> +#define IRQS_MAKE_SHAREABLE	0x00000002
>> +
>>  extern unsigned long get_irq_status(unsigned long irq);
>>  
>>  #ifdef CONFIG_GENERIC_HARDIRQS
>> diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
>> index 979c68c..c490e83 100644
>> --- a/include/linux/irqdesc.h
>> +++ b/include/linux/irqdesc.h
>> @@ -29,6 +29,7 @@ struct timer_rand_state;
>>   * @wait_for_threads:	wait queue for sync_irq to wait for threaded handlers
>>   * @dir:		/proc/irq/ procfs entry
>>   * @name:		flow handler name for /proc/interrupts output
>> + * @register_lock:	protects registration & release, for unshared->shared
> 
> I think we can make that a global mutex. request/free_irq are not
> hotpath operations which require a mutex per irq descriptor.
> 

Agreed, will change this.

Jan


Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ