Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 96e7448c1f820c56caea8447c01f5227b0c95c79 https://github.com/qemu/qemu/commit/96e7448c1f820c56caea8447c01f5227b0c95c79 Author: WANG Rui <wang...@loongson.cn> Date: 2025-08-28 (Thu, 28 Aug 2025)
Changed paths: M target/loongarch/tcg/insn_trans/trans_atomic.c.inc M target/loongarch/tcg/insn_trans/trans_extra.c.inc M target/loongarch/tcg/insn_trans/trans_farith.c.inc M target/loongarch/tcg/insn_trans/trans_fcnv.c.inc M target/loongarch/tcg/insn_trans/trans_fmemory.c.inc M target/loongarch/tcg/insn_trans/trans_privileged.c.inc M target/loongarch/tcg/insn_trans/trans_shift.c.inc M target/loongarch/translate.h Log Message: ----------- target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro This patch replaces uses of the generic TRANS macro with TRANS64 for instructions that are only valid when 64-bit support is available. This improves correctness and avoids potential assertion failures or undefined behavior during translation on 32-bit-only configurations. Signed-off-by: WANG Rui <wang...@loongson.cn> Reviewed-by: Bibo Mao <maob...@loongson.cn> Reviewed-by: Song Gao <gaos...@loongson.cn> Signed-off-by: Song Gao <gaos...@loongson.cn> Commit: 86bca40402316891b8b9a920c2e3bf8cf37ba9a4 https://github.com/qemu/qemu/commit/86bca40402316891b8b9a920c2e3bf8cf37ba9a4 Author: Thomas Huth <th...@redhat.com> Date: 2025-08-28 (Thu, 28 Aug 2025) Changed paths: M hw/intc/loongarch_pch_pic.c Log Message: ----------- hw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue When booting the Linux kernel from tests/functional/test_loongarch64_virt.py with a QEMU that has been compiled with --enable-ubsan, there is a warning like this: .../hw/intc/loongarch_pch_pic.c:171:46: runtime error: index 512 out of bounds for type 'uint8_t[64]' (aka 'unsigned char[64]') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .../hw/intc/loongarch_pch_pic.c:171:46 .../hw/intc/loongarch_pch_pic.c:175:45: runtime error: index 256 out of bounds for type 'uint8_t[64]' (aka 'unsigned char[64]') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .../hw/intc/loongarch_pch_pic.c:175:45 It happens because "addr" is added first before substracting the base (PCH_PIC_HTMSI_VEC or PCH_PIC_ROUTE_ENTRY). Additionally, this code looks like it is not endianness safe, since it uses a 64-bit pointer to write values into an array of 8-bit values. Thus rework the code to use the stq_le_p / ldq_le_p helpers here and make sure that we do not create pointers with undefined behavior by accident. Signed-off-by: Thomas Huth <th...@redhat.com> Reviewed-by: Bibo Mao <maob...@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Tested-by: Song Gao <gaos...@loongson.cn> Signed-off-by: Song Gao <gaos...@loongson.cn> Commit: 59f504bb43366594e97cf496c9a9ccf59be00b73 https://github.com/qemu/qemu/commit/59f504bb43366594e97cf496c9a9ccf59be00b73 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2025-08-29 (Fri, 29 Aug 2025) Changed paths: M hw/intc/loongarch_pch_pic.c M target/loongarch/tcg/insn_trans/trans_atomic.c.inc M target/loongarch/tcg/insn_trans/trans_extra.c.inc M target/loongarch/tcg/insn_trans/trans_farith.c.inc M target/loongarch/tcg/insn_trans/trans_fcnv.c.inc M target/loongarch/tcg/insn_trans/trans_fmemory.c.inc M target/loongarch/tcg/insn_trans/trans_privileged.c.inc M target/loongarch/tcg/insn_trans/trans_shift.c.inc M target/loongarch/translate.h Log Message: ----------- Merge tag 'pull-loongarch-20250828' of https://github.com/gaosong715/qemu into staging pull-loongarch-20250828 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEIAB0WIQTKRzxE1qCcGJoZP81FK5aFKyaCFgUCaLBJawAKCRBFK5aFKyaC # FhiGBACdQ1hkGp79sFrwi0h6GaP4NdbG8jx0vNGwPOqvbIc6Frn4bSyATNZI76k+ # /B2KTGLe4fU95QeXCJ937N1mNqcbagxFVeCaqSS71wuSfVKZBWLvGi8CckCqWU57 # GeUCQTOgA+E94C93G0pdgtyi2r7ambPnqTNifghkdoSN52Ta1Q== # =pUq/ # -----END PGP SIGNATURE----- # gpg: Signature made Thu 28 Aug 2025 10:19:55 PM AEST # gpg: using RSA key CA473C44D6A09C189A193FCD452B96852B268216 # gpg: Good signature from "Song Gao <gaos...@loongson.cn>" [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: CA47 3C44 D6A0 9C18 9A19 3FCD 452B 9685 2B26 8216 * tag 'pull-loongarch-20250828' of https://github.com/gaosong715/qemu: hw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Compare: https://github.com/qemu/qemu/compare/ca18b336e12c...59f504bb4336 To unsubscribe from these emails, change your notification settings at https://github.com/qemu/qemu/settings/notifications