Showing with 5,921 additions and 1,888 deletions.
  1. +3 −0 .mailmap
  2. +33 −8 MAINTAINERS
  3. +2 −8 backends/tpm/tpm_emulator.c
  4. +3 −6 block/parallels.c
  5. +2 −4 block/qcow.c
  6. +2 −4 block/vdi.c
  7. +2 −4 block/vhdx.c
  8. +2 −4 block/vmdk.c
  9. +2 −4 block/vpc.c
  10. +2 −4 block/vvfat.c
  11. +1 −1 chardev/msmouse.c
  12. +1 −1 chardev/wctablet.c
  13. +2 −5 contrib/elf2dmp/addrspace.c
  14. +4 −7 contrib/elf2dmp/main.c
  15. +17 −15 contrib/elf2dmp/pdb.c
  16. +2 −5 contrib/elf2dmp/qemu_elf.c
  17. +1 −0 docs/devel/index-internals.rst
  18. +170 −0 docs/devel/s390-cpu-topology.rst
  19. +11 −0 docs/interop/vhost-user.rst
  20. +1 −0 docs/system/arm/emulation.rst
  21. +244 −0 docs/system/s390x/cpu-topology.rst
  22. +8 −0 docs/system/target-i386-desc.rst.inc
  23. +1 −0 docs/system/target-s390x.rst
  24. +2 −2 dump/dump.c
  25. +2 −8 hw/9pfs/9p.c
  26. +69 −0 hw/acpi/cxl.c
  27. +2 −3 hw/acpi/pcihp.c
  28. +23 −72 hw/arm/boot.c
  29. +9 −12 hw/arm/sbsa-ref.c
  30. +38 −0 hw/arm/smmuv3-internal.h
  31. +6 −2 hw/arm/smmuv3.c
  32. +6 −6 hw/arm/virt-acpi-build.c
  33. +16 −13 hw/arm/virt.c
  34. +4 −6 hw/block/vhost-user-blk.c
  35. +1 −1 hw/char/escc.c
  36. +3 −3 hw/core/cpu-sysemu.c
  37. +6 −0 hw/core/machine-hmp-cmds.c
  38. +41 −7 hw/core/machine-smp.c
  39. +4 −0 hw/core/machine.c
  40. +13 −0 hw/core/qdev-properties-system.c
  41. +10 −2 hw/display/virtio-dmabuf.c
  42. +2 −6 hw/display/virtio-gpu-base.c
  43. +1 −1 hw/display/virtio-gpu.c
  44. +3 −3 hw/display/xenfb.c
  45. +2 −4 hw/dma/xilinx_axidma.c
  46. +2 −5 hw/dma/xlnx-zdma.c
  47. +4 −9 hw/dma/xlnx_csu_dma.c
  48. +1 −0 hw/hppa/Kconfig
  49. +0 −1 hw/hppa/hppa_hardware.h
  50. +289 −78 hw/hppa/machine.c
  51. +1 −2 hw/i386/Kconfig
  52. +1 −5 hw/i386/acpi-build.c
  53. +2 −3 hw/i386/amd_iommu.c
  54. +104 −51 hw/i386/intel_iommu.c
  55. +1 −0 hw/i386/intel_iommu_internal.h
  56. +1 −1 hw/i386/microvm.c
  57. +11 −10 hw/i386/pc.c
  58. +93 −32 hw/i386/pc_piix.c
  59. +7 −7 hw/i386/pc_q35.c
  60. +1 −1 hw/input/adb-kbd.c
  61. +3 −3 hw/input/hid.c
  62. +10 −0 hw/input/lasips2.c
  63. +2 −2 hw/input/ps2.c
  64. +4 −4 hw/input/virtio-input-hid.c
  65. +4 −0 hw/intc/apic_common.c
  66. +1 −2 hw/intc/arm_gic_kvm.c
  67. +1 −2 hw/intc/arm_gicv3_its_kvm.c
  68. +1 −2 hw/intc/arm_gicv3_kvm.c
  69. +6 −6 hw/intc/spapr_xive.c
  70. +1 −7 hw/isa/Kconfig
  71. +4 −1 hw/isa/i82378.c
  72. +9 −2 hw/isa/isa-bus.c
  73. +6 −3 hw/isa/lpc_ich9.c
  74. +1 −2 hw/isa/meson.build
  75. +207 −74 hw/isa/{piix3.c → piix.c}
  76. +0 −302 hw/isa/piix4.c
  77. +1 −1 hw/loongarch/virt.c
  78. +1 −1 hw/mips/Kconfig
  79. +0 −1 hw/mips/cps.c
  80. +0 −1 hw/mips/fuloong2e.c
  81. +4 −2 hw/mips/jazz.c
  82. +0 −1 hw/mips/loongson3_virt.c
  83. +4 −4 hw/mips/malta.c
  84. +0 −1 hw/mips/mips_int.c
  85. +0 −1 hw/mips/mipssim.c
  86. +9 −11 hw/misc/allwinner-r40-dramc.c
  87. +1 −1 hw/misc/bcm2835_property.c
  88. +2 −6 hw/misc/ivshmem.c
  89. +2 −2 hw/misc/mips_itu.c
  90. +2 −5 hw/net/cadence_gem.c
  91. +1 −1 hw/net/tulip.c
  92. +3 −3 hw/net/virtio-net.c
  93. +5 −3 hw/nvram/xlnx-bbram.c
  94. +5 −3 hw/nvram/xlnx-versal-efuse-ctrl.c
  95. +5 −3 hw/nvram/xlnx-zynqmp-efuse.c
  96. +4 −0 hw/pci-host/Kconfig
  97. +885 −0 hw/pci-host/astro.c
  98. +13 −17 hw/pci-host/bonito.c
  99. +1 −0 hw/pci-host/meson.build
  100. +26 −31 hw/pci-host/sh_pci.c
  101. +11 −0 hw/pci-host/trace-events
  102. +9 −16 hw/pci/pci.c
  103. +1 −1 hw/ppc/pef.c
  104. +5 −21 hw/ppc/pnv.c
  105. +2 −3 hw/ppc/pnv_xscom.c
  106. +1 −8 hw/ppc/spapr.c
  107. +5 −1 hw/ppc/spapr_events.c
  108. +1 −1 hw/ppc/spapr_rtas.c
  109. +2 −1 hw/ppc/spapr_vio.c
  110. +2 −5 hw/remote/proxy.c
  111. +469 −0 hw/s390x/cpu-topology.c
  112. +3 −4 hw/s390x/css-bridge.c
  113. +1 −0 hw/s390x/meson.build
  114. +30 −8 hw/s390x/s390-virtio-ccw.c
  115. +5 −0 hw/s390x/sclp.c
  116. +4 −4 hw/s390x/sclpquiesce.c
  117. +24 −23 hw/scsi/vhost-scsi-common.c
  118. +7 −7 hw/scsi/vhost-scsi.c
  119. +216 −34 hw/scsi/vhost-user-scsi.c
  120. +1 −1 hw/scsi/virtio-scsi.c
  121. +11 −4 hw/sd/sdhci.c
  122. +4 −4 hw/sparc64/sun4u.c
  123. +1 −3 hw/timer/i8254_common.c
  124. +3 −0 hw/timer/npcm7xx_timer.c
  125. +2 −8 hw/vfio/common.c
  126. +5 −17 hw/vfio/migration.c
  127. +0 −6 hw/virtio/vhost-backend.c
  128. +1 −1 hw/virtio/vhost-shadow-virtqueue.c
  129. +1 −0 hw/virtio/vhost-shadow-virtqueue.h
  130. +2 −3 hw/virtio/vhost-user-gpio.c
  131. +125 −114 hw/virtio/vhost-user.c
  132. +11 −6 hw/virtio/vhost.c
  133. +1 −4 hw/virtio/virtio-pmem.c
  134. +4 −0 hw/virtio/virtio.c
  135. +2 −0 include/exec/memory.h
  136. +1 −0 include/hw/acpi/cxl.h
  137. +1 −1 include/hw/acpi/pcihp.h
  138. +35 −0 include/hw/arm/bsa.h
  139. +1 −1 include/hw/arm/exynos4210.h
  140. 0 include/hw/{misc → arm}/raspberrypi-fw-defs.h
  141. +1 −11 include/hw/arm/virt.h
  142. +0 −10 include/hw/audio/pcspk.h
  143. +9 −1 include/hw/boards.h
  144. +3 −1 include/hw/core/cpu.h
  145. +1 −1 include/hw/core/sysemu-cpu-ops.h
  146. +2 −0 include/hw/i386/pc.h
  147. +0 −14 include/hw/mips/cpudevs.h
  148. +3 −1 include/hw/misc/mips_itu.h
  149. +1 −1 include/hw/nvram/xlnx-bbram.h
  150. +92 −0 include/hw/pci-host/astro.h
  151. +3 −6 include/hw/pci/pci.h
  152. +2 −0 include/hw/pci/pci_ids.h
  153. +1 −1 include/hw/ppc/pnv_xscom.h
  154. +4 −0 include/hw/qdev-properties-system.h
  155. +83 −0 include/hw/s390x/cpu-topology.h
  156. +6 −0 include/hw/s390x/s390-virtio-ccw.h
  157. +3 −1 include/hw/s390x/sclp.h
  158. +20 −8 include/hw/southbridge/piix.h
  159. +1 −1 include/hw/virtio/vhost-scsi-common.h
  160. +6 −0 include/hw/virtio/vhost-user-scsi.h
  161. +4 −2 include/hw/virtio/vhost-user.h
  162. +12 −0 include/hw/virtio/vhost.h
  163. +1 −1 include/hw/virtio/virtio-input.h
  164. +17 −7 include/migration/blocker.h
  165. +4 −2 include/migration/misc.h
  166. +1 −1 include/sysemu/memory_mapping.h
  167. +1 −1 include/ui/input.h
  168. +5 −2 meson.build
  169. +30 −14 migration/migration.c
  170. +0 −3 migration/multifd.c
  171. +3 −2 migration/ram.c
  172. +246 −135 net/vhost-vdpa.c
  173. BIN pc-bios/hppa-firmware.img
  174. +2 −2 qapi/compat.json
  175. +21 −0 qapi/machine-common.json
  176. +121 −0 qapi/machine-target.json
  177. +63 −22 qapi/machine.json
  178. +1 −0 qapi/meson.build
  179. +1 −0 qapi/qapi-schema.json
  180. +5 −2 qemu-options.hx
  181. +1 −1 roms/seabios-hppa
  182. +1 −1 scripts/qapi/gen.py
  183. +3 −2 scripts/qapi/parser.py
  184. +5 −0 scripts/qapi/schema.py
  185. +2 −2 stubs/migr-blocker.c
  186. +2 −1 subprojects/libvhost-user/libvhost-user.h
  187. +8 −9 system/memory_mapping.c
  188. +6 −0 system/vl.c
  189. +1 −52 target/arm/arm-powerctl.c
  190. +1 −3 target/arm/common-semi-target.h
  191. +0 −2 target/arm/cpu-qom.h
  192. +95 −0 target/arm/cpu.c
  193. +22 −0 target/arm/cpu.h
  194. +2 −17 target/arm/helper.c
  195. +6 −22 target/arm/kvm.c
  196. +33 −91 target/arm/kvm64.c
  197. +4 −0 target/arm/tcg/cpu32.c
  198. +1 −0 target/arm/tcg/cpu64.c
  199. +23 −14 target/arm/tcg/translate.c
  200. +4 −2 target/i386/arch_memory_mapping.c
  201. +1 −1 target/i386/cpu.h
  202. +4 −4 target/i386/kvm/kvm.c
  203. +1 −2 target/i386/nvmm/nvmm-all.c
  204. +1 −1 target/i386/sev.c
  205. +1 −2 target/i386/whpx/whpx-all.c
  206. +3 −4 target/mips/cpu.h
  207. +0 −1 target/mips/sysemu/cp0_timer.c
  208. +1 −0 target/mips/tcg/sysemu/cp0_helper.c
  209. +0 −1 target/mips/tcg/sysemu/tlb_helper.c
  210. +13 −0 target/s390x/cpu-sysemu.c
  211. +16 −0 target/s390x/cpu.c
  212. +82 −0 target/s390x/cpu.h
  213. +1 −0 target/s390x/cpu_models.c
  214. +78 −88 target/s390x/kvm/kvm.c
  215. +1 −0 target/s390x/kvm/kvm_s390x.h
  216. +2 −1 target/s390x/kvm/meson.build
  217. +334 −0 target/s390x/kvm/stsi-topology.c
  218. +439 −0 tests/avocado/s390_topology.py
  219. BIN tests/data/acpi/q35/APIC.core-count
  220. BIN tests/data/acpi/q35/APIC.core-count2
  221. BIN tests/data/acpi/q35/APIC.thread-count
  222. BIN tests/data/acpi/q35/APIC.thread-count2
  223. BIN tests/data/acpi/q35/APIC.type4-count
  224. BIN tests/data/acpi/q35/DSDT.core-count
  225. BIN tests/data/acpi/q35/DSDT.core-count2
  226. BIN tests/data/acpi/q35/DSDT.cxl
  227. BIN tests/data/acpi/q35/DSDT.thread-count
  228. BIN tests/data/acpi/q35/DSDT.thread-count2
  229. BIN tests/data/acpi/q35/DSDT.type4-count
  230. BIN tests/data/acpi/q35/FACP.core-count
  231. BIN tests/data/acpi/q35/FACP.thread-count
  232. BIN tests/data/acpi/q35/FACP.thread-count2
  233. BIN tests/data/acpi/q35/FACP.type4-count
  234. +113 −3 tests/qtest/bios-tables-test.c
  235. +83 −15 tests/qtest/libqtest.c
  236. +32 −0 tests/qtest/libqtest.h
  237. +52 −0 tests/qtest/migration-helpers.c
  238. +4 −0 tests/qtest/migration-helpers.h
  239. +47 −7 tests/qtest/migration-test.c
  240. +54 −13 tests/unit/test-smp-parse.c
  241. +1 −1 ui/input-legacy.c
  242. +2 −2 ui/input.c
  243. +1 −2 ui/spice-core.c
  244. +3 −4 ui/vdagent.c
  245. +11 −7 util/cutils.c
