Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-26 Thread Paolo Bonzini
On 11/26/24 14:45, Zhao Liu wrote: On Fri, Nov 22, 2024 at 08:47:56AM +0100, Paolo Bonzini wrote: Date: Fri, 22 Nov 2024 08:47:56 +0100 From: Paolo Bonzini Subject: [PATCH 2/2] rust: add bindings for interrupt sources X-Mailer: git-send-email 2.47.0 The InterruptSource bindings let us call

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-26 Thread Zhao Liu
On Fri, Nov 22, 2024 at 08:47:56AM +0100, Paolo Bonzini wrote: > Date: Fri, 22 Nov 2024 08:47:56 +0100 > From: Paolo Bonzini > Subject: [PATCH 2/2] rust: add bindings for interrupt sources > X-Mailer: git-send-email 2.47.0 > > The InterruptSource bindings let us call

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-22 Thread Philippe Mathieu-Daudé
On 22/11/24 11:53, Paolo Bonzini wrote: On 11/22/24 11:30, Philippe Mathieu-Daudé wrote: On 22/11/24 09:32, Paolo Bonzini wrote: +/// Interrupt sources are used by devices to pass changes to a boolean value to +/// other devices (typically interrupt or GPIO controllers).  QEMU interrupt +///

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-22 Thread Paolo Bonzini
On 11/22/24 11:30, Philippe Mathieu-Daudé wrote: On 22/11/24 09:32, Paolo Bonzini wrote: +/// Interrupt sources are used by devices to pass changes to a boolean value to +/// other devices (typically interrupt or GPIO controllers).  QEMU interrupt +/// sources are always active-high. So 'alw

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-22 Thread Philippe Mathieu-Daudé
On 22/11/24 09:32, Paolo Bonzini wrote: +/// Interrupt sources are used by devices to pass changes to a boolean value to +/// other devices (typically interrupt or GPIO controllers). QEMU interrupt +/// sources are always active-high. So 'always active-high' = true below? (Wondering about puls

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-22 Thread Philippe Mathieu-Daudé
Hi Paolo, On 22/11/24 08:47, Paolo Bonzini wrote: The InterruptSource bindings let us call qemu_set_irq() and sysbus_init_irq() as safe code. Interrupt sources, qemu_irq in C code, are pointers to IRQState objects. They are QOM link properties and can be written to outside the control of the de

Re: [PATCH 2/2] rust: add bindings for interrupt sources

2024-11-22 Thread Paolo Bonzini
> > +/// Interrupt sources are used by devices to pass changes to a boolean > > value to > > +/// other devices (typically interrupt or GPIO controllers). QEMU > > interrupt > > +/// sources are always active-high. > > So 'always active-high' = true below? (Wondering about pulsation, if the > tr

[PATCH 2/2] rust: add bindings for interrupt sources

2024-11-21 Thread Paolo Bonzini
The InterruptSource bindings let us call qemu_set_irq() and sysbus_init_irq() as safe code. Interrupt sources, qemu_irq in C code, are pointers to IRQState objects. They are QOM link properties and can be written to outside the control of the device (i.e. from a shared reference); therefore they m