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:	Fri, 08 Jun 2012 16:50:57 +0200
From:	Jan Kiszka <jan.kiszka@...mens.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>, Avi Kivity <avi@...hat.com>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Alex Williamson <alex.williamson@...hat.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"mtosatti@...hat.com" <mtosatti@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"yongjie.ren@...el.com" <yongjie.ren@...el.com>
Subject: Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

On 2012-06-08 16:39, Michael S. Tsirkin wrote:
> On Mon, Jun 04, 2012 at 01:40:28PM +0200, Jan Kiszka wrote:
>> On 2012-06-04 13:21, Thomas Gleixner wrote:
>>> On Sun, 3 Jun 2012, Avi Kivity wrote:
>>>
>>>> On 06/01/2012 09:26 PM, Jan Kiszka wrote:
>>>>>
>>>>>> you suggesting we need a request_edge_threaded_only_irq() API?  Thanks,
>>>>>
>>>>> I'm just wondering if that restriction for threaded IRQs is really
>>>>> necessary for all use cases we have. Threaded MSIs do not appear to me
>>>>> like have to be handled that conservatively, but maybe I'm missing some
>>>>> detail.
>>>>>
>>>>
>>>> btw, I'm hoping we can unthread assigned MSIs.  If the delivery is
>>>> unicast, we can precalculate everything and all the handler has to do is
>>>> set the IRR, KVM_REQ_EVENT, and kick the vcpu.  All of these can be done
>>>> from interrupt context with just RCU locking.
>>>
>>> There is really no need to run MSI/MSI-X interrupts threaded for
>>> KVM. I'm running the patch below for quite some time and it works like
>>> a charm.
>>>
>>> Thanks,
>>>
>>> 	tglx
>>> ----
> 
> 
> ....
> 
>>
>> This may work in practice but has two conceptual problems:
>>  - we do not want to run a potential broadcast to all VCPUs to run in
>>    a host IRQ handler
> 
> I'm not sure why this one is a problem: injecting an interrupt
> once you know the vcpu seems really cheap.
> It's true that scanning vcpus might take a bit more time
> when there are lots of them but it's a single
> linear scan that we do anyway.
> 
> And we also inject msi from irqfd callback with interrupts
> disabled which seems equivalent.

Interesting, need to check.

> 
> Pls correct me if I'm wrong.

Well, IIRC, the "don't loop over all vcpus with IRQs or preemption
disabled" was one argument against direct legacy interrupt injection as
well. That's what I kept in mind from those discussions. Maybe Avi can
comment on the current position.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
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