piix: do not set irq while loading vmstate
commit2c9ecdeb9fbad9e414c2a7da676804992b568d13
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Thu, 28 Aug 2014 11:19:19 +0000 (28 15:19 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Sep 2014 10:20:32 +0000 (11 12:20 +0200)
tree52bccb6b217a73f4c14469a0884f15c6aa039883
parent7385b275d9ae8bdf3c012bc4e2ae9779fcea6312
piix: do not set irq while loading vmstate

This patch avoids setting an irq while loading the state of the ISA 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 setting the 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.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/pci-host/piix.c