Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-12 Thread David Woodhouse
On Wed, 2023-01-11 at 12:43 -0700, Alex Williamson wrote: > On Wed, 11 Jan 2023 19:08:44 + > David Woodhouse wrote: > > > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > > > > > Nice.  IIRC, we ended up with the hack solution we have today in vfio > > > because there was too mu

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
On Wed, 2023-01-11 at 13:00 -0700, Alex Williamson wrote: > > Careful about making too many assumptions around PCI, it's clearly the > most used but vfio is bus agnostic and we do have vfio-platform support > as well as some weird s390 devices.  There's nothing PCI specific about > a level trigger

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread Alex Williamson
On Wed, 11 Jan 2023 19:50:15 + David Woodhouse wrote: > On Wed, 2023-01-11 at 12:43 -0700, Alex Williamson wrote: > > On Wed, 11 Jan 2023 19:08:44 + > > David Woodhouse wrote: > > > > > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > > > > > > > Nice.  IIRC, we ended

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
On Wed, 2023-01-11 at 12:43 -0700, Alex Williamson wrote: > On Wed, 11 Jan 2023 19:08:44 + > David Woodhouse wrote: > > > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > > > > > Nice.  IIRC, we ended up with the hack solution we have today in vfio > > > because there was too mu

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread Alex Williamson
On Wed, 11 Jan 2023 19:08:44 + David Woodhouse wrote: > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > > > Nice.  IIRC, we ended up with the hack solution we have today in vfio > > because there was too much resistance to callbacks that were only > > necessary for vfio in the

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > Nice.  IIRC, we ended up with the hack solution we have today in vfio > because there was too much resistance to callbacks that were only > necessary for vfio in the past.  Once we had KVM resampling support, > it simply wasn't worth th

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread Alex Williamson
On Wed, 11 Jan 2023 16:58:37 + David Woodhouse wrote: > On Wed, 2023-01-11 at 11:25 -0500, Michael S. Tsirkin wrote: > > On Wed, Jan 11, 2023 at 02:41:58PM +, David Woodhouse wrote: > > > This allows drivers to register a callback on a qemu_irq, which is > > > invoked when a level-trigg

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
On Wed, 2023-01-11 at 11:25 -0500, Michael S. Tsirkin wrote: > On Wed, Jan 11, 2023 at 02:41:58PM +, David Woodhouse wrote: > > This allows drivers to register a callback on a qemu_irq, which is > > invoked when a level-triggered IRQ is acked on the irqchip. > > > > This allows us to simulate

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread Michael S. Tsirkin
On Wed, Jan 11, 2023 at 02:41:58PM +, David Woodhouse wrote: > This allows drivers to register a callback on a qemu_irq, which is > invoked when a level-triggered IRQ is acked on the irqchip. > > This allows us to simulate level-triggered interrupts more efficiently, > by resampling the state

[RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
This allows drivers to register a callback on a qemu_irq, which is invoked when a level-triggered IRQ is acked on the irqchip. This allows us to simulate level-triggered interrupts more efficiently, by resampling the state of the interrupt only when it actually matters. This can be used in two wa