qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmst


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate
Date: Wed, 10 Sep 2014 11:58:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Il 10/09/2014 12:50, Michael S. Tsirkin ha scritto:
> OK, got this, thanks for the explanation!
> So the reason i8259 might be out of sync is
> because it's not yet deserialized.

Yes, especially the IMR/IRR/ISR fields.

> I think it's a good idea to put (at least the
> last part) in the commit log.

Like this:

    This patch disables raising an irq while loading the state of PCI bridge.
    Because the i8259 has not been deserialized yet, raising an interrupt
    could bring the system out-of-sync with the migration source.  For example,
    the migration source could have masked the interrupt in the i8259. On the
    destination, the i8259 device model would not know that yet and would
    trigger an interrupt in the CPU.
    
    This patch eliminates raising an irq and just restores the calculated
    state fields in post_load function.  Interrupt state will be deserialized
    separately through the IRR field of the i8259.

> Also it's updating irq state, not just raising irq,
> that might be problematic, right?

Well, the i8259 is in the reset state so ISR=IRR=0, aka all IRQ lines 
are known to be low.  But yes, in general it's the update that is 
problematic.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]