On 21/05/2018 17:02, Peter Maydell wrote:
> On 21 May 2018 at 15:34, Paolo Bonzini <pbonz...@redhat.com> wrote:
>> Why do the levels have to be migrated at all?  It should be enough if
>> the IRQ level is either migrated manually, or restored (e.g. in
>> post_save callbacks) through other data that is migrated.
> This is standard behaviour for devices: they track their
> inbound irq/gpio lines, and then that becomes internal state for
> them that must be migrated.

But or_irq's input are another device's outbound lines, so tracking them
should not be necessary.  The other device would do it for or_irq.

Paolo

> If we didn't migrate the input line state, then after a migration
> the levels[] array would be all zeroes, and the next time a
> connected device signalled a high-to-low transition we'd take
> the output line low even if it should not be (because we'd have
> forgotten that some other input lines were high).
> 
> In a different world, the state would be in the qemu_irq line itself
> (in the same way that in hardware signal lines are their own state),
> but we can't get there from here.


Reply via email to