3 changes: 3 additions & 0 deletions .mailmap
Expand Up @@ -81,6 +81,9 @@ Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
Leif Lindholm <quic_llindhol@quicinc.com> <leif.lindholm@linaro.org>
Leif Lindholm <quic_llindhol@quicinc.com> <leif@nuviainc.com>
Luc Michel <luc@lmichel.fr> <luc.michel@git.antfield.fr>
Luc Michel <luc@lmichel.fr> <luc.michel@greensocs.com>
Luc Michel <luc@lmichel.fr> <lmichel@kalray.eu>
Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
Paul Brook <paul@nowt.org> <paul@codesourcery.com>
Paul Burton <paulburton@kernel.org> <paul.burton@mips.com>
Expand Down
41 changes: 33 additions & 8 deletions MAINTAINERS
Expand Up @@ -295,6 +295,7 @@ S: Odd Fixes
F: docs/system/openrisc/cpu-features.rst
F: target/openrisc/
F: hw/openrisc/
F: include/hw/openrisc/
F: tests/tcg/openrisc/

PowerPC TCG CPUs
Expand Down Expand Up @@ -885,7 +886,7 @@ S: Odd Fixes
F: hw/arm/raspi.c
F: hw/arm/raspi_platform.h
F: hw/*/bcm283*
F: include/hw/arm/raspi*
F: include/hw/arm/rasp*
F: include/hw/*/bcm283*
F: docs/system/arm/raspi.rst

