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

2012-06-18 Thread Ren, Yongjie
: 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. Well, IIRC, the don't loop over all vcpus with IRQs or preemption disabled was one argument

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 was one argument against

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 comment

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 as well. That's

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'm just wondering if that

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_threaded_only_irq()

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 PM, Jan Kiszka

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, Avi Kivity

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'm just wondering if that

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_threaded_only_irq()

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 not appear

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 necessary for all use

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

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 handlers of

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 KVM aside, my

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

[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 alex.william...@redhat.com --- virt/kvm/assigned-dev.c |4 ++-- 1

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 was

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 (due to

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 IRQF_ONESHOT.

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 the default primary handler