Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 09ad643823dcda0a86eddce1291c28d0ccb09a3b https://github.com/qemu/qemu/commit/09ad643823dcda0a86eddce1291c28d0ccb09a3b Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017)
Changed paths: M include/hw/boards.h Log Message: ----------- include/hw/boards.h: Document memory_region_allocate_system_memory() Add a documentation comment for memory_region_allocate_system_memory(). In particular, the reason for this function's existence and the requirement on board code to call it exactly once are non-obvious. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-2-git-send-email-peter.mayd...@linaro.org Commit: a5c0234bb2754f5248e67929a34c843dbe039da5 https://github.com/qemu/qemu/commit/a5c0234bb2754f5248e67929a34c843dbe039da5 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M include/exec/memory.h Log Message: ----------- memory: Document that the RAM MR initializers do not handle migration The various functions for initializing RAM MemoryRegions do not do anything to cause the data in the MemoryRegion to be migrated. Note in their documentation comments that this is the responsibility of the caller. (We will shortly add a new function that *does* do this for you.) Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-3-git-send-email-peter.mayd...@linaro.org Commit: 1cfe48c1ce219b60a9096312f7a61806fae64ab3 https://github.com/qemu/qemu/commit/1cfe48c1ce219b60a9096312f7a61806fae64ab3 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M backends/hostmem-ram.c M hw/arm/aspeed_soc.c M hw/arm/exynos4210.c M hw/arm/exynos4_boards.c M hw/arm/fsl-imx25.c M hw/arm/fsl-imx31.c M hw/arm/fsl-imx6.c M hw/arm/highbank.c M hw/arm/integratorcp.c M hw/arm/mainstone.c M hw/arm/musicpal.c M hw/arm/omap1.c M hw/arm/omap2.c M hw/arm/omap_sx1.c M hw/arm/palm.c M hw/arm/pxa2xx.c M hw/arm/realview.c M hw/arm/spitz.c M hw/arm/stellaris.c M hw/arm/stm32f205_soc.c M hw/arm/tosa.c M hw/arm/vexpress.c M hw/arm/virt.c M hw/arm/xilinx_zynq.c M hw/arm/xlnx-zynqmp.c M hw/block/onenand.c M hw/cris/axis_dev88.c M hw/display/cg3.c M hw/display/qxl.c M hw/display/sm501.c M hw/display/tc6393xb.c M hw/display/tcx.c M hw/display/vga.c M hw/display/vmware_vga.c M hw/i386/pc.c M hw/i386/pc_sysfw.c M hw/i386/pci-assign-load-rom.c M hw/i386/xen/xen-hvm.c M hw/input/milkymist-softusb.c M hw/m68k/an5206.c M hw/m68k/mcf5208.c M hw/microblaze/petalogix_ml605_mmu.c M hw/microblaze/petalogix_s3adsp1800_mmu.c M hw/mips/mips_fulong2e.c M hw/mips/mips_jazz.c M hw/mips/mips_malta.c M hw/mips/mips_mipssim.c M hw/mips/mips_r4k.c M hw/moxie/moxiesim.c M hw/net/dp8393x.c M hw/net/milkymist-minimac2.c M hw/nios2/10m50_devboard.c M hw/openrisc/openrisc_sim.c M hw/pci-host/prep.c M hw/pci-host/xilinx-pcie.c M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c M hw/ppc/ppc405_boards.c M hw/ppc/ppc405_uc.c M hw/s390x/sclp.c M hw/sh4/r2d.c M hw/sh4/shix.c M hw/sparc/leon3.c M hw/sparc/sun4m.c M hw/sparc64/sun4u.c M hw/tricore/tricore_testboard.c M hw/unicore32/puv3.c M hw/xtensa/sim.c M hw/xtensa/xtfpga.c M include/exec/memory.h M memory.c M numa.c Log Message: ----------- memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() Rename memory_region_init_ram() to memory_region_init_ram_nomigrate(). This leaves the way clear for us to provide a memory_region_init_ram() which does handle migration. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-4-git-send-email-peter.mayd...@linaro.org Commit: b59821a95bd1d7cb4697fd7748725c910582e0e7 https://github.com/qemu/qemu/commit/b59821a95bd1d7cb4697fd7748725c910582e0e7 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M hw/arm/aspeed.c M hw/arm/fsl-imx25.c M hw/arm/fsl-imx31.c M hw/arm/fsl-imx6.c M hw/block/pflash_cfi01.c M hw/block/pflash_cfi02.c M hw/mips/boston.c M hw/pci/pci.c M include/exec/memory.h M memory.c Log Message: ----------- memory: Rename memory_region_init_rom() and _rom_device() to _nomigrate() Rename memory_region_init_rom() to memory_region_init_rom_nomigrate() and memory_region_init_rom_device() to memory_region_init_rom_device_nomigrate(). Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-5-git-send-email-peter.mayd...@linaro.org Commit: b08199c6fbea194fac7f97fd8eaa7f3fb7186600 https://github.com/qemu/qemu/commit/b08199c6fbea194fac7f97fd8eaa7f3fb7186600 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M include/exec/memory.h M include/hw/boards.h M memory.c Log Message: ----------- memory.h: Add memory_region_init_{ram, rom, rom_device}() handling migration Add new utility functions which both initialize a RAM MemoryRegion and arrange for its contents to be migrated; we give thes the memory_region_init_ram(), memory_region_init_rom() and memory_region_init_rom_device() names that we just freed up by renaming the old implementations to _nomigrate(). Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-6-git-send-email-peter.mayd...@linaro.org Commit: 96d851a64b42aea4974f2c25a56cd2a05f34905d https://github.com/qemu/qemu/commit/96d851a64b42aea4974f2c25a56cd2a05f34905d Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: A scripts/coccinelle/memory-region-init-ram.cocci Log Message: ----------- scripts/coccinelle/memory-region-init-ram.cocci: New script Add a coccinelle script that can be used to automatically convert manual sequences of memory_region_init_ram_nomigrate() vmstate_register_ram{,_global}() to use the new memory_region_init_ram() Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-7-git-send-email-peter.mayd...@linaro.org Commit: 98a99ce0840991ed28fd4c570ae549c371e89970 https://github.com/qemu/qemu/commit/98a99ce0840991ed28fd4c570ae549c371e89970 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M hw/arm/exynos4210.c M hw/arm/exynos4_boards.c M hw/arm/fsl-imx25.c M hw/arm/fsl-imx31.c M hw/arm/fsl-imx6.c M hw/arm/mainstone.c M hw/arm/musicpal.c M hw/arm/omap1.c M hw/arm/omap2.c M hw/arm/omap_sx1.c M hw/arm/palm.c M hw/arm/pxa2xx.c M hw/arm/realview.c M hw/arm/spitz.c M hw/arm/stellaris.c M hw/arm/stm32f205_soc.c M hw/arm/tosa.c M hw/arm/vexpress.c M hw/arm/virt.c M hw/arm/xilinx_zynq.c M hw/arm/xlnx-zynqmp.c M hw/cris/axis_dev88.c M hw/display/cg3.c M hw/display/tc6393xb.c M hw/display/vmware_vga.c M hw/i386/pc.c M hw/i386/pc_sysfw.c M hw/i386/xen/xen-hvm.c M hw/m68k/an5206.c M hw/m68k/mcf5208.c M hw/microblaze/petalogix_ml605_mmu.c M hw/microblaze/petalogix_s3adsp1800_mmu.c M hw/mips/mips_fulong2e.c M hw/mips/mips_jazz.c M hw/mips/mips_mipssim.c M hw/mips/mips_r4k.c M hw/moxie/moxiesim.c M hw/nios2/10m50_devboard.c M hw/openrisc/openrisc_sim.c M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c M hw/ppc/ppc405_boards.c M hw/ppc/ppc405_uc.c M hw/s390x/sclp.c M hw/sh4/r2d.c M hw/sh4/shix.c M hw/sparc/leon3.c M hw/tricore/tricore_testboard.c M hw/unicore32/puv3.c M hw/xtensa/sim.c M hw/xtensa/xtfpga.c Log Message: ----------- hw: Use new memory_region_init_{ram, rom, rom_device}() functions Use the new functions memory_region_init_{ram,rom,rom_device}() instead of manually calling the _nomigrate() version and then vmstate_register_ram_global(). Patch automatically created using coccinelle script: spatch --in-place -sp_file scripts/coccinelle/memory-region-init-ram.cocci -dir hw (As it turns out, there are no instances of the rom and rom_device functions that are caught by this script.) Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-8-git-send-email-peter.mayd...@linaro.org Commit: bba3ddf72e75e0a0067aff2af424a5fd27004883 https://github.com/qemu/qemu/commit/bba3ddf72e75e0a0067aff2af424a5fd27004883 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M hw/block/pflash_cfi01.c M hw/block/pflash_cfi02.c Log Message: ----------- hw/block/pflash_cfi01, pflash_cfi02: Use memory_region_init_rom_device() Since we pass the same DeviceState object to memory_region_init_rom_device_nomigrate() and vmstate_register_ram(), we can switch to using memory_region_init_rom_device() instead. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-9-git-send-email-peter.mayd...@linaro.org Commit: fefa92565f9a032dce974a0a6e1f296d449498f3 https://github.com/qemu/qemu/commit/fefa92565f9a032dce974a0a6e1f296d449498f3 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M hw/pci/pci.c Log Message: ----------- hw/pci/pci.c: Use memory_region_init_rom() Since we pass the same DeviceState object to memory_region_init_rom_nomigrate() and vmstate_register_ram(), we can switch to using memory_region_init_rom() instead. (This isn't entirely obvious from the code since it is using &pdev->qdev rather than DEVICE(pdov) for some reason, but PCIDevice does indeed use 'qdev' for its parent DeviceState member.) Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-10-git-send-email-peter.mayd...@linaro.org Commit: ce66d778cd7d2dc446b3676d32a70c38a07de554 https://github.com/qemu/qemu/commit/ce66d778cd7d2dc446b3676d32a70c38a07de554 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M hw/display/qxl.c Log Message: ----------- hw/display/qxl.c Use memory_region_init_ram() Switch to memory_region_init_ram(), since we pass the same DeviceState to both memory_region_init_ram_nomigrate() and vmstate_register_ram(). Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-11-git-send-email-peter.mayd...@linaro.org Commit: 2286468faceccb54a102e66331a40f7ab45f412c https://github.com/qemu/qemu/commit/2286468faceccb54a102e66331a40f7ab45f412c Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-07-14 (Fri, 14 Jul 2017) Changed paths: M docs/devel/memory.txt Log Message: ----------- docs/devel/memory.txt: Add section about RAM migration Add a section to docs/devel/memory.txt about migration of the backing memory for RAM regions. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 1499438577-7674-12-git-send-email-peter.mayd...@linaro.org Compare: https://github.com/qemu/qemu/compare/4871b51b9241...2286468facec