Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: 1e2c22c98fce5c57fbcb179799ff5e4e047e1bd0 https://github.com/qemu/qemu/commit/1e2c22c98fce5c57fbcb179799ff5e4e047e1bd0 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023)
Changed paths: M hw/arm/aspeed.c Log Message: ----------- aspeed: Introduce helper for 32-bit hosts limitation On 32-bit hosts, RAM has a 2047 MB limit. Use a macro to define the default ram size of machines (AST2600 SoC) that can have 2 GB. Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Alex Bennée <alex.ben...@linaro.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 97b8aa5ae9ff197394395eda5062ea3681e09c28 https://github.com/qemu/qemu/commit/97b8aa5ae9ff197394395eda5062ea3681e09c28 Author: Hang Yu <francis_...@stu.pku.edu.cn> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/i2c/aspeed_i2c.c M include/hw/i2c/aspeed_i2c.h Log Message: ----------- hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode Fixed inconsistency between the regisiter bit field definition header file and the ast2600 datasheet. The reg name is I2CD1C:Pool Buffer Control Register in old register mode and I2CC0C: Master/Slave Pool Buffer Control Register in new register mode. They share bit field [12:8]:Transmit Data Byte Count and bit field [29:24]:Actual Received Pool Buffer Size according to the datasheet. According to the ast2600 datasheet,the actual Tx count is Transmit Data Byte Count plus 1, and the max Rx size is Receive Pool Buffer Size plus 1, both in Pool Buffer Control Register. The version before forgot to plus 1, and mistake Rx count for Rx size. Signed-off-by: Hang Yu <francis_...@stu.pku.edu.cn> Fixes: 3be3d6ccf2ad ("aspeed: i2c: Migrate to registerfields API") Reviewed-by: Cédric Le Goater <c...@kaod.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 961faf3ddbd8ffcdf776bbcf88af0bc97218114a https://github.com/qemu/qemu/commit/961faf3ddbd8ffcdf776bbcf88af0bc97218114a Author: Hang Yu <francis_...@stu.pku.edu.cn> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/i2c/aspeed_i2c.c Log Message: ----------- hw/i2c/aspeed: Fix TXBUF transmission start position error According to the ast2600 datasheet and the linux aspeed i2c driver, the TXBUF transmission start position should be TXBUF[0] instead of TXBUF[1],so the arg pool_start is useless,and the address is not included in TXBUF.So even if Tx Count equals zero,there is at least 1 byte data needs to be transmitted,and M_TX_CMD should not be cleared at this condition.The driver url is: https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/i2c/busses/i2c-ast2600.c Signed-off-by: Hang Yu <francis_...@stu.pku.edu.cn> Fixes: 6054fc73e8f4 ("aspeed/i2c: Add support for pool buffer transfers") Reviewed-by: Cédric Le Goater <c...@kaod.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: acc3d20ab21b1e55619089d15ac29cf26e373fc9 https://github.com/qemu/qemu/commit/acc3d20ab21b1e55619089d15ac29cf26e373fc9 Author: Hang Yu <francis_...@stu.pku.edu.cn> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/i2c/aspeed_i2c.c M include/hw/i2c/aspeed_i2c.h Log Message: ----------- hw/i2c/aspeed: Add support for buffer organization Added support for the buffer organization option in pool buffer control register.when set to 1,The buffer is split into two parts: Lower 16 bytes for Tx and higher 16 bytes for Rx. Signed-off-by: Hang Yu <francis_...@stu.pku.edu.cn> Reviewed-by: Cédric Le Goater <c...@kaod.org> [ clg: checkpatch fixes ] Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 9bf9865c5eb4a893b800eade8873b1795b64d555 https://github.com/qemu/qemu/commit/9bf9865c5eb4a893b800eade8873b1795b64d555 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M tests/avocado/machine_aspeed.py Log Message: ----------- tests/avocado/machine_aspeed.py: Update SDK images Switch to the latest v8.06 release which introduces interesting changes for the AST2600 I2C and I3C models. Also take the AST2600 A2 images instead of the default since QEMU tries to model The AST2600 A3 SoC. Signed-off-by: Cédric Le Goater <c...@kaod.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 243975c0553a61646e7c24beaa12f4451536ea6b https://github.com/qemu/qemu/commit/243975c0553a61646e7c24beaa12f4451536ea6b Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/ssi/ssi.c M include/hw/ssi/ssi.h Log Message: ----------- hw/ssi: Add a "cs" property to SSIPeripheral Boards will use this new property to identify the device CS line and wire the SPI controllers accordingly. Cc: Alistair Francis <alist...@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 8a211fa3b2189735177f3c529dabc8ebc37042fa https://github.com/qemu/qemu/commit/8a211fa3b2189735177f3c529dabc8ebc37042fa Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/ssi/ssi.c M include/hw/ssi/ssi.h Log Message: ----------- hw/ssi: Introduce a ssi_get_cs() helper Simple routine to retrieve a DeviceState object on a SPI bus using its CS index. It will be useful for the board to wire the CS lines. Cc: Alistair Francis <alist...@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 27a2c66c92ec1f7a1e6456c8b274ae538d68ae7f https://github.com/qemu/qemu/commit/27a2c66c92ec1f7a1e6456c8b274ae538d68ae7f Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/arm/aspeed.c M hw/ssi/aspeed_smc.c Log Message: ----------- aspeed/smc: Wire CS lines at reset Currently, a set of default flash devices is created at machine init and drives defined on the QEMU command line are associated to the FMC and SPI controllers in sequence : -drive file<file>,format=raw,if=mtd -drive file<file1>,format=raw,if=mtd The CS lines are wired in the same creation loop. This makes a strong assumption on the ordering and is not very flexible since only a limited set of flash devices can be defined : 1 FMC + 1 or 2 SPI, which is less than what the SoC really supports. A better alternative would be to define the flash devices on the command line using a blockdev attached to a CS line of a SSI bus : -blockdev node-name=fmc0,driver=file,filename=./flash.img -device mx66u51235f,cs=0x0,bus=ssi.0,drive=fmc0 However, user created flash devices are not correctly wired to their SPI controller and consequently can not be used by the machine. Fix that and wire the CS lines of all available devices when the SSI bus is reset. Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: a617e65f43788e08dd390aa41798b0e57b936c6d https://github.com/qemu/qemu/commit/a617e65f43788e08dd390aa41798b0e57b936c6d Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/arm/stellaris.c M hw/arm/xilinx_zynq.c M hw/arm/xlnx-versal-virt.c M hw/arm/xlnx-zcu102.c M hw/microblaze/petalogix_ml605_mmu.c M hw/ssi/ssi.c Log Message: ----------- hw/ssi: Check for duplicate CS indexes This to avoid indexes conflicts on the same SSI bus. Adapt machines using multiple devices on the same bus to avoid breakage. Cc: "Edgar E. Iglesias" <edgar.igles...@gmail.com> Cc: Alistair Francis <alist...@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: c7e313ae510ed037ca68a2861ab870de8042a779 https://github.com/qemu/qemu/commit/c7e313ae510ed037ca68a2861ab870de8042a779 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M docs/system/arm/aspeed.rst M hw/arm/aspeed.c Log Message: ----------- aspeed: Create flash devices only when defaults are enabled When the -nodefaults option is set, flash devices should be created with : -blockdev node-name=fmc0,driver=file,filename=./flash.img \ -device mx66u51235f,cs=0x0,bus=ssi.0,drive=fmc0 \ To be noted that in this case, the ROM will not be installed and the initial boot sequence (U-Boot loading) will fetch instructions using SPI transactions which is significantly slower. That's exactly how HW operates though. Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 9ab26b0eb14c818cf9d32e0881e99009df647076 https://github.com/qemu/qemu/commit/9ab26b0eb14c818cf9d32e0881e99009df647076 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/block/m25p80.c M include/hw/block/flash.h Log Message: ----------- m25p80: Introduce an helper to retrieve the BlockBackend of a device It will help in getting rid of some drive_get(IF_MTD) calls by retrieving the BlockBackend directly from the m25p80 device. Cc: Alistair Francis <alist...@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 8285490b2b2a2c064e2e85df4b73b58194ce0445 https://github.com/qemu/qemu/commit/8285490b2b2a2c064e2e85df4b73b58194ce0445 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/arm/aspeed.c Log Message: ----------- aspeed: Get the BlockBackend of FMC0 from the flash device and get rid of an unnecessary drive_get(IF_MTD) call. Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 24965082a777f8041890c443230f3d0ae555d764 https://github.com/qemu/qemu/commit/24965082a777f8041890c443230f3d0ae555d764 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01 CMD19 (SEND_TUNING_BLOCK) and CMD23 (SET_BLOCK_COUNT) were added in the Physical Layer Simplified Specification v3.01. When earlier spec version is requested, we should return ILLEGAL. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20220509141320.98374-1-philippe.mathieu.da...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 132011396f167fbf2199ad880163fe51fd40bd5d https://github.com/qemu/qemu/commit/132011396f167fbf2199ad880163fe51fd40bd5d Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: When card is in wrong state, log which state it is We report the card is in an inconsistent state, but don't precise in which state it is. Add this information, as it is useful when debugging problems. Since we will reuse this code, extract as sd_invalid_state_for_cmd() helper. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-2-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 94ef3041d21a00bb2d57c987c87c6eeb8812c488 https://github.com/qemu/qemu/commit/94ef3041d21a00bb2d57c987c87c6eeb8812c488 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: When card is in wrong state, log which spec version is used Add the sd_version_str() helper. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 1b4a234278f04ade4dd358224edc3defcd37fda7 https://github.com/qemu/qemu/commit/1b4a234278f04ade4dd358224edc3defcd37fda7 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c M include/hw/sd/sd.h Log Message: ----------- hw/sd: Move proto_name to SDProto structure Introduce a new structure to hold the bus protocol specific fields: SDProto. The first field is the protocol name. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-4-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 46859b6078bbd78c54693799f6ed1b90d1d5e565 https://github.com/qemu/qemu/commit/46859b6078bbd78c54693799f6ed1b90d1d5e565 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Introduce sd_cmd_handler type Add 2 command handler arrays in SDProto, for CMD and ACMD. Have sd_normal_command() / sd_app_command() use these arrays: if an command handler is registered, call it, otherwise fall back to current code base. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-5-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 583204d824c47a3390760c3b05a8c4ec1289139a https://github.com/qemu/qemu/commit/583204d824c47a3390760c3b05a8c4ec1289139a Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_illegal() handler Log illegal commands as GUEST_ERROR. Note: we are logging back the SDIO commands (CMD5, CMD52-54). Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-6-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 7ffcbf3e58014f76fe30d81e8b3e5754fc65f640 https://github.com/qemu/qemu/commit/7ffcbf3e58014f76fe30d81e8b3e5754fc65f640 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_unimplemented() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> [ clg: Fix redundant assignment of .cmd ] Message-Id: <20210624142209.1193073-7-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: a6e0f67e77fc61ff9aff6b3ad6c1ed039ff926b2 https://github.com/qemu/qemu/commit/a6e0f67e77fc61ff9aff6b3ad6c1ed039ff926b2 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_GO_IDLE_STATE() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-8-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 5c44e820096bbf9b897f668cb6d6dadb44ba5ff8 https://github.com/qemu/qemu/commit/5c44e820096bbf9b897f668cb6d6dadb44ba5ff8 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c M hw/sd/sdmmc-internal.c Log Message: ----------- hw/sd: Add sd_cmd_SEND_OP_CMD() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> [ clg: Update cmd_abbrev ] Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: c4f2d9e150f7aa190dd601eb756e8c6fe196dd9f https://github.com/qemu/qemu/commit/c4f2d9e150f7aa190dd601eb756e8c6fe196dd9f Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_ALL_SEND_CID() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-10-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 41a0349d3ca6fde8d49a32f2c7f8b2bf83035c88 https://github.com/qemu/qemu/commit/41a0349d3ca6fde8d49a32f2c7f8b2bf83035c88 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_SEND_RELATIVE_ADDR() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Message-Id: <20210624142209.1193073-11-f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 793d04f495197503d36a7ae4df99f8502e94886e https://github.com/qemu/qemu/commit/793d04f495197503d36a7ae4df99f8502e94886e Author: Joel Stanley <j...@jms.id.au> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler Signed-off-by: Joel Stanley <j...@jms.id.au> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 6380cd20528bf994d7a8d0cd6660230df217d374 https://github.com/qemu/qemu/commit/6380cd20528bf994d7a8d0cd6660230df217d374 Author: Philippe Mathieu-Daudé <f4...@amsat.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd: Add sd_cmd_SET_BLOCK_COUNT() handler Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: c3287c0f70dae07dd12322c5c8663f7b878826e7 https://github.com/qemu/qemu/commit/c3287c0f70dae07dd12322c5c8663f7b878826e7 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M hw/arm/stellaris.c M hw/riscv/sifive_u.c M hw/sd/sd.c M include/hw/sd/sd.h Log Message: ----------- hw/sd: Introduce a "sd-card" SPI variant model and replace the SDState::spi attribute with a test checking the SDProto array of commands. Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 17cf4825fe2c4503dbb1ef212efa0b858b8a069c https://github.com/qemu/qemu/commit/17cf4825fe2c4503dbb1ef212efa0b858b8a069c Author: Philippe Mathieu-Daudé <phi...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/vpc.c Log Message: ----------- block/vpc: Avoid dynamic stack allocation Use autofree heap allocation instead of variable-length array on the stack. Here we don't expect the bitmap size to be enormous, and since we're about to read/write it to disk the overhead of the allocation should be fine. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> [PMM: expanded commit message] Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Message-ID: <20230811175229.808139-1-peter.mayd...@linaro.org> Reviewed-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Francisco Iglesias <frasse.igles...@gmail.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 7c2f91ab887498afad78ec997224f4a2f13e6d10 https://github.com/qemu/qemu/commit/7c2f91ab887498afad78ec997224f4a2f13e6d10 Author: Fiona Ebner <f.eb...@proxmox.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M tests/qemu-iotests/109.out M tests/qemu-iotests/185 M tests/qemu-iotests/185.out Log Message: ----------- iotests: adapt test output for new qemu_cleanup() behavior Since commit ca2a5e630d ("qemu_cleanup: begin drained section after vm_shutdown()"), there will be an additional pause for jobs during qemu_cleanup(). The reason is that the bdrv_drain_all() call in do_vm_stop() is not inside the drained section used by qemu_cleanup() anymore. I.e., there is a second drained section now that ends before the final one in qemu_cleanup() starts. Thus, job_pause() is called twice during cleanup (via child_job_drained_begin()). Test 185 needs to be adapted directly too, because it waits for a specific number of JOB_STATUS_CHANGE events before the BLOCK_JOB_CANCELLED event. Reported-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Fiona Ebner <f.eb...@proxmox.com> Message-ID: <20230817112538.255111-1-f.eb...@proxmox.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 74babc3b05941cc2883601f6f4f11b740f762a7f https://github.com/qemu/qemu/commit/74babc3b05941cc2883601f6f4f11b740f762a7f Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/io.c Log Message: ----------- block: minimize bs->reqs_lock section in tracked_request_end() Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20230808155852.2745350-2-stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: d4d2dfbcd11bdab91a06632d68ab7ce0791b6229 https://github.com/qemu/qemu/commit/d4d2dfbcd11bdab91a06632d68ab7ce0791b6229 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block.c M block/io.c M include/block/block_int-common.h Log Message: ----------- block: change reqs_lock to QemuMutex CoMutex has poor performance when lock contention is high. The tracked requests list is accessed frequently and performance suffers in QEMU multi-queue block layer scenarios. It is not necessary to use CoMutex for the requests lock. The lock is always released across coroutine yield operations. It is held for relatively short periods of time and it is not beneficial to yield when the lock is held by another coroutine. Change the lock type from CoMutex to QemuMutex to improve multi-queue block layer performance. fio randread bs=4k iodepth=64 with 4 IOThreads handling a virtio-blk device with 8 virtqueues improves from 254k to 517k IOPS (+203%). Full benchmark results and configuration details are available here: https://gitlab.com/stefanha/virt-playbooks/-/commit/980c40845d540e3669add1528739503c2e817b57 In the future we may wish to introduce thread-local tracked requests lists to avoid lock contention completely. That would be much more involved though. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20230808155852.2745350-3-stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: b7bc1d063da3a2582e7e9ecbffe7b9215c29099a https://github.com/qemu/qemu/commit/b7bc1d063da3a2582e7e9ecbffe7b9215c29099a Author: Michael Tokarev <m...@tls.msk.ru> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M qemu-img.c M tests/qemu-iotests/080.out M tests/qemu-iotests/112.out M tests/qemu-iotests/244.out Log Message: ----------- qemu-img: omit errno value in error message I'm getting io-qcow2-244 test failure on mips* due to output mismatch: Take an internal snapshot: -qemu-img: Could not create snapshot 'test': -95 (Operation not supported) +qemu-img: Could not create snapshot 'test': -122 (Operation not supported) No errors were found on the image. This is because errno values might be different across different architectures. This error message in qemu-img.c is the only one which prints errno directly, all the rest print strerror(errno) only. Fix this error message and the expected output of the 3 test cases too. Signed-off-by: Michael Tokarev <m...@tls.msk.ru> Message-ID: <20230811110946.2435067-1-...@tls.msk.ru> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 67b5d60853035c995d70644058732376d24a824c https://github.com/qemu/qemu/commit/67b5d60853035c995d70644058732376d24a824c Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/iscsi.c Log Message: ----------- block/iscsi: Document why we use raw malloc() In block/iscsi.c we use a raw malloc() call, which is unusual given the project standard is to use the glib memory allocation functions. Document why we do so, to avoid it being converted to g_malloc() by mistake. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Message-ID: <20230727150705.2664464-1-peter.mayd...@linaro.org> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 0960e0117dc11d4043332896881691a3c9bd1b88 https://github.com/qemu/qemu/commit/0960e0117dc11d4043332896881691a3c9bd1b88 Author: Hanna Czenczek <hre...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block.c Log Message: ----------- block: Be more verbose in create fallback For image creation code, we have central fallback code for protocols that do not support creating new images (like NBD or iscsi). So for them, you can only specify existing paths/exports that are overwritten to make clean new images. In such a case, if the given path cannot be opened (assuming a pre-existing image there), we print an error message that tries to describe what is going on: That with this protocol, you cannot create new images, but only overwrite existing ones; and the given path could not be opened as a pre-existing image. However, the current message is confusing, because it does not say that the protocol in question does not support creating new images, but instead that "image creation" is unsupported. This can be interpreted to mean that `qemu-img create` will not work in principle, which is not true. Be more verbose for clarity. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2217204 Signed-off-by: Hanna Czenczek <hre...@redhat.com> Message-ID: <20230720140024.46836-1-hre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 45c237307ad9f3dfb936b9aae011f972f4adaa26 https://github.com/qemu/qemu/commit/45c237307ad9f3dfb936b9aae011f972f4adaa26 Author: Kevin Wolf <kw...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M docs/tools/qemu-img.rst Log Message: ----------- qemu-img: Update documentation for compressed images Document the 'compression_type' option for qcow2, and mention that streamOptimized vmdk supports compression, too. Reported-by: Richard W.M. Jones <rjo...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Message-ID: <20230901102430.23856-1-kw...@redhat.com> Reviewed-by: Richard W.M. Jones <rjo...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: ff0d26db7c0f37f6af75e5f2ad33cd1892deb470 https://github.com/qemu/qemu/commit/ff0d26db7c0f37f6af75e5f2ad33cd1892deb470 Author: Dmitry Frolov <fro...@swemel.ru> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/vmdk.c Log Message: ----------- vmdk: Clean up bdrv_open_child() return value check bdrv_open_child() may return NULL. Usually return value is checked for this function. Check for return value is more reliable. Fixes: 24bc15d1f6 ("vmdk: Use BdrvChild instead of BDS for references to extents") Signed-off-by: Dmitry Frolov <fro...@swemel.ru> Message-ID: <20230831125926.796205-1-fro...@swemel.ru> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 1410dc22898eca2f855dae1c5124b5209c34ff96 https://github.com/qemu/qemu/commit/1410dc22898eca2f855dae1c5124b5209c34ff96 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/block-backend.c M block/io.c M hw/nvme/ctrl.c M include/block/aio.h M include/block/block-global-state.h M include/block/block-io.h M softmmu/dma-helpers.c M util/thread-pool.c Log Message: ----------- block: remove AIOCBInfo->get_aio_context() The synchronous bdrv_aio_cancel() function needs the acb's AioContext so it can call aio_poll() to wait for cancellation. It turns out that all users run under the BQL in the main AioContext, so this callback is not needed. Remove the callback, mark bdrv_aio_cancel() GLOBAL_STATE_CODE just like its blk_aio_cancel() caller, and poll the main loop AioContext. The purpose of this cleanup is to identify bdrv_aio_cancel() as an API that does not work with the multi-queue block layer. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20230823235938.1398382-2-stefa...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 269e7a53ea08fab8dcc4a4e208ff6a052e2e8b78 https://github.com/qemu/qemu/commit/269e7a53ea08fab8dcc4a4e208ff6a052e2e8b78 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/block-backend.c Log Message: ----------- block-backend: process I/O in the current AioContext Switch blk_aio_*() APIs over to multi-queue by using qemu_get_current_aio_context() instead of blk_get_aio_context(). This change will allow devices to process I/O in multiple IOThreads in the future. I audited existing blk_aio_*() callers: - migration/block.c: blk_mig_lock() protects the data accessed by the completion callback. - The remaining emulated devices and exports run with qemu_get_aio_context() == blk_get_aio_context(). Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20230823235938.1398382-3-stefa...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: b5affbed8fbaa089a7f3e7cedb944f593d2a5a73 https://github.com/qemu/qemu/commit/b5affbed8fbaa089a7f3e7cedb944f593d2a5a73 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M block/block-backend.c Log Message: ----------- block-backend: process zoned requests in the current AioContext Process zoned requests in the current thread's AioContext instead of in the BlockBackend's AioContext. There is no need to use the BlockBackend's AioContext thanks to CoMutex bs->wps->colock, which protects zone metadata. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20230823235938.1398382-4-stefa...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 90da7d552fbcb19d1fbf68b2051f0f168b8a48f9 https://github.com/qemu/qemu/commit/90da7d552fbcb19d1fbf68b2051f0f168b8a48f9 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M include/ui/qemu-pixman.h M ui/qemu-pixman.c Log Message: ----------- ui: remove qemu_pixman_color() helper Usage removed in commit e27bd65a72d ("console: switch color_table_rgb to pixman_color_t") Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20230830093843.3531473-2-marcandre.lur...@redhat.com> Commit: 426749a7b79cf735dcd9bd4d134af5224fcf8210 https://github.com/qemu/qemu/commit/426749a7b79cf735dcd9bd4d134af5224fcf8210 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M include/ui/qemu-pixman.h M ui/qemu-pixman.c Log Message: ----------- ui: remove qemu_pixman_linebuf_copy() Since commit 43c7d8bd449 ("console: add qemu_pixman_linebuf_copy"), it seems it was never used. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-3-marcandre.lur...@redhat.com> Commit: 4f2c765ba6b648f406b7d64ebbf0e4eaedf3d8be https://github.com/qemu/qemu/commit/4f2c765ba6b648f406b7d64ebbf0e4eaedf3d8be Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M include/ui/console.h M ui/console.c M ui/ui-qmp-cmds.c Log Message: ----------- ui/qmp: move screendump to ui-qmp-cmds.c console.c unit is over-crowded. This code is specific to the handling of the QMP screendump command, so move it in ui-qmp-cmds. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-4-marcandre.lur...@redhat.com> Commit: f1f7a1e2cfee7beee626552744efcc5a3867501f https://github.com/qemu/qemu/commit/f1f7a1e2cfee7beee626552744efcc5a3867501f Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: replace vc_chr_write() with generic qemu_chr_write() We shouldn't call the callback directly, but use the chardev API, unless there is a clear reason. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20230830093843.3531473-5-marcandre.lur...@redhat.com> Commit: 177422789be54447cfc2d770145968058e5d0b5c https://github.com/qemu/qemu/commit/177422789be54447cfc2d770145968058e5d0b5c Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: drop have_text If there are no "text" listener, the callback will simply be ignored. The rest of text handling can be done cheaply. This allows to remove some dependency on DisplayState from VC implementation. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-6-marcandre.lur...@redhat.com> Commit: 074b24094f34c3241956064cf7910bbe11642871 https://github.com/qemu/qemu/commit/074b24094f34c3241956064cf7910bbe11642871 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: console_select() regardless of have_gfx Even if we don't have a gfx listener, we should call displaychangelistener_display_console() which handle that case correctly. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-7-marcandre.lur...@redhat.com> Commit: bc9b8bc93cafee6f3c9f73ef5e8a7379004e8699 https://github.com/qemu/qemu/commit/bc9b8bc93cafee6f3c9f73ef5e8a7379004e8699 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: call dpy_gfx_update() regardless of have_gfx The function will handle the case when no listeners are gfx, without extra meaningful cost. This allows to get rid of DisplayState dependency in VC implementation. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-8-marcandre.lur...@redhat.com> Commit: cbcf0fa8fd9723ee51af803bf58a8d6d3e6a4194 https://github.com/qemu/qemu/commit/cbcf0fa8fd9723ee51af803bf58a8d6d3e6a4194 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: drop have_gfx All usages have been removed. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-9-marcandre.lur...@redhat.com> Commit: 121c8dd69d7fa91558954eadc11bb6ce0474713c https://github.com/qemu/qemu/commit/121c8dd69d7fa91558954eadc11bb6ce0474713c Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: A linux-user/aarch64/target_proc.h A linux-user/alpha/target_proc.h A linux-user/arm/target_proc.h A linux-user/cris/target_proc.h A linux-user/hexagon/target_proc.h A linux-user/hppa/target_proc.h A linux-user/i386/target_proc.h A linux-user/loongarch64/target_proc.h A linux-user/m68k/target_proc.h A linux-user/microblaze/target_proc.h A linux-user/mips/target_proc.h A linux-user/mips64/target_proc.h A linux-user/nios2/target_proc.h A linux-user/openrisc/target_proc.h A linux-user/ppc/target_proc.h A linux-user/riscv/target_proc.h A linux-user/s390x/target_proc.h A linux-user/sh4/target_proc.h A linux-user/sparc/target_proc.h M linux-user/syscall.c A linux-user/x86_64/target_proc.h A linux-user/xtensa/target_proc.h Log Message: ----------- linux-user: Split out cpu/target_proc.h Move the various open_cpuinfo functions into new files. Move the m68k open_hardware function as well. All other guest architectures get a boilerplate empty file. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: a55b9e72267085957cadb0af0a8811cfbd7c61a9 https://github.com/qemu/qemu/commit/a55b9e72267085957cadb0af0a8811cfbd7c61a9 Author: Helge Deller <del...@gmx.de> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/aarch64/target_proc.h M linux-user/arm/target_proc.h M linux-user/elfload.c M linux-user/loader.h Log Message: ----------- linux-user: Emulate /proc/cpuinfo on aarch64 and arm Add emulation for /proc/cpuinfo for arm architecture. The output below mimics output as seen on debian porterboxes. aarch64 output example: processor : 0 model name : ARMv8 Processor rev 0 (v8l) BogoMIPS : 100.00 Features : swp half thumb fast_mult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae aes pmull sha1 sha2 crc32 CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x1 CPU part : 0xd07 CPU revision : 0 arm 32-bit output example: processor : 0 model name : ARMv7 Processor rev 5 (armv7l) BogoMIPS : 100.00 Features : swp half thumb fast_mult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0f CPU part : 0xc07 CPU revision : 5 Signed-off-by: Helge Deller <del...@gmx.de> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230803214450.647040-3-del...@gmx.de> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 4757e2c771087520578d2a0fb2da5ec196899af7 https://github.com/qemu/qemu/commit/4757e2c771087520578d2a0fb2da5ec196899af7 Author: Helge Deller <del...@gmx.de> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/alpha/target_proc.h Log Message: ----------- linux-user: Emulate /proc/cpuinfo for Alpha Add emulation for /proc/cpuinfo for the alpha architecture. alpha output example: (alpha-chroot)root@p100:/# cat /proc/cpuinfo cpu : Alpha cpu model : ev67 cpu variation : 0 cpu revision : 0 cpu serial number : JA00000000 system type : QEMU system variation : QEMU_v8.0.92 system revision : 0 system serial number : AY00000000 cycle frequency [Hz] : 250000000 timer frequency [Hz] : 250.00 page size [bytes] : 8192 phys. address bits : 44 max. addr. space # : 255 BogoMIPS : 2500.00 platform string : AlphaServer QEMU user-mode VM cpus detected : 8 cpus active : 4 cpu active mask : 0000000000000095 L1 Icache : n/a L1 Dcache : n/a L2 cache : n/a L3 cache : n/a Signed-off-by: Helge Deller <del...@gmx.de> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230803214450.647040-4-del...@gmx.de> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 79be812bdb6d476b35b0a0a9cda5432673b1f5f3 https://github.com/qemu/qemu/commit/79be812bdb6d476b35b0a0a9cda5432673b1f5f3 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M include/qemu/selfmap.h M linux-user/syscall.c M util/selfmap.c Log Message: ----------- util/selfmap: Use dev_t and ino_t in MapInfo Use dev_t instead of a string, and ino_t instead of uint64_t. The latter is likely to be identical on modern systems but is more type-correct for usage. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 7b7a3366e142d3baeb3fd1d3660a50e7956c19eb https://github.com/qemu/qemu/commit/7b7a3366e142d3baeb3fd1d3660a50e7956c19eb Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/syscall.c Log Message: ----------- linux-user: Use walk_memory_regions for open_self_maps Replace the by-hand method of region identification with the official user-exec interface. Cross-check the region provided to the callback with the interval tree from read_self_maps(). Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: aec338d63bc28f1f13d5e64c561d7f1dd0e4b07e https://github.com/qemu/qemu/commit/aec338d63bc28f1f13d5e64c561d7f1dd0e4b07e Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/elfload.c Log Message: ----------- linux-user: Adjust brk for load_bias PIE executables are usually linked at offset 0 and are relocated somewhere during load. The hiaddr needs to be adjusted to keep the brk next to the executable. Cc: qemu-sta...@nongnu.org Fixes: 1f356e8c013 ("linux-user: Adjust initial brk when interpreter is close to executable") Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 92d2a03f045f833fa96d8d1ed909d2bce68cefea https://github.com/qemu/qemu/commit/92d2a03f045f833fa96d8d1ed909d2bce68cefea Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/syscall.c Log Message: ----------- linux-user: Show heap address in /proc/pid/maps Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 6467d9eb4923f71d83d41fb603f072b6446be402 https://github.com/qemu/qemu/commit/6467d9eb4923f71d83d41fb603f072b6446be402 Author: Ilya Leoshkevich <i...@linux.ibm.com> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/syscall.c Log Message: ----------- linux-user: Emulate the Anonymous: keyword in /proc/self/smaps Core dumps produced by gdb's gcore when connected to qemu's gdbstub lack stack. The reason is that gdb includes only anonymous memory in core dumps, which is distinguished by a non-0 Anonymous: value. Consider the mappings with PAGE_ANON fully anonymous, and the mappings without it fully non-anonymous. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com> [rth: Update for open_self_maps_* rewrite] Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: f6d45542424f07247c11d074f3504a9eeb79e21c https://github.com/qemu/qemu/commit/f6d45542424f07247c11d074f3504a9eeb79e21c Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/elfload.c M linux-user/qemu.h Log Message: ----------- linux-user: Remove ELF_START_MMAP and image_info.start_mmap The start_mmap value is write-only. Remove the field and the defines that populated it. Logically, this has been replaced by task_unmapped_base. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 225a206c4474f8344c8f0c13b735c414d0f170c7 https://github.com/qemu/qemu/commit/225a206c4474f8344c8f0c13b735c414d0f170c7 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/mmap.c M linux-user/syscall.c M linux-user/user-mmap.h Log Message: ----------- linux-user: Move shmat and shmdt implementations to mmap.c Rename from do_* to target_*. Fix some minor checkpatch errors. Tested-by: Helge Deller <del...@gmx.de> Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 69fa2708a216df715ba5102a0f98468b540a464e https://github.com/qemu/qemu/commit/69fa2708a216df715ba5102a0f98468b540a464e Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/mmap.c Log Message: ----------- linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt} Move the CF_PARALLEL setting outside of the mmap lock. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Helge Deller <del...@gmx.de> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: ceda5688b650646248f269a992c06b11148c5759 https://github.com/qemu/qemu/commit/ceda5688b650646248f269a992c06b11148c5759 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/mmap.c Log Message: ----------- linux-user: Fix shmdt If the shm region is not mapped at shmaddr, EINVAL. Do not unmap the region until the syscall succeeds. Use mmap_reserve_or_unmap to preserve reserved_va semantics. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 044e95c81e750a0605deb12a20ee23bfde7dc9c8 https://github.com/qemu/qemu/commit/044e95c81e750a0605deb12a20ee23bfde7dc9c8 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-01 (Fri, 01 Sep 2023) Changed paths: M linux-user/mmap.c Log Message: ----------- linux-user: Track shm regions with an interval tree Remove the fixed size shm_regions[] array. Remove references when other mappings completely remove or replace a region. Tested-by: Helge Deller <del...@gmx.de> Reviewed-by: Helge Deller <del...@gmx.de> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Commit: 011dd5ecf226e5b0c4d83cfd7fb66d43a721b08b https://github.com/qemu/qemu/commit/011dd5ecf226e5b0c4d83cfd7fb66d43a721b08b Author: Shawn Anastasio <sanasta...@raptorengineering.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/mmu-radix64.c Log Message: ----------- target/ppc: Generate storage interrupts for radix RC changes Change radix model to always generate a storage interrupt when the R/C bits are not set appropriately in a PTE instead of setting the bits itself. According to the ISA both behaviors are valid, but in practice this change more closely matches behavior observed on the POWER9 CPU. >From the POWER9 Processor User's Manual, Section 4.10.13.1: "When performing Radix translation, the POWER9 hardware triggers the appropriate interrupt ... for the mode and type of access whenever Reference (R) and Change (C) bits require setting in either the guest or host page-table entry (PTE)." Signed-off-by: Shawn Anastasio <sanasta...@raptorengineering.com> Reviewed-by: Cédric Le Goater <c...@kaod.org> Reviewed-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 639ebe009bc3f6b00195fe0cb24c7830f49edee6 https://github.com/qemu/qemu/commit/639ebe009bc3f6b00195fe0cb24c7830f49edee6 Author: Joel Stanley <j...@jms.id.au> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/cpu.h M target/ppc/cpu_init.c Log Message: ----------- ppc: Add stub implementation of TRIG SPRs Linux sets these to control cache flush behaviour on Power9. Supervisor and hypervisor are allowed to write, and reads are noops. Add implementations to avoid noisy messages when booting Linux under the pseries machine with guest_errors enabled. Reviewed-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 32ae4c69bd97fb8349b7bff3d1dbd1afee433d0d https://github.com/qemu/qemu/commit/32ae4c69bd97fb8349b7bff3d1dbd1afee433d0d Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/translate.c Log Message: ----------- target/ppc: Remove single-step suppression inside 0x100-0xf00 Single-step interrupts are suppressed if the nip is between 0x100 and 0xf00. This has been the case for a long time and it's not clear what the intention is. Likely either an attempt to suppress trace interrupts for instructions that cause an interrupt on completion, or a workaround to prevent software tripping over itself single stepping its interrupt handlers. BookE interrupt vectors are set by IVOR registers, and BookS has AIL modes and new interrupt types, so there are many interrupts including the debug interrupt which can be outside this range. So any effect it might have had does not cover most cases (including Linux on recent BookS CPUs). Remove this special case. Signed-off-by: Nicholas Piggin <npig...@gmail.com> [ clg : fixed typo in commit logs ] Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: ba16f2e9089c7d2e8ec098a37e54579637361849 https://github.com/qemu/qemu/commit/ba16f2e9089c7d2e8ec098a37e54579637361849 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/excp_helper.c M target/ppc/helper.h M target/ppc/translate.c Log Message: ----------- target/ppc: Improve book3s branch trace interrupt for v2.07S Improve the emulation accuracy of the single step and branch trace interrupts for v2.07S. Set SRR1[33]=1, and set SIAR to completed instruction address. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: cfef93da7e48ad750a5d99e292424a0539fee2c9 https://github.com/qemu/qemu/commit/cfef93da7e48ad750a5d99e292424a0539fee2c9 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/translate.c Log Message: ----------- target/ppc: Suppress single step interrupts on rfi-type instructions BookS does not take single step interrupts on completion of rfi and similar (rfid, hrfid, rfscv). This is not a completely clean way to do it, but in general non-branch instructions that change NIP on completion are excluded. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 6f772e5483e77337e41f2eef774c52ae5c3cb666 https://github.com/qemu/qemu/commit/6f772e5483e77337e41f2eef774c52ae5c3cb666 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/cpu.c M target/ppc/cpu.h M target/ppc/cpu_init.c M target/ppc/excp_helper.c M target/ppc/helper.h M target/ppc/internal.h M target/ppc/machine.c M target/ppc/misc_helper.c M target/ppc/spr_common.h M target/ppc/translate.c Log Message: ----------- target/ppc: Implement breakpoint debug facility for v2.07S ISA v2.07S introduced the breakpoint facility based on the CIABR SPR. Implement this in TCG. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 446e514f0d5d67cf7c3dc36e22c010c59e539a66 https://github.com/qemu/qemu/commit/446e514f0d5d67cf7c3dc36e22c010c59e539a66 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/cpu.c M target/ppc/cpu.h M target/ppc/cpu_init.c M target/ppc/excp_helper.c M target/ppc/helper.h M target/ppc/internal.h M target/ppc/machine.c M target/ppc/misc_helper.c M target/ppc/spr_common.h M target/ppc/translate.c Log Message: ----------- target/ppc: Implement watchpoint debug facility for v2.07S ISA v2.07S introduced the watchpoint facility based on the DAWR0 and DAWRX0 SPRs. Implement this in TCG. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: aedafbee036b1ff036f65cf9a70846157f1abad4 https://github.com/qemu/qemu/commit/aedafbee036b1ff036f65cf9a70846157f1abad4 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/spapr_hcall.c Log Message: ----------- spapr: implement H_SET_MODE debug facilities Wire up the H_SET_MODE debug resources to the CIABR and DAWR0 debug facilities in TCG. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 101b2f370cabfcfb20fc16566b63a092b711d8e2 https://github.com/qemu/qemu/commit/101b2f370cabfcfb20fc16566b63a092b711d8e2 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/excp_helper.c Log Message: ----------- ppc/vhyp: reset exception state when handling vhyp hcall Convention is to reset the exception_index and error_code after handling an interrupt. The vhyp hcall handler fails to do this. This does not appear to have ill effects because cpu_handle_exception() clears exception_index later, but it is fragile and inconsistent. Reset the exception state after handling vhyp hcall like other handlers. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 2d5e04e40634fab279aa239afe00bec56a4fde70 https://github.com/qemu/qemu/commit/2d5e04e40634fab279aa239afe00bec56a4fde70 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/vof.c Log Message: ----------- ppc/vof: Fix missed fields in VOF cleanup Failing to reset the of_instance_last makes ihandle allocation continue to increase, which causes record-replay replay fail to match the recorded trace. Not resetting claimed_base makes VOF eventually run out of memory after some resets. Cc: Alexey Kardashevskiy <a...@ozlabs.ru> Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface") Signed-off-by: Nicholas Piggin <npig...@gmail.com> Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: d9c114ebe25bce364c97d229579473206aa72341 https://github.com/qemu/qemu/commit/d9c114ebe25bce364c97d229579473206aa72341 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc/ppc.c: Tidy over-long lines Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: cbc259c192158aacc03604bd9f7ad46315916ac5 https://github.com/qemu/qemu/commit/cbc259c192158aacc03604bd9f7ad46315916ac5 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc: Introduce functions for conversion between timebase and nanoseconds These calculations are repeated several times, and they will become a little more complicated with subsequent changes. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 89eefd32e3ef8e0805a56c0d5eeeb4b74358a5e6 https://github.com/qemu/qemu/commit/89eefd32e3ef8e0805a56c0d5eeeb4b74358a5e6 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/qemu/host-utils.h Log Message: ----------- host-utils: Add muldiv64_round_up This will be used for converting time intervals in different base units to host units, for the purpose of scheduling timers to emulate target timers. Timers typically must not fire before their requested expiry time but may fire some time afterward, so rounding up is the right way to implement these. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: e964ca67f4c9e4d020b3dd162521eb6ab9d53f68 https://github.com/qemu/qemu/commit/e964ca67f4c9e4d020b3dd162521eb6ab9d53f68 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc: Round up the decrementer interval when converting to ns The rule of timers is typically that they should never expire before the timeout, but some time afterward. Rounding timer intervals up when doing conversion is the right thing to do. Under most circumstances it is impossible observe the decrementer interrupt before the dec register has triggered. However with icount timing, problems can arise. For example setting DEC to 0 can schedule the timer for now, causing it to fire before any more instructions have been executed and DEC is still 0. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: ab24396aa9892896bd22a11989b75bce563b347d https://github.com/qemu/qemu/commit/ab24396aa9892896bd22a11989b75bce563b347d Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc: Avoid decrementer rounding errors The decrementer register contains a relative time in timebase units. When writing to DECR this is converted and stored as an absolute value in nanosecond units, reading DECR converts back to relative timebase. The tb<->ns conversion of the relative part can cause rounding such that a value writen to the decrementer can read back a different, with time held constant. This is a particular problem for a deterministic icount and record-replay trace. Fix this by storing the absolute value in timebase units rather than nanoseconds. The math before: store: decr_next = now_ns + decr * ns_per_sec / tb_per_sec load: decr = (decr_next - now_ns) * tb_per_sec / ns_per_sec load(store): decr = decr * ns_per_sec / tb_per_sec * tb_per_sec / ns_per_sec After: store: decr_next = now_ns * tb_per_sec / ns_per_sec + decr load: decr = decr_next - now_ns * tb_per_sec / ns_per_sec load(store): decr = decr Fixes: 9fddaa0c0cab ("PowerPC merge: real time TB and decrementer - faster and simpler exception handling (Jocelyn Mayer)") Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: a3cfe09439f9bfc4f9eeb2a90a86cbfff6977df4 https://github.com/qemu/qemu/commit/a3cfe09439f9bfc4f9eeb2a90a86cbfff6977df4 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- target/ppc: Sign-extend large decrementer to 64-bits When storing a large decrementer value with the most significant implemented bit set, it is to be treated as a negative and sign extended. This isn't hit for book3s DEC because of another bug, fixing it in the next patch exposes this one and can cause additional problems, so fix this first. It can be hit with HDECR and other edge triggered types. Fixes: a8dafa52518 ("target/ppc: Implement large decrementer support for TCG") Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 87850825a4515c6566f6a97035c789caee089b03 https://github.com/qemu/qemu/commit/87850825a4515c6566f6a97035c789caee089b03 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc: Always store the decrementer value When writing a value to the decrementer that raises an exception, the irq is raised, but the value is not stored so the store doesn't appear to have changed the register when it is read again. Always store the write value to the register. Fixes: e81a982aa53 ("PPC: Clean up DECR implementation") Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 4a90d95baa50d3a1d95d5298d8983b619b150532 https://github.com/qemu/qemu/commit/4a90d95baa50d3a1d95d5298d8983b619b150532 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/machine.c Log Message: ----------- target/ppc: Migrate DECR SPR TCG does not maintain the DEC reigster in the SPR array, so it does get migrated. TCG also needs to re-start the decrementer timer on the destination machine. Load and store the decrementer into the SPR when migrating. This works for the level-triggered (book3s) decrementer, and should be compatible with existing KVM machines that do keep the DEC value there. This fixes lost decrementer interrupt on migration that can cause hangs, as well as other problems including record-replay bugs. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 7b13088712f956c710d0f376673ec45d2eba932a https://github.com/qemu/qemu/commit/7b13088712f956c710d0f376673ec45d2eba932a Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/mac_oldworld.c M hw/ppc/pegasos2.c M hw/ppc/pnv_core.c M hw/ppc/ppc.c M hw/ppc/prep.c M hw/ppc/spapr_cpu_core.c M include/hw/ppc/ppc.h Log Message: ----------- hw/ppc: Reset timebase facilities on machine reset Lower interrupts, delete timers, and set time facility registers back to initial state on machine reset. This is not so important for record-replay since timebase and decrementer are migrated, but it gives a cleaner reset state. Cc: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> Cc: BALATON Zoltan <bala...@eik.bme.hu> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: fb7e46c2783974fb41c8d2aab2ed349246e3e856 https://github.com/qemu/qemu/commit/fb7e46c2783974fb41c8d2aab2ed349246e3e856 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- hw/ppc: Read time only once to perform decrementer write Reading the time more than once to perform an operation always increases complexity and fragility due to introduced deltas. Simplify the decrementer write by reading the clock once for the operation. Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: ea9159ca878ee6ca2f42513952326d36c94b706d https://github.com/qemu/qemu/commit/ea9159ca878ee6ca2f42513952326d36c94b706d Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/cpu.h M target/ppc/machine.c M target/ppc/translate.c Log Message: ----------- target/ppc: Fix CPU reservation migration for record-replay ppc only migrates reserve_addr, so the destination machine can get a valid reservation with an incorrect reservation value of 0. Prior to commit 392d328abe753 ("target/ppc: Ensure stcx size matches larx"), this could permit a stcx. to incorrectly succeed. That commit inadvertently fixed that bug because the target machine starts with an impossible reservation size of 0, so any stcx. will fail. This behaviour is permitted by the ISA because reservation loss may have implementation-dependent cause. What's more, with KVM machines it is impossible save or reasonably restore reservation state. However if the vmstate is being used for record-replay, the reservation must be saved and restored exactly in order for execution from snapshot to match the record. This patch deprecates the existing incomplete reserve_addr vmstate, and adds a new vmstate subsection with complete reservation state. The new vmstate is needed only when record-replay mode is active. Acked-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: f61349ed1b496b172e95a307cc7608b5f9f40581 https://github.com/qemu/qemu/commit/f61349ed1b496b172e95a307cc7608b5f9f40581 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c Log Message: ----------- target/ppc: Fix timebase reset with record-replay Timebase save uses a random number for a legacy vmstate field, which makes rr snapshot loading unbalanced. The easiest way to deal with this is just to skip the rng if record-replay is active. Reviewed-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 5698c688592160caea787990b65e5035214bd37f https://github.com/qemu/qemu/commit/5698c688592160caea787990b65e5035214bd37f Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/spapr.c M include/hw/ppc/spapr.h M target/ppc/compat.c M target/ppc/cpu.h Log Message: ----------- spapr: Fix machine reset deadlock from replay-record When the machine is reset to load a new snapshot while being debugged with replay-record, it is done from another thread, so the CPU does not run the register setting operations. Set CPU registers directly in machine reset. Cc: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 89201bff6a114b9024a39aed95a10113dee3d0a2 https://github.com/qemu/qemu/commit/89201bff6a114b9024a39aed95a10113dee3d0a2 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/spapr.c M include/hw/ppc/spapr.h Log Message: ----------- spapr: Fix record-replay machine reset consuming too many events spapr_machine_reset gets a random number to populate the device-tree rng seed with. When loading a snapshot for record-replay, the machine is reset again, and that tries to consume the random event record again, crashing due to inconsistent record Fix this by saving the seed to populate the device tree with, and skipping the rng on snapshot load. Acked-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 45b66a4ddc8b065b208498b0f2c84df93735321d https://github.com/qemu/qemu/commit/45b66a4ddc8b065b208498b0f2c84df93735321d Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M tests/avocado/replay_kernel.py Log Message: ----------- tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount This the ppc64 record-replay test is able to replay the full kernel boot so try enabling it. Acked-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 4b456e8c04d83f534ee306af6eaa8eb1cc76a177 https://github.com/qemu/qemu/commit/4b456e8c04d83f534ee306af6eaa8eb1cc76a177 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M tests/avocado/reverse_debugging.py Log Message: ----------- tests/avocado: reverse-debugging cope with re-executing breakpoints The reverse-debugging test creates a trace, then replays it and: 1. Steps the first 10 instructions and records their addresses. 2. Steps backward and verifies their addresses match. 3. Runs to (near) the end of the trace. 4. Sets breakpoints on the first 10 instructions. 5. Continues backward and verifies execution stops at the last breakpoint. Step 5 breaks if any of the other 9 breakpoints are re-executed in the trace after the 10th instruction is run, because those will be unexpectedly hit when reverse continuing. This situation does arise with the ppc pseries machine, the SLOF bios branches to its own entry point. Deal with this by switching steps 3 and 4, so the trace will be run to the end *or* one of the breakpoints being re-executed. Step 5 then reverses from there to the 10th instruction will not hit a breakpoint in between, by definition. Another step is added between steps 2 and 3, which steps forward over the first 10 instructions and verifies their addresses, to support this. Reviewed-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 29e2ffc5a8c70583515dfa388e1a4178423ea3a5 https://github.com/qemu/qemu/commit/29e2ffc5a8c70583515dfa388e1a4178423ea3a5 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M tests/avocado/reverse_debugging.py Log Message: ----------- tests/avocado: ppc64 reverse debugging tests for pseries and powernv These machines run reverse-debugging well enough to pass basic tests. Wire them up. Reviewed-by: Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> Signed-off-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 0b221a599e94b58588c87ca63d7269b475e80ab8 https://github.com/qemu/qemu/commit/0b221a599e94b58588c87ca63d7269b475e80ab8 Author: Nicholas Piggin <npig...@gmail.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/translate/fixedpoint-impl.c.inc Log Message: ----------- target/ppc: Fix LQ, STQ register-pair order for big-endian LQ, STQ have the same register-pair ordering as LQARX/STQARX., which is the even (lower) register contains the most significant bits. This is not implemented correctly for big-endian. do_ldst_quad() has variables low_addr_gpr and high_addr_gpr which is confusing because they are low and high addresses, whereas LQARX/STQARX. and most such things use the low and high values for lo/hi variables. The conversion to native 128-bit memory access functions missed this strangeness. Fix this by changing the if condition, and change the variable names to hi/lo to match convention. Cc: qemu-sta...@nongnu.org Reported-by: Ivan Warren <i...@vmfacility.fr> Fixes: 57b38ffd0c6f ("target/ppc: Use tcg_gen_qemu_{ld,st}_i128 for LQARX, LQ, STQ") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1836 Signed-off-by: Nicholas Piggin <npig...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 638bcb250d8197122e05eeba7f1ea3a5f281a6bc https://github.com/qemu/qemu/commit/638bcb250d8197122e05eeba7f1ea3a5f281a6bc Author: Richard Henderson <richard.hender...@linaro.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M target/ppc/cpu.c Log Message: ----------- target/ppc: Flush inputs to zero with NJ in ppc_store_vscr Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1779 Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: a5c6a8337602a14a6cd054997f7fe2cb673a6f20 https://github.com/qemu/qemu/commit/a5c6a8337602a14a6cd054997f7fe2cb673a6f20 Author: Maksim Kostin <maksim.kos...@ispras.ru> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/e500.c Log Message: ----------- hw/ppc/e500: fix broken snapshot replay ppce500_reset_device_tree is registered for system reset, but after c4b075318eb1 this function rerandomizes rng-seed via qemu_guest_getrandom_nofail. And when loading a snapshot, it tries to read EVENT_RANDOM that doesn't exist, so we have an error: qemu-system-ppc: Missing random event in the replay log To fix this, use qemu_register_reset_nosnapshotload instead of qemu_register_reset. Reported-by: Vitaly Cheptsov <chept...@ispras.ru> Fixes: c4b075318eb1 ("hw/ppc: pass random seed to fdt ") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1634 Signed-off-by: Maksim Kostin <maksim.kos...@ispras.ru> Reviewed-by: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 70afdaaf4857269b57f815afe0b1df3cf149a2c0 https://github.com/qemu/qemu/commit/70afdaaf4857269b57f815afe0b1df3cf149a2c0 Author: jianchunfu <chunfu.j...@shingroup.cn> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/ppc/ppc.c M target/ppc/kvm.c Log Message: ----------- target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt() It's unnecessary for non-KVM accelerators(TCG, for example), to call this function, so change the order of kvm_enable() judgment. The static inline function that returns -1 directly does not work in TCG's situation. Signed-off-by: jianchunfu <chunfu.j...@shingroup.cn> Tested-by: Gautam Menghani <gau...@linux.ibm.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 68be58db50482d3f8e16217a9c7712773eb85243 https://github.com/qemu/qemu/commit/68be58db50482d3f8e16217a9c7712773eb85243 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/intc/pnv_xive.c M hw/intc/pnv_xive2.c Log Message: ----------- ppc/xive: Use address_space routines to access the machine RAM to log an error in case of bad configuration of the XIVE tables by the FW. Reviewed-by: Frederic Barrat <fbar...@linux.ibm.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 61666d40d2463e65e4c999f17fce2916eef143b5 https://github.com/qemu/qemu/commit/61666d40d2463e65e4c999f17fce2916eef143b5 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/intc/xive.c M include/hw/ppc/xive.h Log Message: ----------- ppc/xive: Introduce a new XiveRouter end_notify() handler It will help us model the END triggers on the PowerNV machine, which can be rerouted to another interrupt controller. Reviewed-by: Frederic Barrat <fbar...@linux.ibm.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 922ea1904987627340d72b408c8aee3cee639c2a https://github.com/qemu/qemu/commit/922ea1904987627340d72b408c8aee3cee639c2a Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/intc/pnv_xive.c M hw/intc/pnv_xive_regs.h Log Message: ----------- ppc/xive: Handle END triggers between chips with MMIOs The notify page of the interrupt controller can either be used to receive trigger events from the HW controllers (PHB, PSI) or to reroute interrupts between Interrupt Controllers. In which case, the VSD table is used to determine the address of the notify page of the remote IC and the store data is forwarded. Today, our model grabs the remote VSD (EAS, END, NVT) address using pnv_xive_get_remote() helper. Be more precise and implement remote END triggers using a store on the remote IC notify page. We still have a shortcut in the model for the NVT accesses which we will address later. Reviewed-by: Frederic Barrat <fbar...@linux.ibm.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 6ed470577a24fe471b09e4be089f34bb1eefc5a0 https://github.com/qemu/qemu/commit/6ed470577a24fe471b09e4be089f34bb1eefc5a0 Author: Cédric Le Goater <c...@kaod.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M hw/intc/pnv_xive.c Log Message: ----------- ppc/xive: Add support for the PC MMIOs The XIVE interrupt contoller maintains various fields on interrupt targets in a structure called NVT. Each unit has a NVT cache, backed by RAM. When the NVT structure is not local (in RAM) to the chip, the XIVE interrupt controller forwards the memory operation to the owning chip using the PC MMIO region configured for this purpose. QEMU does not need to be so precise since software shouldn't perform any of these operations. The model implementation is simplified to return the RAM address of the NVT structure which is then used by pnv_xive_vst_write or read to perform the operation in RAM. Remove the last use of pnv_xive_get_remote(). Reviewed-by: Frederic Barrat <fbar...@linux.ibm.com> Signed-off-by: Cédric Le Goater <c...@kaod.org> Commit: 2fd319cff0ffbc0b54a61a2a34775ec40836e4c4 https://github.com/qemu/qemu/commit/2fd319cff0ffbc0b54a61a2a34775ec40836e4c4 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: get the DisplayState from new_console() There is no obvious reason to defer text console initialization. We can simply take the global display state in new_console(). This simplify somewhat the code to allow moving the VC to a separate unit. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-10-marcandre.lur...@redhat.com> Commit: dc6984bdc3ebe5357b0c1d983ba4e7689a985f2e https://github.com/qemu/qemu/commit/dc6984bdc3ebe5357b0c1d983ba4e7689a985f2e Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: new_console() cannot fail There is no code path that could allow a NULL return there. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-11-marcandre.lur...@redhat.com> Commit: 6657e41cde73597e61c0165da7be7e76f116f342 https://github.com/qemu/qemu/commit/6657e41cde73597e61c0165da7be7e76f116f342 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: VC always has a DisplayState now Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-12-marcandre.lur...@redhat.com> Commit: 8c63667b25cf377fa6ef46149ac55dc7e9e553db https://github.com/qemu/qemu/commit/8c63667b25cf377fa6ef46149ac55dc7e9e553db Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: move VCChardev declaration at the top To allow easier refactoring in following patches. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-13-marcandre.lur...@redhat.com> Commit: bd0285e16d1f8550501ca261ad90eefa7d00d1a4 https://github.com/qemu/qemu/commit/bd0285e16d1f8550501ca261ad90eefa7d00d1a4 Author: Fabiano Rosas <faro...@suse.de> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M block/qapi.c M include/block/qapi.h Log Message: ----------- block: Remove bdrv_query_block_node_info The last call site of this function has been removed by commit c04d0ab026 ("qemu-img: Let info print block graph"). Reviewed-by: Claudio Fontana <cfont...@suse.de> Signed-off-by: Fabiano Rosas <faro...@suse.de> Message-ID: <20230901184605.32260-2-faro...@suse.de> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: bb86eb45297840c31dbc4df6bac02e50596f2376 https://github.com/qemu/qemu/commit/bb86eb45297840c31dbc4df6bac02e50596f2376 Author: Fabiano Rosas <faro...@suse.de> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M block/qapi.c Log Message: ----------- block: Remove unnecessary variable in bdrv_block_device_info The commit 5d8813593f ("block/qapi: Let bdrv_query_image_info() recurse") removed the loop where we set the 'bs0' variable, so now it is just the same as 'bs'. Signed-off-by: Fabiano Rosas <faro...@suse.de> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-ID: <20230901184605.32260-3-faro...@suse.de> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 3be82c6a3a983cd382aad2200fede5ec304dbc1e https://github.com/qemu/qemu/commit/3be82c6a3a983cd382aad2200fede5ec304dbc1e Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: replace variable with static text attributes default Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-14-marcandre.lur...@redhat.com> Commit: d7c634aadf83e029b70b5d508fbfda4671e206d6 https://github.com/qemu/qemu/commit/d7c634aadf83e029b70b5d508fbfda4671e206d6 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: fold text_update_xy() Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-15-marcandre.lur...@redhat.com> Commit: 4c946b7f97e09e625d8c359f06f6b3e1ce937e89 https://github.com/qemu/qemu/commit/4c946b7f97e09e625d8c359f06f6b3e1ce937e89 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: pass VCCharDev to VC-specific functions Even though they actually use more of QemuConsole at this point, it makes it clearer those functions are only used from the chardev implementation. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-16-marcandre.lur...@redhat.com> Commit: 6505fd8d2390e57c6a2e84f9c07b9e408ad7da76 https://github.com/qemu/qemu/commit/6505fd8d2390e57c6a2e84f9c07b9e408ad7da76 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: move VCCharDev specific fields out of QemuConsole Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-17-marcandre.lur...@redhat.com> Commit: e265917c77710ef721e4c333bccfecf030c7776c https://github.com/qemu/qemu/commit/e265917c77710ef721e4c333bccfecf030c7776c Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: use OBJECT_DEFINE_TYPE for QemuConsole The following patch will move some object initialization to the corresponding handlers. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-18-marcandre.lur...@redhat.com> Commit: 098d57e7c0aa347f08f0738e8bd55b9a7faed8d7 https://github.com/qemu/qemu/commit/098d57e7c0aa347f08f0738e8bd55b9a7faed8d7 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: change new_console() to use object initialization Object construction should be done in respective object instance and class handlers. Introduce qemu_console_register() to split out the registration logic. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-19-marcandre.lur...@redhat.com> Commit: b208f745a8af27344c7c8401560b312a4f4bd539 https://github.com/qemu/qemu/commit/b208f745a8af27344c7c8401560b312a4f4bd539 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: introduce different console objects Boilerplate code to introduce different object types for the different console types. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-20-marcandre.lur...@redhat.com> Commit: c105d60f7fe912cca558ce5ff5680bfd0c1300fa https://github.com/qemu/qemu/commit/c105d60f7fe912cca558ce5ff5680bfd0c1300fa Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: instantiate a specific console type This will allow to move code/data to the specific console types. Replace console_type_t with object type check. QemuConsole can be abstract. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-21-marcandre.lur...@redhat.com> Commit: ba0ec5c2931cd6efafc92bde3bd8fc3f99594fd3 https://github.com/qemu/qemu/commit/ba0ec5c2931cd6efafc92bde3bd8fc3f99594fd3 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: register the console from qemu_console_init() Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-22-marcandre.lur...@redhat.com> Commit: 34b7751574ebac7e19bfdb3ed0f91550c5ed171b https://github.com/qemu/qemu/commit/34b7751574ebac7e19bfdb3ed0f91550c5ed171b Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: remove new_console() The constructor helper isn't of much used now. "head" is only specified for graphic console (and default to 0), and we are going to move it to QemuGraphicConsole next. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-23-marcandre.lur...@redhat.com> Commit: f9411aaebd99e1efb04f0d32f01b37467e43b6a0 https://github.com/qemu/qemu/commit/f9411aaebd99e1efb04f0d32f01b37467e43b6a0 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/ui/console.h M ui/console.c Log Message: ----------- ui/console: specialize console_lookup_unused() graphics_console_init() is expected to return a graphic console. The function doesn't need to be exported. We are going to specialize further QemuGraphicConsole & QemuTextConsole. The two will not be interchangeable anymore. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-24-marcandre.lur...@redhat.com> Commit: 7fa4b8041b870951642515e0954d274ec4d599b1 https://github.com/qemu/qemu/commit/7fa4b8041b870951642515e0954d274ec4d599b1 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: update the head from unused QemuConsole When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-25-marcandre.lur...@redhat.com> Commit: cfde05d15bbad620f87592edc2882611acbacc53 https://github.com/qemu/qemu/commit/cfde05d15bbad620f87592edc2882611acbacc53 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: allocate ui_timer in QemuConsole Although at this point only QemuGraphicConsole have hw_ops that implements ui_info() callback, it makes sense to keep the code in the base QemuConsole, to simplify conditions for the caller. As of now, the code didn't reach a NULL timer because dpy_set_ui_info() checks if dpy_ui_info_supported() (hw_ops->ui_info != NULL), which is false for text_console_ops. This is a bit fragile, let simply allocate and free the timer in the base class. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-26-marcandre.lur...@redhat.com> Commit: b97a76d0355f8fc3856de9ebd4f6929b51ba26fb https://github.com/qemu/qemu/commit/b97a76d0355f8fc3856de9ebd4f6929b51ba26fb Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: move cursor_timer initialization to QemuTextConsole class The timer is only relevant when a text console exists. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-27-marcandre.lur...@redhat.com> Commit: 463c6b19c75313734e6e1b624d6b89dd8eb62516 https://github.com/qemu/qemu/commit/463c6b19c75313734e6e1b624d6b89dd8eb62516 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: free more QemuConsole resources This code path is probably not executed at this point, since console aren't being released. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-28-marcandre.lur...@redhat.com> Commit: b2bb9cc43dbb942a5333a6271629fd6094771bca https://github.com/qemu/qemu/commit/b2bb9cc43dbb942a5333a6271629fd6094771bca Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: move text fields to QemuTextConsole Now we can instantiate the specific console with its own fields. Pass the most appropriate type to the various functions, and cast up to QEMU_CONSOLE as necessary. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-29-marcandre.lur...@redhat.com> Commit: 58d5870845c61cea1e7df287b86c2607b2bf48a9 https://github.com/qemu/qemu/commit/58d5870845c61cea1e7df287b86c2607b2bf48a9 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: move graphic fields to QemuGraphicConsole Move fields specific to graphic console to the console subclass. qemu_console_get_head() is adapated to accomodate QemuTextConsole, and always returns 0. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-30-marcandre.lur...@redhat.com> Commit: 98ee9dab81b2bc75d6ccf86681053ed80f9fc9af https://github.com/qemu/qemu/commit/98ee9dab81b2bc75d6ccf86681053ed80f9fc9af Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: fold text_console_do_init() in vc_chr_open() Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230830093843.3531473-31-marcandre.lur...@redhat.com> Commit: 60cb14b4f9d94d750640f42e0f18a1710b8d6c1a https://github.com/qemu/qemu/commit/60cb14b4f9d94d750640f42e0f18a1710b8d6c1a Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: move some text console initialization to qom handlers Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-32-marcandre.lur...@redhat.com> Commit: 5e5a30b7d17f207a85af167ba3efdeff2b1f61de https://github.com/qemu/qemu/commit/5e5a30b7d17f207a85af167ba3efdeff2b1f61de Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: simplify getting active_console size We can get the active console dimension regardless of its kind, by simply giving NULL as argument. It will fallback with the given value when the dimensions aren't known. This will also allow to move the code in a separate unit more easily. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-33-marcandre.lur...@redhat.com> Commit: 6ce7b1fa8844db668f0a3c0b37b78b08d331a16a https://github.com/qemu/qemu/commit/6ce7b1fa8844db668f0a3c0b37b78b08d331a16a Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: remove need for g_width/g_height Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-34-marcandre.lur...@redhat.com> Commit: 742a6896ea1b83894e68b2dc455b63cea498bafc https://github.com/qemu/qemu/commit/742a6896ea1b83894e68b2dc455b63cea498bafc Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: use common text console surface creation Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-35-marcandre.lur...@redhat.com> Commit: 8c6381d84668ff9b6324bf00b91107cbcaf7505f https://github.com/qemu/qemu/commit/8c6381d84668ff9b6324bf00b91107cbcaf7505f Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/ui/console.h M ui/console.c Log Message: ----------- ui/console: declare console types in console.h We are going to split the console.c unit next, and implement separately. But we need to check the underlying type in various places. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-36-marcandre.lur...@redhat.com> Commit: 1ece6777fe1770f8a26f6887be96b21edfd0e442 https://github.com/qemu/qemu/commit/1ece6777fe1770f8a26f6887be96b21edfd0e442 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/ui/qemu-pixman.h M ui/console.c Log Message: ----------- ui/console: use QEMU_PIXMAN_COLOR helpers QEMU_RGB macro is actually defining a pixman color. Make this explicit in the macro name. Move it to qemu-pixman.h so it can be used elsewhere, as done in the following patch. Finally, define QEMU_PIXMAN_COLOR_{BLACK,GRAY}, to avoid need to look up the VGA color table from the QemuConsole placeholder surface rendering. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20230830093843.3531473-37-marcandre.lur...@redhat.com> Commit: b704a8ce0c17f2f9f50a62cbe9053ef587c35db4 https://github.com/qemu/qemu/commit/b704a8ce0c17f2f9f50a62cbe9053ef587c35db4 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: rename vga_ functions with qemu_console_ They are not specific to VGA. Let's use the object type name as prefix instead, to avoid confusion. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20230830093843.3531473-38-marcandre.lur...@redhat.com> Commit: 0a1642e7ccdadf6c3da670369eeceec410dce058 https://github.com/qemu/qemu/commit/0a1642e7ccdadf6c3da670369eeceec410dce058 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: assert(surface) where appropriate The QemuTextConsole code paths assume a surface is being used as scanout, let's make this more explicit. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-39-marcandre.lur...@redhat.com> Commit: 3f9c21325c4c2005a852744db1016c479d60cb55 https://github.com/qemu/qemu/commit/3f9c21325c4c2005a852744db1016c479d60cb55 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: fold text_console_update_cursor_timer Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20230830093843.3531473-40-marcandre.lur...@redhat.com> Commit: 9cb737b77d9cc43a9bed305cbb105928a3dda54b https://github.com/qemu/qemu/commit/9cb737b77d9cc43a9bed305cbb105928a3dda54b Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/vc: skip text console resize when possible This function is called on invalidate, on each cursor blink. Avoid the extra copy when the console size didn't change. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-41-marcandre.lur...@redhat.com> Commit: 893fe23e7dc675d650a4da710efe62a53c2341ee https://github.com/qemu/qemu/commit/893fe23e7dc675d650a4da710efe62a53c2341ee Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: minor stylistic changes Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-42-marcandre.lur...@redhat.com> Commit: 322dae4bc817fe288a103427f53de2a945daca27 https://github.com/qemu/qemu/commit/322dae4bc817fe288a103427f53de2a945daca27 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/ui/console.h M ui/console.c Log Message: ----------- ui/vc: move text console invalidate in helper This will allow to split the VC code in a separate unit more easily. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-43-marcandre.lur...@redhat.com> Commit: 32aa1f8dee3b2e8a4606bc2836a022f1ff5e7f0c https://github.com/qemu/qemu/commit/32aa1f8dee3b2e8a4606bc2836a022f1ff5e7f0c Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/chardev/char.h M qapi/char.json M ui/console.c M ui/gtk.c M ui/spice-app.c Log Message: ----------- ui/vc: do not parse VC-specific options in Spice and GTK In commit 6f974c843c ("gtk: overwrite the console.c char driver"), I shared the VC console parse handler with GTK. And later on in commit d8aec9d9 ("display: add -display spice-app launching a Spice client"), I also used it to handle spice-app VC. This is not necessary, the VC console options (width/height/cols/rows) are specific, and unused by tty-level GTK/Spice VC. This is not a breaking change, as those options are still being parsed by QAPI ChardevVC. Adjust the documentation about it. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-44-marcandre.lur...@redhat.com> Commit: 9db018ac56119ee8e0a87a1a340276e4c8d86392 https://github.com/qemu/qemu/commit/9db018ac56119ee8e0a87a1a340276e4c8d86392 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M include/ui/console.h M ui/console.c M ui/gtk.c M ui/sdl2-input.c M ui/sdl2.c Log Message: ----------- ui/vc: change the argument for QemuTextConsole Those functions are specifc to text/vc console, make that explicit from the argument type. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230830093843.3531473-45-marcandre.lur...@redhat.com> Commit: 1663ffb9157e3dc17d14741f6cd6c48bfffde9d0 https://github.com/qemu/qemu/commit/1663ffb9157e3dc17d14741f6cd6c48bfffde9d0 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/spice-display.c Log Message: ----------- ui/spice-display: Avoid dynamic stack allocation Use an autofree heap allocation instead of a variable-length array on the stack in qemu_spice_create_update(). The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230818151057.1541189-2-peter.mayd...@linaro.org> Commit: e12acaf75d1ffadfd527180dac798368716a0001 https://github.com/qemu/qemu/commit/e12acaf75d1ffadfd527180dac798368716a0001 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/vnc-enc-hextile-template.h Log Message: ----------- ui/vnc-enc-hextile: Use static rather than dynamic length stack array In the send_hextile_tile_* function we create a variable length array data[]. In fact we know that the client_pf.bytes_per_pixel is at most 4 (enforced by set_pixel_format()), so we can make the array a compile-time fixed length of 1536 bytes. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> [ Marc-André - rename BPP to MAX_BYTES_PER_PIXEL ] Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230818151057.1541189-3-peter.mayd...@linaro.org> Commit: dd0439e1496ad326dcaa7dc67f91f2e6f6c4930b https://github.com/qemu/qemu/commit/dd0439e1496ad326dcaa7dc67f91f2e6f6c4930b Author: Philippe Mathieu-Daudé <phi...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/vnc-enc-tight.c Log Message: ----------- ui/vnc-enc-tight: Avoid dynamic stack allocation Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> [PMM: expanded commit message] Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Francisco Iglesias <frasse.igles...@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230818151057.1541189-4-peter.mayd...@linaro.org> Commit: cb6ccdc9ca705cd8c3ef50e51c16a3732c2fa734 https://github.com/qemu/qemu/commit/cb6ccdc9ca705cd8c3ef50e51c16a3732c2fa734 Author: Bilal Elmoussaoui <belmo...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/dbus-console.c Log Message: ----------- ui/dbus: Properly dispose touch/mouse dbus objects Fixes: 142ca628a7 ("ui: add a D-Bus display backend") Fixes: de9f844ce2 ("ui/dbus: Expose a touch device interface") Signed-off-by: Bilal Elmoussaoui <belmo...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230901124507.94087-1-belmo...@redhat.com> Commit: 7007e98c4ba443ce5d42acf851daaa1835b18e83 https://github.com/qemu/qemu/commit/7007e98c4ba443ce5d42acf851daaa1835b18e83 Author: Bilal Elmoussaoui <belmo...@redhat.com> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/dbus-listener.c Log Message: ----------- ui/dbus: implement damage regions for GL Currently, when using `-display dbus,gl=on` all updates to the client become "full scanout" updates, meaning there is no way for the client to limit damage regions to the display server. Instead of using an "update count", this patch tracks the damage region and propagates it to the client. This was less of an issue when clients were using GtkGLArea for rendering, as you'd be doing full-surface redraw. To be efficient, the client needs both a DMA-BUF and the damage region to be updated. Co-authored-by: Christian Hergert <cherg...@redhat.com> Signed-off-by: Bilal Elmoussaoui <belmo...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230814125802.102160-1-belmo...@redhat.com> Commit: 1b4fd51656556646b1a0842e596cb606d73e26cf https://github.com/qemu/qemu/commit/1b4fd51656556646b1a0842e596cb606d73e26cf Author: Guoyi Tu <t...@chinatelecom.cn> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/vdagent.c Log Message: ----------- ui/vdagent: call vdagent_disconnect() when agent connection is lost when the agent connection is lost, the input handler of the mouse doesn't deactivate, which results in unresponsive mouse events in VNC windows. To fix this issue, call vdagent_disconnect() to reset the state each time the frontend disconncect Signed-off-by: Guoyi Tu <t...@chinatelecom.cn> Signed-off-by: dengpengcheng <dengp...@chinatelecom.cn> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <71fd5a58fd09f10cdb35f167b2edb5669300116e.1692281173.git.t...@chinatelecom.cn> Commit: 878490937c6273f27191e3a195c7a60fa68819b8 https://github.com/qemu/qemu/commit/878490937c6273f27191e3a195c7a60fa68819b8 Author: Guoyi Tu <t...@chinatelecom.cn> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/vdagent.c Log Message: ----------- ui/vdagent: Unregister input handler of mouse during finalization Input handler resource should be released when VDAgentChardev object finalize Signed-off-by: Guoyi Tu <t...@chinatelecom.cn> Signed-off-by: dengpengcheng <dengp...@chinatelecom.cn> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <e7f5e172abf797d454e00a4bbe53af83e4aa4497.1692281173.git.t...@chinatelecom.cn> Commit: e38f4e976dd40c985bfe84230a627de9a108c9d3 https://github.com/qemu/qemu/commit/e38f4e976dd40c985bfe84230a627de9a108c9d3 Author: Dmitry Frolov <fro...@swemel.ru> Date: 2023-09-04 (Mon, 04 Sep 2023) Changed paths: M ui/gtk.c Log Message: ----------- ui/gtk: fix leaks found wtih fuzzing It is true, that there is no problem during runtime from the first sight, because the memory is lost just before qemu exits. Nevertheless, this change is necessary, because AddressSanitizer is not able to recognize this situation and produces crash-report (which is false-positive in fact). Lots of False-Positive warnings are davaluing problems, found with fuzzing, and thus the whole methodology of dynamic analysis. This patch eliminates such False-Positive reports, and makes every problem, found with fuzzing, more valuable. Fixes: 060ab76356 ("gtk: don't exit early in case gtk init fails") Signed-off-by: Dmitry Frolov <fro...@swemel.ru> Reviewed-by: Michael Tokarev <m...@tls.msk.ru> Message-Id: <20230825115818.1091936-1-fro...@swemel.ru> Commit: e00ad5293f8781c37fba7d2bfde4ccd94ea9e64d https://github.com/qemu/qemu/commit/e00ad5293f8781c37fba7d2bfde4ccd94ea9e64d Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-06 (Wed, 06 Sep 2023) Changed paths: M docs/system/arm/aspeed.rst M hw/arm/aspeed.c M hw/arm/stellaris.c M hw/arm/xilinx_zynq.c M hw/arm/xlnx-versal-virt.c M hw/arm/xlnx-zcu102.c M hw/block/m25p80.c M hw/i2c/aspeed_i2c.c M hw/microblaze/petalogix_ml605_mmu.c M hw/riscv/sifive_u.c M hw/sd/sd.c M hw/sd/sdmmc-internal.c M hw/ssi/aspeed_smc.c M hw/ssi/ssi.c M include/hw/block/flash.h M include/hw/i2c/aspeed_i2c.h M include/hw/sd/sd.h M include/hw/ssi/ssi.h M tests/avocado/machine_aspeed.py Log Message: ----------- Merge tag 'pull-aspeed-20230901' of https://github.com/legoater/qemu into staging aspeed queue: * Fixes for the Aspeed I2C model * New SDK image for avocado tests * blockdev support for flash device definition * SD refactoring preparing ground for eMMC support # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmTxsaQACgkQUaNDx8/7 # 7KGXmg//XJNisscl/VWSBaGmH5MbQUAg/QCRalXx1V/lJ8rhE/JqwnWKuoPFd4EN # iDlh3ufpzxPhHFc9boechuM5ytlrJxpLJoCIJ4sw/4qnO3Dy3Q6BCy1t8Ma62D1u # oE7cAMHsriJ1uTJNHUTFo72VapTaH2XwFN9lFDuQW45d+WWAXtVJsqvRgFETNmw6 # YYnTTpH2gLTZZFEgOixhWpGLh4Ibc/l8U1VzL0ctQmC11xng0bqk3PAqU9NGzcM5 # MJmEGAxg43CnFu9NJI1nMqC/coi/8PFtrM7HprSwE3H8Jkwncs4ePVT+kZQC+VNQ # 7EaVkksfEGHlN8XP5+eQDrQ5yT6ve+fbHTLQhwULfeyt0GlQ8h1yewvHCDWo/zw3 # XI1ZyOcNZ2yiaenSUrTPzu0LiqZEJQnzRjPCpgTi1fU08ryEMEaPtr176YDLCguQ # cpRj4QSZHCrGl/Eo9NlkFP/2rQDKTvCcedKPkYLQtsurSiH/36Oj9YvZycNtZ574 # ortKAtru4YV/rglNX4L8JDhdI+nqvy1liifpJsiS/2KBZDpVFaP8PzGIV40HNy3G # 8/LVTnaggZaScF3ftHhkg84uQumELS9l2dhsNCL9HqdlrNXLQrVAIR6iuQlpOKBa # 5S/6h7ZXGOb1qNVQjYp4HCrB7X1KIJYksZ3GdUREf8ot5Ds1FhE= # =ymmX # -----END PGP SIGNATURE----- # gpg: Signature made Fri 01 Sep 2023 05:40:52 EDT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <c...@redhat.com>" [unknown] # gpg: aka "Cédric Le Goater <c...@kaod.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-aspeed-20230901' of https://github.com/legoater/qemu: (26 commits) hw/sd: Introduce a "sd-card" SPI variant model hw/sd: Add sd_cmd_SET_BLOCK_COUNT() handler hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler hw/sd: Add sd_cmd_SEND_RELATIVE_ADDR() handler hw/sd: Add sd_cmd_ALL_SEND_CID() handler hw/sd: Add sd_cmd_SEND_OP_CMD() handler hw/sd: Add sd_cmd_GO_IDLE_STATE() handler hw/sd: Add sd_cmd_unimplemented() handler hw/sd: Add sd_cmd_illegal() handler hw/sd: Introduce sd_cmd_handler type hw/sd: Move proto_name to SDProto structure hw/sd: When card is in wrong state, log which spec version is used hw/sd: When card is in wrong state, log which state it is hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01 aspeed: Get the BlockBackend of FMC0 from the flash device m25p80: Introduce an helper to retrieve the BlockBackend of a device aspeed: Create flash devices only when defaults are enabled hw/ssi: Check for duplicate CS indexes aspeed/smc: Wire CS lines at reset hw/ssi: Introduce a ssi_get_cs() helper ... Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: f3e31516d46dc2bd37c8eb49853f8e4a8983d70c https://github.com/qemu/qemu/commit/f3e31516d46dc2bd37c8eb49853f8e4a8983d70c Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-06 (Wed, 06 Sep 2023) Changed paths: M include/qemu/selfmap.h A linux-user/aarch64/target_proc.h A linux-user/alpha/target_proc.h A linux-user/arm/target_proc.h A linux-user/cris/target_proc.h M linux-user/elfload.c A linux-user/hexagon/target_proc.h A linux-user/hppa/target_proc.h A linux-user/i386/target_proc.h M linux-user/loader.h A linux-user/loongarch64/target_proc.h A linux-user/m68k/target_proc.h A linux-user/microblaze/target_proc.h A linux-user/mips/target_proc.h A linux-user/mips64/target_proc.h M linux-user/mmap.c A linux-user/nios2/target_proc.h A linux-user/openrisc/target_proc.h A linux-user/ppc/target_proc.h M linux-user/qemu.h A linux-user/riscv/target_proc.h A linux-user/s390x/target_proc.h A linux-user/sh4/target_proc.h A linux-user/sparc/target_proc.h M linux-user/syscall.c M linux-user/user-mmap.h A linux-user/x86_64/target_proc.h A linux-user/xtensa/target_proc.h M util/selfmap.c Log Message: ----------- Merge tag 'pull-lu-20230901' of https://gitlab.com/rth7680/qemu into staging linux-user: Rewrite and improve /proc/pid/maps linux-user: Fix shmdt and improve shm region tracking linux-user: Remove ELF_START_MMAP and image_info.start_mmap # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTyTEcdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8aZAf/UVKDv0FwEzxn3wzx # pT+NbP4adHCew5ovDq94In9OpwG4+PtZj3x+EdPCFxAvVb9KdOs001a9zSRYSwWi # 0p9ZkOgtq58/Wr34dl6C8oPZP8bnw7hfVcXWYwdsBq9K+dmW9Tu4LgZSc92NWYiE # SGBATB/cF4keLlDJrm1YBfb6cVKmYHdgQzMHr4g4TitBOO3lic8HQglXN8eKvQyd # ZKuMxFwfSGjaNXsoBLmzPBEqJCLzj5JNtOb8maIN9oPTkkC66XvkBmD/4UrQ7K3x # aX2QgZpxZYZsyKfWJd4EkrJl+0JZYvGW4vBX1c+vBdIYQZoBHlWwZQBqsi+AMA6J # ASc3hQ== # =QWfr # -----END PGP SIGNATURE----- # gpg: Signature made Fri 01 Sep 2023 16:40:39 EDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.hender...@linaro.org" # gpg: Good signature from "Richard Henderson <richard.hender...@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * tag 'pull-lu-20230901' of https://gitlab.com/rth7680/qemu: linux-user: Track shm regions with an interval tree linux-user: Fix shmdt linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt} linux-user: Move shmat and shmdt implementations to mmap.c linux-user: Remove ELF_START_MMAP and image_info.start_mmap linux-user: Emulate the Anonymous: keyword in /proc/self/smaps linux-user: Show heap address in /proc/pid/maps linux-user: Adjust brk for load_bias linux-user: Use walk_memory_regions for open_self_maps util/selfmap: Use dev_t and ino_t in MapInfo linux-user: Emulate /proc/cpuinfo for Alpha linux-user: Emulate /proc/cpuinfo on aarch64 and arm linux-user: Split out cpu/target_proc.h Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: 39e007d41371f78fe6d30ff672ab1f9401a232f1 https://github.com/qemu/qemu/commit/39e007d41371f78fe6d30ff672ab1f9401a232f1 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-06 (Wed, 06 Sep 2023) Changed paths: M hw/intc/pnv_xive.c M hw/intc/pnv_xive2.c M hw/intc/pnv_xive_regs.h M hw/intc/xive.c M hw/ppc/e500.c M hw/ppc/mac_oldworld.c M hw/ppc/pegasos2.c M hw/ppc/pnv_core.c M hw/ppc/ppc.c M hw/ppc/prep.c M hw/ppc/spapr.c M hw/ppc/spapr_cpu_core.c M hw/ppc/spapr_hcall.c M hw/ppc/vof.c M include/hw/ppc/ppc.h M include/hw/ppc/spapr.h M include/hw/ppc/xive.h M include/qemu/host-utils.h M target/ppc/compat.c M target/ppc/cpu.c M target/ppc/cpu.h M target/ppc/cpu_init.c M target/ppc/excp_helper.c M target/ppc/helper.h M target/ppc/internal.h M target/ppc/kvm.c M target/ppc/machine.c M target/ppc/misc_helper.c M target/ppc/mmu-radix64.c M target/ppc/spr_common.h M target/ppc/translate.c M target/ppc/translate/fixedpoint-impl.c.inc M tests/avocado/replay_kernel.py M tests/avocado/reverse_debugging.py Log Message: ----------- Merge tag 'pull-ppc-20230904' of https://github.com/legoater/qemu into staging ppc queue : * debug facility improvements * timebase and decrementer fixes * record-replay fixes * TCG fixes * XIVE model improvements for multichip # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmT1jwIACgkQUaNDx8/7 # 7KH2EQ/+LIO5LMSE2CJAEyeZMqThWwRMMl7CQsfgFFj9BxHVSUvs8xdTWieD9cm+ # GlGwxiM+wEPc/aGdLbVeaOdfh/xB4gqpG3fmjCHRen8vvC4jThcLNvjZqbn8iRvm # 50di9mVe2Cfa4A7yOtv81Z03NDyPmBIODSSFhs4GbAp81iAGhThan/f1eC6EzjxD # Xa+TelCZfA2MWVZeuanEfcp+MrJHUbEiwmiDhNYgfHJdNHKVkJxsJKd7YvMKFH8v # SFpzfbwonvtJrZyn5Mc54ovC3f0j/ztw9PxvJJpKLGuLSz4zM7CaeHMuMIpaMTqg # MtRUZIhZB1O1qzRDWHK37FJMfL5/ThEMQOceJwxJZ8dqCvyv0L6uxmRC56G8djM8 # 7GKm7YXUF4fX3viZ6s7F4E/SelCSvz5ak/G/YEWl6ONv44UAdnJINH63OoRSj07I # KGFoybJtP+RxjhpXqd1V4HZIstHYywjUYhZtLY/M9nKSQ2AtN09NR2eeUCt5ZVKl # mKVcTgU2bX8S02UaYgQIAg5GkV6HyP3GQVzgPSPqdQKBKeroGkjBkv6IIZkoaxL2 # iOXM6fVXNo4LLsVq20kLRR3Ok5xyDRwtjlOlv/wNz6Y47AkKbzDDMhbjQnPuPzA3 # WPp59fiCkiMWvvMCfYVmA6t714Unq5Uqw90RWb+LzRDQnfBmPI8= # =/LFO # -----END PGP SIGNATURE----- # gpg: Signature made Mon 04 Sep 2023 04:02:10 EDT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <c...@redhat.com>" [unknown] # gpg: aka "Cédric Le Goater <c...@kaod.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-ppc-20230904' of https://github.com/legoater/qemu: (35 commits) ppc/xive: Add support for the PC MMIOs ppc/xive: Handle END triggers between chips with MMIOs ppc/xive: Introduce a new XiveRouter end_notify() handler ppc/xive: Use address_space routines to access the machine RAM target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt() hw/ppc/e500: fix broken snapshot replay target/ppc: Flush inputs to zero with NJ in ppc_store_vscr target/ppc: Fix LQ, STQ register-pair order for big-endian tests/avocado: ppc64 reverse debugging tests for pseries and powernv tests/avocado: reverse-debugging cope with re-executing breakpoints tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount spapr: Fix record-replay machine reset consuming too many events spapr: Fix machine reset deadlock from replay-record target/ppc: Fix timebase reset with record-replay target/ppc: Fix CPU reservation migration for record-replay hw/ppc: Read time only once to perform decrementer write hw/ppc: Reset timebase facilities on machine reset target/ppc: Migrate DECR SPR hw/ppc: Always store the decrementer value target/ppc: Sign-extend large decrementer to 64-bits ... Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: 90d910752a3627dd822e50f65a7b567e21620f40 https://github.com/qemu/qemu/commit/90d910752a3627dd822e50f65a7b567e21620f40 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-06 (Wed, 06 Sep 2023) Changed paths: M include/chardev/char.h M include/ui/console.h M include/ui/qemu-pixman.h M qapi/char.json M ui/console.c M ui/dbus-console.c M ui/dbus-listener.c M ui/gtk.c M ui/qemu-pixman.c M ui/sdl2-input.c M ui/sdl2.c M ui/spice-app.c M ui/spice-display.c M ui/ui-qmp-cmds.c M ui/vdagent.c M ui/vnc-enc-hextile-template.h M ui/vnc-enc-tight.c Log Message: ----------- Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging UI patch queue - misc fixes and improvement - cleanups and refactoring in ui/vc code # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmT1wuYcHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5UhmD/wPCVZ/Vipmbexc8eBd # wbI7i0zR5Hj7szU4D1MV+fvi5Y6Z7PWvPxnQOIoWbmEGuhOm5P73oRz1jlBDXGLP # Nh1kh2RvuWILF0Vu+QjJHL5FyA0XJcl/Qhsn1tc7pYMbEOBCpPfpmWRiXrEUDc7/ # S1iSPkB2a7YYwuMW6ksPyKlsb4tjGyea/HYz1lTdw8bJxaFVXMFX35lrqz+A5ZGz # XAk/6OyMtkMbBi8hWcd6IweYyc/DYaK8emqppQLIUenZEz7nKSWlEUIKcXpf9U4n # 3W+BISACxnw7KbXrrZl2KJf2Bix6LRureoscZTKawnB/D5hV+g7PtEjNMUQsxjg3 # RyV9+zSPsIg5zXunrHIs1rrUtGS5SvdQbIQYqHPNdL86iuWKer+EnwA06vflweLw # P7FZhuBNvuY3gU2sdCk5Q7My92YT5DRWjoJRHLFGNYTxPA6MYPivIu8RqsBiu+JX # BvK1FfhG2JsR9XuuOFR968AXLfMc0hOlHfHWvORk3s/9zIpeEWmQbnGxr1sN9El8 # o+rDIkcadELuzcTJcoHCKdCzjFbLdNNKgvbcVQdw3rdp2rvQ6CZalyh+qZEihAy4 # xLVO+hUypxNhRAg/DtZilUW6cPavn0OjoH/3BgY0F0GiwvhFMntyVGN7eBdwnC7c # sV5s4Xnafmh5xnGf0GS3UyuX9g== # =JxZP # -----END PGP SIGNATURE----- # gpg: Signature made Mon 04 Sep 2023 07:43:34 EDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lur...@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lur...@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lur...@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu: (52 commits) ui/gtk: fix leaks found wtih fuzzing ui/vdagent: Unregister input handler of mouse during finalization ui/vdagent: call vdagent_disconnect() when agent connection is lost ui/dbus: implement damage regions for GL ui/dbus: Properly dispose touch/mouse dbus objects ui/vnc-enc-tight: Avoid dynamic stack allocation ui/vnc-enc-hextile: Use static rather than dynamic length stack array ui/spice-display: Avoid dynamic stack allocation ui/vc: change the argument for QemuTextConsole ui/vc: do not parse VC-specific options in Spice and GTK ui/vc: move text console invalidate in helper ui/console: minor stylistic changes ui/vc: skip text console resize when possible ui/console: fold text_console_update_cursor_timer ui/console: assert(surface) where appropriate ui/console: rename vga_ functions with qemu_console_ ui/console: use QEMU_PIXMAN_COLOR helpers ui/console: declare console types in console.h ui/vc: use common text console surface creation ui/console: remove need for g_width/g_height ... Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: 388fd936ae23bfa38b1bb6e9404abaed7464c921 https://github.com/qemu/qemu/commit/388fd936ae23bfa38b1bb6e9404abaed7464c921 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-09-06 (Wed, 06 Sep 2023) Changed paths: M block.c M block/block-backend.c M block/io.c M block/iscsi.c M block/qapi.c M block/vmdk.c M block/vpc.c M docs/tools/qemu-img.rst M hw/nvme/ctrl.c M include/block/aio.h M include/block/block-global-state.h M include/block/block-io.h M include/block/block_int-common.h M include/block/qapi.h M qemu-img.c M softmmu/dma-helpers.c M tests/qemu-iotests/080.out M tests/qemu-iotests/109.out M tests/qemu-iotests/112.out M tests/qemu-iotests/185 M tests/qemu-iotests/185.out M tests/qemu-iotests/244.out M util/thread-pool.c Log Message: ----------- Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging Block layer patches - Process I/O in the current AioContext (instead of the BB AioContext) - Optimise reqs_lock to make multiqueue actually scale - iotests: Fix reference output for some tests after recent changes - vpc: Avoid dynamic stack allocation - Code cleanup, improved documentation # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmT16nMRHGt3b2xmQHJl # ZGhhdC5jb20ACgkQfwmycsiPL9bN5BAAyOFsVxAd9GmHHXVaROprd7uziW46++QK # wgs3YWZnzm5P1ZhQ1h0PIW1YsY7jJF2V8cMKKOPCnZQTdOB7uFv2z1FjGrVa3nMG # M12H5WQkdZQkMC7NNw02Ca+d1RSAt8BnsViSTm0xEKnZJ/Wal4VT8TWFGnan1MR0 # uIlCf2Adu8KTI/khiQQmF/VT3acfGace+tdcYBZFc9RzgPHqTGuRkM3fM9bK46k7 # 9T4ilI5HZt9iSyolpE4FwQtGnaTMj3hrIyFTdVTBN689w9T458KD0Yvj0U5EqlCU # Nl6J1rUacDqvw0YufdrvyDyRAhdSr0BPseR4uAe3nS3t19fzU96Z6L3Y4pkOwETj # yCdFF2kdqi7du5r1YLgJX83BTNBEv63OSQ02rjQP/crg+uU0s2eM2ReUF3NkWWU3 # 5gd9HrCKe7NaARD99cmcq7RNGII6R7il9f9+6SWnACW9j3Ijb92AQbTrAiq2OhMH # Na8rbm152CHWEp//EOhbi44CTXLLck6mUr8DH8kzjSwIKZz50dFFpgAVEX2GwlTN # VA/s0cLQnTjZzKil/p80alZ81khziv3QbpvyBl524uU0LqC5pZrnaPndEs1vEK5Y # 5oKgXm/fVmW4VKLxa63vDX2syBYN2b+pvHW8LEfW0sgHJiltzqie0kfW0836ztE0 # vvx0h79oSZU= # =eCVG # -----END PGP SIGNATURE----- # gpg: Signature made Mon 04 Sep 2023 10:32:19 EDT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kw...@redhat.com" # gpg: Good signature from "Kevin Wolf <kw...@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * tag 'for-upstream' of https://repo.or.cz/qemu/kevin: block: Remove unnecessary variable in bdrv_block_device_info block: Remove bdrv_query_block_node_info block-backend: process zoned requests in the current AioContext block-backend: process I/O in the current AioContext block: remove AIOCBInfo->get_aio_context() vmdk: Clean up bdrv_open_child() return value check qemu-img: Update documentation for compressed images block: Be more verbose in create fallback block/iscsi: Document why we use raw malloc() qemu-img: omit errno value in error message block: change reqs_lock to QemuMutex block: minimize bs->reqs_lock section in tracked_request_end() iotests: adapt test output for new qemu_cleanup() behavior block/vpc: Avoid dynamic stack allocation Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Compare: https://github.com/qemu/qemu/compare/2d8fbcb1eecd...388fd936ae23