Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: 0a9a27305da030a83e65714f6ba202dbcaf448a3 https://github.com/qemu/qemu/commit/0a9a27305da030a83e65714f6ba202dbcaf448a3 Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025)
Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Do not ignore errors in sd_cmd_to_sendingdata() Unfortunately when adding sd_cmd_to_sendingdata() in commit f486bf7d109 we neglected to return any possible error. Fix. Fixes: f486bf7d109 ("hw/sd/sdcard: Introduce sd_cmd_to_sendingdata and sd_generic_read_byte") Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Message-Id: <20250804133406.17456-2-phi...@linaro.org> Commit: 3025ea65bd515196e871adc8959336c51b9d27bc https://github.com/qemu/qemu/commit/3025ea65bd515196e871adc8959336c51b9d27bc Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Factor sd_response_size() out Set @rsplen once before switching to fill the response buffer. This will allow to assert in a single place that the buffer is big enough to be filled with the response. Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-3-phi...@linaro.org> Commit: b82e7a2a1da5638c4c51fcf5a254b65762080b85 https://github.com/qemu/qemu/commit/b82e7a2a1da5638c4c51fcf5a254b65762080b85 Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/allwinner-sdhost.c M hw/sd/bcm2835_sdhost.c M hw/sd/core.c M hw/sd/omap_mmc.c M hw/sd/pl181.c M hw/sd/sd.c M hw/sd/sdhci.c M hw/sd/ssi-sd.c M include/hw/sd/sd.h Log Message: ----------- hw/sd/sdbus: Provide buffer size to sdbus_do_command() We provide to sdbus_do_command() a pointer to a buffer to be filled with a varying number of bytes. By not providing the buffer size, the callee can not check the buffer is big enough. Pass the buffer size as argument to follow good practices. sdbus_do_command() doesn't return any error, only the size filled in the buffer. Convert the returned type to unsigned and remove the few unreachable lines in callers. This allow to check for possible overflow in sd_do_command(). Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-4-phi...@linaro.org> Commit: 1585ab9f1baf6f0b471483455a74ea7abe9add0f https://github.com/qemu/qemu/commit/1585ab9f1baf6f0b471483455a74ea7abe9add0f Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c M hw/sd/ssi-sd.c Log Message: ----------- hw/sd/sdcard: Fill SPI response bits in card code ssi-sd.c contains the SPI link layer adaptation, while sd.c contains all the SD card internal details. We already handle the response values in sd.c, but missed the SPI case. Complete them (fill R1, prepend R1 in R3/R7 and always return something in SPI mode). Remove all the duplication in ssi-sd.c. Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-5-phi...@linaro.org> Commit: 0f2ff994793247c710c79f95302f3e8c10d070de https://github.com/qemu/qemu/commit/0f2ff994793247c710c79f95302f3e8c10d070de Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c M hw/sd/ssi-sd.c Log Message: ----------- hw/sd/sdcard: Implement SPI R2 return value In SPI mode, R2 is a 2-byte value. Implement in spi_response_r2_make() and return SPI R2 in the SEND_STATUS commands. Reported-by: Guenter Roeck <li...@roeck-us.net> Fixes: 775616c3ae8 ("Partial SD card SPI mode support") Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-6-phi...@linaro.org> Commit: 3241a61a1374b4d9b0e835fb3fa5b4085377eebb https://github.com/qemu/qemu/commit/3241a61a1374b4d9b0e835fb3fa5b4085377eebb Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Use complete SEND_OP_COND implementation in SPI mode While spi_cmd_SEND_OP_COND() is incomplete, sd_cmd_SEND_OP_COND() is, except it doesn't return the correct value in SPI mode. Correct and use, removing the need for spi_cmd_SEND_OP_COND(). Fixes: 775616c3ae8 ("Partial SD card SPI mode support") Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-7-phi...@linaro.org> Commit: 3c7bde41a37546a49e10adafc54e9201ac087585 https://github.com/qemu/qemu/commit/3c7bde41a37546a49e10adafc54e9201ac087585 Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Allow using SWITCH_FUNCTION in more SPI states In SPI mode, SWITCH_FUNCTION is valid in all mode (except the IDLE one). Fixes: 775616c3ae8 ("Partial SD card SPI mode support") Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-8-phi...@linaro.org> Commit: 7574baef43f0d1bd6982be7d5087af3bca2a7a4f https://github.com/qemu/qemu/commit/7574baef43f0d1bd6982be7d5087af3bca2a7a4f Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Factor spi_cmd_SEND_CxD() out spi_cmd_SEND_CSD() and spi_cmd_SEND_CID() are very similar. Factor the common code as spi_cmd_SEND_CxD(). Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-9-phi...@linaro.org> Commit: 823d9b00452b62dcee1b0692c578c6fa5eef517e https://github.com/qemu/qemu/commit/823d9b00452b62dcee1b0692c578c6fa5eef517e Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c Log Message: ----------- hw/sd/sdcard: Disable checking STBY mode in SPI SEND_CSD/CID The card should be in STANDBY mode to process SEND_CSD or SEND_CID, but is still in IDLE mode. Unfortunately I don't have enough time to keep debugging this issue, so disable the check for the time being and the next release, as it blocks Linux. I'll keep looking. Reported-by: Guenter Roeck <li...@roeck-us.net> Reported-by: Ben Dooks <ben.do...@codethink.co.uk> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-10-phi...@linaro.org> Commit: 40b242884ed7aeb30613dd42eca6e8712d607c46 https://github.com/qemu/qemu/commit/40b242884ed7aeb30613dd42eca6e8712d607c46 Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/sd/sd.c M hw/sd/trace-events Log Message: ----------- hw/sd/sdcard: Remove SDState::mode field SD card mode is a superset of its state (SDState::state), no need to migrate it. Use sd_mode() to get the SDCardModes from the SDCardStates. Fixes: 50a5be6c3d5 ("hw/sd.c: add SD card save/load support") Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-11-phi...@linaro.org> Commit: 90fd1591314781e7da8560e4008f411aba501b4a https://github.com/qemu/qemu/commit/90fd1591314781e7da8560e4008f411aba501b4a Author: Philippe Mathieu-Daudé <phi...@linaro.org> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M MAINTAINERS M tests/functional/meson.build A tests/functional/test_riscv64_sifive_u.py Log Message: ----------- tests/functional: Test SD cards in SPI mode (using sifive_u machine) Add a test which uses the sifive_u machine to boot a Linux kernel from a SD card connected via a SPI interface. Inspired from the command provided in: - https://lore.kernel.org/qemu-devel/94b2c5bf-53d0-4c74-8264-f3021916f...@roeck-us.net/ - https://lore.kernel.org/qemu-devel/840016d0-0d49-4ef4-8372-b62b3bcd0...@codethink.co.uk/ Inspired-by: Guenter Roeck <li...@roeck-us.net> Inspired-by: Ben Dooks <ben.do...@codethink.co.uk> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Acked-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20250804133406.17456-12-phi...@linaro.org> Commit: 4e5d58969ed6927a7f1b08ba6223c34c8b990c92 https://github.com/qemu/qemu/commit/4e5d58969ed6927a7f1b08ba6223c34c8b990c92 Author: Zhao Liu <zhao1....@intel.com> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M target/i386/cpu.c Log Message: ----------- target/i386/cpu: Move addressable ID encoding out of compat property in CPUID[0x1] Currently, the addressable ID encoding for CPUID[0x1].EBX[bits 16-23] (Maximum number of addressable IDs for logical processors in this physical package) is covered by vendor_cpuid_only_v2 compat property. The previous consideration was to avoid breaking migration and this compat property makes it unfriendly to backport the commit f985a1195ba2 ("i386/cpu: Fix number of addressable IDs field for CPUID.01H.EBX [23:16]"). However, NetBSD booting is broken since the commit 88dd4ca06c83 ("i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]"), because NetBSD calculates smt information via `lp_max` / `core_max` for legacy Intel CPUs which doesn't support 0xb leaf, where `lp_max` is from CPUID[0x1].EBX.bits[16-23] and `core_max` is from CPUID[0x4].0x0.bits[26 -31]. The commit 88dd4ca0 changed the encoding rule of `core_max` but didn't update `lp_max`, so that NetBSD would get the wrong smt information, which leads to the module loading failure. Luckily, the commit f985a1195ba2 ("i386/cpu: Fix number of addressable IDs field for CPUID.01H.EBX[23:16]") updated the encoding rule for `lp_max` and accidentally fixed the NetBSD issue too. This also shows that using CPUID[0x1] and CPUID[0x4].0x0 to calculate HT/SMT information is a common practice to detect CPU topology on legacy Intel CPUs. Therefore, it's necessary to backport the commit f985a1195ba2 to previous stable QEMU to help address the similar issues as well. Then the compat property is not needed any more since all stable QEMUs will follow the same encoding way. So, in CPUID[0x1], move addressable ID encoding out of compat property. Reported-by: Michael Tokarev <m...@tls.msk.ru> Inspired-by: Chuang Xu <xuchuangxc...@bytedance.com> Fixes: commit f985a1195ba2 ("i386/cpu: Fix number of addressable IDs field for CPUID.01H.EBX[23:16]") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3061 Signed-off-by: Zhao Liu <zhao1....@intel.com> Reviewed-by: Michael Tokarev <m...@tls.msk.ru> Tested-by: Michael Tokarev <m...@tls.msk.ru> Message-ID: <20250804053548.1808629-1-zhao1....@intel.com> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Commit: eb013cd6a11951a8d76e737e9f6e89c96b059b48 https://github.com/qemu/qemu/commit/eb013cd6a11951a8d76e737e9f6e89c96b059b48 Author: Eric Auger <eric.au...@redhat.com> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M hw/i386/Kconfig Log Message: ----------- hw/i386/microvm: Explicitly select ACPI_PCI With a microvm-only build based on a custom device config, we get a link failure due to undefined reference to build_pci_host_bridge_osc_method() which is defined in hw/acpi/pci.c and whose compilation depends on CONFIG_ACPI_PCI. Although CONFIG_ACPI and CONFIG_PCI are set with such configuration, implied CONFIG_ACPI_PCI in config PCI_EXPRESS_GENERIC_BRIDGE is not selected as expected. It Looks like CONFIG_ACPI_PCI must be enforced and this patch selects CONFIG_ACPI_PCI in MICROVM config directly as done for PC config. Reproducer: ../configure \ --without-default-features \ --target-list=x86_64-softmmu \ --enable-kvm --disable-tcg \ --enable-pixman \ --enable-vnc \ --audio-drv-list="" \ --without-default-devices \ --with-devices-x86_64=microvm \ --enable-vhost-user with configs/devices/x86_64-softmmu/microvm.mak: CONFIG_PCI_DEVICES=n CONFIG_MICROVM=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_SERIAL=y CONFIG_VIRTIO_INPUT=y CONFIG_VIRTIO_INPUT_HOST=y CONFIG_VHOST_USER_INPUT=y CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_SCSI=y CONFIG_VIRTIO_RNG=y CONFIG_VIRTIO_CRYPTO=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_GPU=y CONFIG_VHOST_USER_GPU=y FAILED: qemu-system-x86_64 cc -m64 @qemu-system-x86_64.rsp /usr/bin/ld: libsystem.a.p/hw_pci-host_gpex-acpi.c.o: in function `acpi_dsdt_add_host_bridge_methods': hw/pci-host/gpex-acpi.c:83:(.text+0x274): undefined reference to `build_pci_host_bridge_osc_method' collect2: error: ld returned 1 exit status Fixes: af151d50eac24 "hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method" Signed-off-by: Eric Auger <eric.au...@redhat.com> Reported-by: Michael Tokarev <m...@tls.msk.ru> Reviewed-by: Michael Tokarev <m...@tls.msk.ru> Message-ID: <20250804152008.247673-1-eric.au...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> Commit: b217d987a3c5c6e2473956723b396bc1ff0f5b2b https://github.com/qemu/qemu/commit/b217d987a3c5c6e2473956723b396bc1ff0f5b2b Author: Michael Tokarev <m...@tls.msk.ru> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M qga/commands-linux.c Log Message: ----------- qga: correctly write to /sys/power/state on linux Commit v9.0.0-343-g2048129625 introduced usage of g_file_set_contents() function to write to /sys/power/state. This function uses G_FILE_SET_CONTENTS_CONSISTENT flag to g_file_set_contents_full(), which is implemented by creating a temp file in the same directory and renaming it to the final destination. Which is not how sysfs works. Here, there's not a big deal to do open/write/close - it becomes almost the same as using g_file_set_contents[_full](). But it does not have surprises like this. Also, since this is linux code, it should be ok to use %m in the error reporting function. Fixes: 2048129625 "qga/commands-posix: don't do fork()/exec() when suspending via sysfs" Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3057 Signed-off-by: Michael Tokarev <m...@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20250801115316.6845-1-...@tls.msk.ru> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: afeb002e0ad49dcf388dedbc6995f6561885e376 https://github.com/qemu/qemu/commit/afeb002e0ad49dcf388dedbc6995f6561885e376 Author: Michael Tokarev <m...@tls.msk.ru> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M tests/qemu-iotests/tests/mirror-sparse Log Message: ----------- tests/qemu-iotests/tests/mirror-sparse: skip if O_DIRECT is not supported This test uses cache.direct=true, but does not check if O_DIRECT is supported by the underlying filesystem, and fails, for example, on a tmpfs (which is rather common on various auto-builders, in CI, etc). Fix this by using `_supported_cache_modes none directsync`. Fixes: c0ddcb2cbc146e "tests: Add iotest mirror-sparse for recent patches" Signed-off-by: Michael Tokarev <m...@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Message-ID: <20250805181731.282677-1-...@tls.msk.ru> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: d2d08975fc01e4898ab43eae0d03d53e689048cd https://github.com/qemu/qemu/commit/d2d08975fc01e4898ab43eae0d03d53e689048cd Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M MAINTAINERS M hw/i386/Kconfig M hw/sd/allwinner-sdhost.c M hw/sd/bcm2835_sdhost.c M hw/sd/core.c M hw/sd/omap_mmc.c M hw/sd/pl181.c M hw/sd/sd.c M hw/sd/sdhci.c M hw/sd/ssi-sd.c M hw/sd/trace-events M include/hw/sd/sd.h M target/i386/cpu.c M tests/functional/meson.build A tests/functional/test_riscv64_sifive_u.py Log Message: ----------- Merge tag 'hw-misc-20250805' of https://github.com/philmd/qemu into staging Misc HW patches - Fix SD cards wired in SPI mode - Fix microvm-only build by selecting Kconfig ACPI_PCI - Fix legacy Intel SMT info removing 'x-vendor-cpuid-only-v2' property check # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmiSP8sACgkQ4+MsLN6t # wN52pw//R2z+DDdtezzOGIsCS8lmcI+sp0rM2UXA0LLuqH4++/SNgSOuH/yr0k9g # 3DxvYxQ+zgx2gxrxG9T/KlGYdl6lE3mb9cWBah8+4UUeKuji2Zt3dh0LrZoIt9A0 # EfHfPihpmVxf0OWXzDUsu3WdUyso3QHHJWVqiUCqnhvNsx1ZSAA7gOUOURL8YUEt # BsCJ4ufRJA6SRqLgiOQHSn1zRVwEmXZWRt6lqWx45ynzxkquaA+pvGY3UlzUsw4b # 5XyBL5Wyq1K7/FTXVXiMCYSNhgSUEbKy7Agnrr1i5s+/XfBjXMuzGFwjAWdCdwVW # /Kqqndlu6COla9APndqjfMhCHU6Ql8KyKqb9HImvZyMks4QNiX3c18CjAuCVoIzE # GxoXaTQ/y+Dv4tarI4EEP5m4P3gka7QVekhbSLQZJAdNDrt0QlOgmyvDLin4tQho # ot/jXYTnbPZBfyZyecFnY/6Uszr5dcrI1bXdEYhiy3LZUWkzM2xNq9BJ6Y2495Ad # ryqZ09UzVK8Rn6KaXTXx926eFWxFVN2VOolmLJ50D8MQfwrmMAsHtHl+qoa6T6Ta # ezgnuHwONjNYAgGQgVz483/nKu4TvQ6q9bATYrZIumBITXLgVqS7GRFZ9Q17Y+V4 # UHlIJ/Ay32KkMAKD+cNj01s7g6nK3YS2tP7tt16IOQHhVmsNvGE= # =Rq7l # -----END PGP SIGNATURE----- # gpg: Signature made Tue 05 Aug 2025 13:30:51 EDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4...@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'hw-misc-20250805' of https://github.com/philmd/qemu: hw/i386/microvm: Explicitly select ACPI_PCI target/i386/cpu: Move addressable ID encoding out of compat property in CPUID[0x1] tests/functional: Test SD cards in SPI mode (using sifive_u machine) hw/sd/sdcard: Remove SDState::mode field hw/sd/sdcard: Disable checking STBY mode in SPI SEND_CSD/CID hw/sd/sdcard: Factor spi_cmd_SEND_CxD() out hw/sd/sdcard: Allow using SWITCH_FUNCTION in more SPI states hw/sd/sdcard: Use complete SEND_OP_COND implementation in SPI mode hw/sd/sdcard: Implement SPI R2 return value hw/sd/sdcard: Fill SPI response bits in card code hw/sd/sdbus: Provide buffer size to sdbus_do_command() hw/sd/sdcard: Factor sd_response_size() out hw/sd/sdcard: Do not ignore errors in sd_cmd_to_sendingdata() Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: e0006a86615baa70bc9d8b183e528aed91c1ac90 https://github.com/qemu/qemu/commit/e0006a86615baa70bc9d8b183e528aed91c1ac90 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2025-08-05 (Tue, 05 Aug 2025) Changed paths: M VERSION Log Message: ----------- Update version for the v10.1.0-rc2 release Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Compare: https://github.com/qemu/qemu/compare/8ee899e9b1a0...e0006a86615b To unsubscribe from these emails, change your notification settings at https://github.com/qemu/qemu/settings/notifications