]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue
authorSong Gao <gaosong@loongson.cn>
Wed, 24 Jul 2024 01:58:53 +0000 (09:58 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 26 Jul 2024 10:12:12 +0000 (13:12 +0300)
commit50675777a07395e2ee84e3f2e7c90cf6522ef966
tree12ea19a8e59c3043b83f024aac600821697fe8f3
parent9d0076b4a1a49a125ca9567cd4641d07b0447573
target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue

When the lddir level is 4 and the base is a HugePage, we may try to put value 4
into a field in the TLBENTRY that is only 2 bits wide.

Fixes: Coverity CID 1547717
Fixes: 9c70db9a43388 ("target/loongarch: Fix tlb huge page loading issue")
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240724015853.1317396-1-gaosong@loongson.cn>
(cherry picked from commit a18ffbcf8b9fabfc6c850ebb1d3e40a21b885c67)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/loongarch/tcg/tlb_helper.c