Expand Down Expand Up @@ -1173,19 +1174,24 @@ F: hw/*/etraxfs_*.c

HP-PARISC Machines
------------------
HP B160L
HP B160L, HP C3700
M: Richard Henderson <richard.henderson@linaro.org>
R: Helge Deller <deller@gmx.de>
S: Odd Fixes
F: configs/devices/hppa-softmmu/default.mak
F: hw/hppa/
F: hw/input/lasips2.c
F: hw/net/*i82596*
F: hw/misc/lasi.c
F: hw/pci-host/astro.c
F: hw/pci-host/dino.c
F: include/hw/input/lasips2.h
F: include/hw/misc/lasi.h
F: include/hw/net/lasi_82596.h
F: include/hw/pci-host/astro.h
F: include/hw/pci-host/dino.h
F: pc-bios/hppa-firmware.img
F: roms/seabios-hppa/

LoongArch Machines
------------------
Expand Down Expand Up @@ -1302,7 +1308,7 @@ Malta
M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Aurelien Jarno <aurelien@aurel32.net>
S: Odd Fixes
F: hw/isa/piix4.c
F: hw/isa/piix.c
F: hw/acpi/piix4.c
F: hw/mips/malta.c
F: hw/pci-host/gt64120.c
Expand All @@ -1322,10 +1328,7 @@ M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
S: Odd Fixes
F: hw/mips/fuloong2e.c
F: hw/isa/vt82c686.c
F: hw/pci-host/bonito.c
F: hw/usb/vt82c686-uhci-pci.c
F: include/hw/isa/vt82c686.h
F: include/hw/pci-host/bonito.h
F: tests/avocado/machine_mips_fuloong2e.py

Expand All @@ -1337,6 +1340,7 @@ F: hw/intc/loongson_liointc.c
F: hw/mips/loongson3_bootp.c
F: hw/mips/loongson3_bootp.h
F: hw/mips/loongson3_virt.c
F: include/hw/intc/loongson_liointc.h
F: tests/avocado/machine_mips_loongson3v.py

Boston
Expand Down Expand Up @@ -1710,6 +1714,16 @@ F: hw/s390x/event-facility.c
F: hw/s390x/sclp*.c
L: qemu-s390x@nongnu.org

S390 CPU topology
M: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
S: Supported
F: include/hw/s390x/cpu-topology.h
F: hw/s390x/cpu-topology.c
F: target/s390x/kvm/stsi-topology.c
F: docs/devel/s390-cpu-topology.rst
F: docs/system/s390x/cpu-topology.rst
F: tests/avocado/s390_topology.py

X86 Machines
------------
PC
Expand All @@ -1724,7 +1738,7 @@ F: hw/pci-host/pam.c
F: include/hw/pci-host/i440fx.h
F: include/hw/pci-host/q35.h
F: include/hw/pci-host/pam.h
F: hw/isa/piix3.c
F: hw/isa/piix.c
F: hw/isa/lpc_ich9.c
F: hw/i2c/smbus_ich9.c
F: hw/acpi/piix4.c
Expand Down Expand Up @@ -1764,6 +1778,7 @@ F: include/hw/dma/i8257.h
F: include/hw/i2c/pm_smbus.h
F: include/hw/input/i8042.h
F: include/hw/intc/ioapic*
F: include/hw/intc/i8259.h
F: include/hw/isa/i8259_internal.h
F: include/hw/isa/superio.h
F: include/hw/timer/hpet.h
Expand Down Expand Up @@ -1793,6 +1808,7 @@ F: hw/core/null-machine.c
F: hw/core/numa.c
F: hw/cpu/cluster.c
F: qapi/machine.json
F: qapi/machine-common.json
F: qapi/machine-target.json
F: include/hw/boards.h
F: include/hw/core/cpu.h
Expand Down Expand Up @@ -2478,9 +2494,18 @@ PIIX4 South Bridge (i82371AB)
M: Hervé Poussineau <hpoussin@reactos.org>
M: Philippe Mathieu-Daudé <philmd@linaro.org>
S: Maintained
F: hw/isa/piix4.c
F: hw/isa/piix.c
F: include/hw/southbridge/piix.h

VIA South Bridges (VT82C686B, VT8231)
M: BALATON Zoltan <balaton@eik.bme.hu>
M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
S: Maintained
F: hw/isa/vt82c686.c
F: hw/usb/vt82c686-uhci-pci.c
F: include/hw/isa/vt82c686.h

Firmware configuration (fw_cfg)
M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Gerd Hoffmann <kraxel@redhat.com>
Expand Down
10 changes: 2 additions & 8 deletions backends/tpm/tpm_emulator.c
Expand Up @@ -534,11 +534,8 @@ static int tpm_emulator_block_migration(TPMEmulator *tpm_emu)
error_setg(&tpm_emu->migration_blocker,
"Migration disabled: TPM emulator does not support "
"migration");
if (migrate_add_blocker(tpm_emu->migration_blocker, &err) < 0) {
if (migrate_add_blocker(&tpm_emu->migration_blocker, &err) < 0) {
error_report_err(err);
error_free(tpm_emu->migration_blocker);
tpm_emu->migration_blocker = NULL;

return -1;
}
}
Expand Down Expand Up @@ -1016,10 +1013,7 @@ static void tpm_emulator_inst_finalize(Object *obj)

qapi_free_TPMEmulatorOptions(tpm_emu->options);

if (tpm_emu->migration_blocker) {
migrate_del_blocker(tpm_emu->migration_blocker);
error_free(tpm_emu->migration_blocker);
}
migrate_del_blocker(&tpm_emu->migration_blocker);

tpm_sized_buffer_reset(&state_blobs->volatil);
tpm_sized_buffer_reset(&state_blobs->permanent);
Expand Down
9 changes: 3 additions & 6 deletions block/parallels.c
Expand Up @@ -1369,9 +1369,8 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
bdrv_get_device_or_node_name(bs));
bdrv_graph_rdunlock_main_loop();

ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_setg(errp, "Migration blocker error");
goto fail;
}
qemu_co_mutex_init(&s->lock);
Expand Down Expand Up @@ -1406,7 +1405,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
ret = bdrv_check(bs, &res, BDRV_FIX_ERRORS | BDRV_FIX_LEAKS);
if (ret < 0) {
error_setg_errno(errp, -ret, "Could not repair corrupted image");
migrate_del_blocker(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
goto fail;
}
}
Expand All @@ -1423,7 +1422,6 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
*/
parallels_free_used_bitmap(bs);

