qemu-patch-raspberry4/hw
Igor Mammedov 71ae65e552 i2c: fix migration regression introduced by broadcast support
QEMU fails migration with following error:

qemu-system-x86_64: Missing section footer for i2c_bus
qemu-system-x86_64: load of migration failed: Invalid argument

when migrating from:
  qemu-system-x86_64-v2.6.0 -m 256M rhel72.img -M pc-i440fx-2.6
to
  qemu-system-x86_64-v2.7.0-rc0 -m 256M rhel72.img -M pc-i440fx-2.6

Regression is added by commit 2293c27f (i2c: implement broadcast write)

Fix it by dropping 'broadcast' VMState introduced by 2293c27f and
reuse broadcast 0x00 address as broadcast flag in bus->saved_address.
Then if there were ongoing broadcast at migration time, set
bus->saved_address to it and at i2c_slave_post_load() time check
for it instead of transfering and using 'broadcast' VMState.

As result of reusing existing saved_address VMState, no compat
glue will be needed to keep forward/backward compatiblity. which
makes fix much less intrusive.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1469623198-177227-1-git-send-email-imammedo@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-08-03 18:44:56 +02:00
..
9pfs 9pfs: Wrap in vmstate 2016-07-21 20:44:20 +03:00
acpi opts-visitor: Favor new visit_free() function 2016-07-06 10:52:04 +02:00
alpha hw/alpha: fix PCI bus initialization 2016-07-20 19:30:26 +03:00
arm qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
audio Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
block pc, pci, virtio: new features, cleanups, fixes 2016-07-21 20:12:37 +01:00
bt hw/bt: Don't use cpu_to_*w() and *_to_cpup() 2016-07-12 15:08:53 +01:00
char virtio-serial: Wrap in vmstate 2016-07-21 20:44:20 +03:00
core qdev: ignore GlobalProperty.errp for hotplugged devices 2016-07-27 11:25:06 -03:00
cpu cpu: Abstract CPU core type 2016-06-17 16:33:48 +10:00
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display hw/virtio-pci: fix virtio behaviour 2016-07-29 00:07:10 +03:00
dma dma: Add Xilinx Zynq devcfg device model 2016-07-04 13:15:22 +01:00
gpio hw/gpio: QOM'ify zaurus.c 2016-06-14 15:59:13 +01:00
i2c i2c: fix migration regression introduced by broadcast support 2016-08-03 18:44:56 +02:00
i386 pc, pci, virtio: cleanups, fixes 2016-07-29 11:57:01 +01:00
ide ide: fix halted IO segfault at reset 2016-07-28 17:34:19 -04:00
input virtio-input: Wrap in vmstate 2016-07-21 20:44:20 +03:00
intc pc, pci, virtio: new features, cleanups, fixes 2016-07-21 20:12:37 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi hw/ipmi: fix spelling 2016-06-07 18:02:48 +03:00
isa ich9: implement SCI_IRQ_SEL register 2016-06-29 14:03:48 +02:00
lm32 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
m68k hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
mem nvdimm: fix memory leak in error code path 2016-07-20 19:30:26 +03:00
microblaze Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
mips hw/mips_malta: Fix YAMON API print routine 2016-07-28 11:24:00 +01:00
misc kvm-irqchip: do explicit commit when update irq 2016-07-21 20:44:19 +03:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net vhost: add vhost_net_set_backend() 2016-07-29 00:33:49 +03:00
nvram spapr: fix spapr-nvram migration 2016-07-25 10:19:30 +10:00
openrisc hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
pci pcie: fix link active status bit migration 2016-07-29 00:07:08 +03:00
pci-bridge hw/pci-bridge: Convert pxb initialization functions to Error 2016-07-29 00:07:09 +03:00
pci-host apb: convert init to realize 2016-07-29 00:07:09 +03:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc spapr: Prevent boot CPU core removal 2016-07-29 12:02:31 +10:00
s390x s390x/css: provide a dev_path for css devices 2016-07-20 15:47:25 +02:00
scsi mptsas: really fix migration compatibility 2016-08-03 18:44:56 +02:00
sd ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
sh4 Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
smbios ipmi: Add SMBIOS table entry 2016-06-24 05:13:57 +03:00
sparc trace: split out trace events for hw/sparc/ directory 2016-06-20 17:22:16 +01:00
sparc64 util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
ssi ast2400: pretend DMAs are done for U-boot 2016-07-14 16:51:38 +01:00
timer MIPS patches 2016-07-12 2016-07-12 12:34:41 +01:00
tpm Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
tricore hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
unicore32 hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
usb usb: xhci assert fix, add usbredir streams property 2016-07-20 20:31:31 +01:00
vfio kvm-irqchip: do explicit commit when update irq 2016-07-21 20:44:19 +03:00
virtio pc, pci, virtio: cleanups, fixes 2016-07-29 11:57:01 +01:00
watchdog nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
xen Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xenpv Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xtensa target-xtensa: xtfpga: fix FLASH interface width 2016-07-14 13:59:44 +03:00
Makefile.objs Add a base IPMI interface 2015-12-22 18:39:19 +02:00