Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-18 Thread Avi Kivity
On 06/11/2012 01:21 PM, Michael S. Tsirkin wrote: > On Mon, Jun 11, 2012 at 01:01:41PM +0300, Avi Kivity wrote: >> On 06/08/2012 05:50 PM, Jan Kiszka wrote: >> > >> >> >> >> Pls correct me if I'm wrong. >> > >> > Well, IIRC, the "don't loop over all vcpus with IRQs or preemption >> > disabled" w

RE: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-18 Thread Ren, Yongjie
; Subject: Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI > interrupts > > On Mon, Jun 11, 2012 at 01:01:41PM +0300, Avi Kivity wrote: > > On 06/08/2012 05:50 PM, Jan Kiszka wrote: > > > > > >> > > >> Pls correct me if I'm wrong. >

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-11 Thread Michael S. Tsirkin
On Mon, Jun 11, 2012 at 01:01:41PM +0300, Avi Kivity wrote: > On 06/08/2012 05:50 PM, Jan Kiszka wrote: > > > >> > >> 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 a

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-11 Thread Avi Kivity
On 06/08/2012 05:50 PM, Jan Kiszka wrote: > >> >> 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

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Jan Kiszka
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

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Michael S. Tsirkin
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'

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Jan Kiszka
On 2012-06-08 10:00, Michael S. Tsirkin wrote: > On Fri, Jun 08, 2012 at 09:55:01AM +0200, Jan Kiszka wrote: >> On 2012-06-08 09:47, 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, A

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Michael S. Tsirkin
On Fri, Jun 08, 2012 at 09:55:01AM +0200, Jan Kiszka wrote: > On 2012-06-08 09:47, 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

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Jan Kiszka
On 2012-06-08 09:47, 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

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-08 Thread Michael S. Tsirkin
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'

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-04 Thread Thomas Gleixner
On Mon, 4 Jun 2012, Jan Kiszka wrote: > On 2012-06-04 15:07, Thomas Gleixner wrote: > > On Mon, 4 Jun 2012, Jan Kiszka wrote: > >> On 2012-06-04 13:21, Thomas Gleixner wrote: > >> So this shortcut requires some checks before being applied to a specific > >> MSI/MSI-X vector. > >> > >> > >> Taking

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-04 Thread Jan Kiszka
On 2012-06-04 15:07, Thomas Gleixner wrote: > On Mon, 4 Jun 2012, Jan Kiszka wrote: >> On 2012-06-04 13:21, Thomas Gleixner wrote: >> So this shortcut requires some checks before being applied to a specific >> MSI/MSI-X vector. >> >> >> Taking KVM aside, my general question remains if threaded MSI

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-04 Thread Thomas Gleixner
On Mon, 4 Jun 2012, Jan Kiszka wrote: > On 2012-06-04 13:21, Thomas Gleixner wrote: > So this shortcut requires some checks before being applied to a specific > MSI/MSI-X vector. > > > Taking KVM aside, my general question remains if threaded MSI handlers > of all devices really need to apply IRQ

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-04 Thread Jan Kiszka
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 >>> necessa

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-04 Thread Thomas Gleixner
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

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-03 Thread Avi Kivity
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 con

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Jan Kiszka
On 2012-06-01 19:59, Alex Williamson wrote: Hmm, can't we trust the information that an IRQ grabbed here is really a MSI type? >>> >>> >>> Apparently not, comment added with this check (1c6c6952): >>> >>>* The interrupt was requested with handler = NULL, so >>>* we use th

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Alex Williamson
On Fri, 2012-06-01 at 19:14 +0200, Jan Kiszka wrote: > On 2012-06-01 19:03, Alex Williamson wrote: > > On Fri, 2012-06-01 at 18:39 +0200, Jan Kiszka wrote: > >> On 2012-06-01 18:16, Alex Williamson wrote: > >>> The kernel no longer allows us to pass NULL for a hard interrupt > >>> handler without I

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Jan Kiszka
On 2012-06-01 19:03, Alex Williamson wrote: > On Fri, 2012-06-01 at 18:39 +0200, Jan Kiszka wrote: >> On 2012-06-01 18:16, Alex Williamson wrote: >>> The kernel no longer allows us to pass NULL for a hard interrupt >>> handler without IRQF_ONESHOT. Should have been using this flag >>> anyway. >> >

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Alex Williamson
On Fri, 2012-06-01 at 18:39 +0200, Jan Kiszka wrote: > On 2012-06-01 18:16, Alex Williamson wrote: > > The kernel no longer allows us to pass NULL for a hard interrupt > > handler without IRQF_ONESHOT. Should have been using this flag > > anyway. > > This make the IRQ handling tail a bit slower (

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Jan Kiszka
On 2012-06-01 18:16, Alex Williamson wrote: > The kernel no longer allows us to pass NULL for a hard interrupt > handler without IRQF_ONESHOT. Should have been using this flag > anyway. This make the IRQ handling tail a bit slower (due to irq_finalize_oneshot). MSIs are edge-triggered, so there w

[PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-01 Thread Alex Williamson
The kernel no longer allows us to pass NULL for a hard interrupt handler without IRQF_ONESHOT. Should have been using this flag anyway. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43328 Signed-off-by: Alex Williamson --- virt/kvm/assigned-dev.c |4 ++-- 1 file changed, 2 insertions