error_free(s->migration_blocker);
g_free(s->bat_dirty_bmap);
qemu_vfree(s->header);
return ret;
Expand All @@ -1448,8 +1446,7 @@ static void parallels_close(BlockDriverState *bs)
g_free(s->bat_dirty_bmap);
qemu_vfree(s->header);

migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}

static bool parallels_is_support_dirty_bitmaps(BlockDriverState *bs)
Expand Down
6 changes: 2 additions & 4 deletions block/qcow.c
Expand Up @@ -307,9 +307,8 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
bdrv_get_device_or_node_name(bs));
bdrv_graph_rdunlock_main_loop();

ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}

Expand Down Expand Up @@ -802,8 +801,7 @@ static void qcow_close(BlockDriverState *bs)
g_free(s->cluster_cache);
g_free(s->cluster_data);

migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}

static int coroutine_fn GRAPH_UNLOCKED
Expand Down
6 changes: 2 additions & 4 deletions block/vdi.c
Expand Up @@ -498,9 +498,8 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags,
bdrv_get_device_or_node_name(bs));
bdrv_graph_rdunlock_main_loop();

ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail_free_bmap;
}

Expand Down Expand Up @@ -988,8 +987,7 @@ static void vdi_close(BlockDriverState *bs)

qemu_vfree(s->bmap);

migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}

static int vdi_has_zero_init(BlockDriverState *bs)
Expand Down
6 changes: 2 additions & 4 deletions block/vhdx.c
Expand Up @@ -985,8 +985,7 @@ static void vhdx_close(BlockDriverState *bs)
s->bat = NULL;
qemu_vfree(s->parent_entries);
s->parent_entries = NULL;
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
qemu_vfree(s->log.hdr);
s->log.hdr = NULL;
vhdx_region_unregister_all(s);
Expand Down Expand Up @@ -1097,9 +1096,8 @@ static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
error_setg(&s->migration_blocker, "The vhdx format used by node '%s' "
"does not support live migration",
bdrv_get_device_or_node_name(bs));
ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}

Expand Down
6 changes: 2 additions & 4 deletions block/vmdk.c
Expand Up @@ -1386,9 +1386,8 @@ static int vmdk_open(BlockDriverState *bs, QDict *options, int flags,
error_setg(&s->migration_blocker, "The vmdk format used by node '%s' "
"does not support live migration",
bdrv_get_device_or_node_name(bs));
ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}

Expand Down Expand Up @@ -2867,8 +2866,7 @@ static void vmdk_close(BlockDriverState *bs)
vmdk_free_extents(bs);
g_free(s->create_type);

migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}

static int64_t coroutine_fn GRAPH_RDLOCK
Expand Down
6 changes: 2 additions & 4 deletions block/vpc.c
Expand Up @@ -452,9 +452,8 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
bdrv_get_device_or_node_name(bs));
bdrv_graph_rdunlock_main_loop();

ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}

Expand Down Expand Up @@ -1190,8 +1189,7 @@ static void vpc_close(BlockDriverState *bs)
g_free(s->pageentry_u8);
#endif

migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}

static QemuOptsList vpc_create_opts = {
Expand Down
6 changes: 2 additions & 4 deletions block/vvfat.c
Expand Up @@ -1268,9 +1268,8 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
"The vvfat (rw) format used by node '%s' "
"does not support live migration",
bdrv_get_device_or_node_name(bs));
ret = migrate_add_blocker(s->migration_blocker, errp);
ret = migrate_add_blocker(&s->migration_blocker, errp);
if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}
}
Expand Down Expand Up @@ -3239,8 +3238,7 @@ static void vvfat_close(BlockDriverState *bs)
g_free(s->cluster_buffer);

if (s->qcow) {
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
migrate_del_blocker(&s->migration_blocker);
}
}

Expand Down
2 changes: 1 addition & 1 deletion chardev/msmouse.c
Expand Up @@ -171,7 +171,7 @@ static int msmouse_chr_write(struct Chardev *s, const uint8_t *buf, int len)
return len;
}

static QemuInputHandler msmouse_handler = {
static const QemuInputHandler msmouse_handler = {
.name = "QEMU Microsoft Mouse",
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
.event = msmouse_input_event,
Expand Down
2 changes: 1 addition & 1 deletion chardev/wctablet.c
Expand Up @@ -178,7 +178,7 @@ static void wctablet_input_sync(DeviceState *dev)
}
}

static QemuInputHandler wctablet_handler = {
static const QemuInputHandler wctablet_handler = {
.name = "QEMU Wacom Pen Tablet",
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_ABS,
.event = wctablet_input_event,
Expand Down
7 changes: 2 additions & 5 deletions contrib/elf2dmp/addrspace.c
Expand Up @@ -72,10 +72,7 @@ int pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf)
}
}

ps->block = malloc(sizeof(*ps->block) * ps->block_nr);
if (!ps->block) {
return 1;
}
ps->block = g_new(struct pa_block, ps->block_nr);

for (i = 0; i < phdr_nr; i++) {
if (phdr[i].p_type == PT_LOAD) {
Expand All @@ -97,7 +94,7 @@ int pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf)
void pa_space_destroy(struct pa_space *ps)
{
ps->block_nr = 0;
free(ps->block);
g_free(ps->block);
}

void va_space_set_dtb(struct va_space *vs, uint64_t dtb)
Expand Down