]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
4 weeks agotarget/arm: Implement SVE2p1 WHILE (predicate pair)
Richard Henderson [Fri, 4 Jul 2025 14:20:41 +0000 (08:20 -0600)] 
target/arm: Implement SVE2p1 WHILE (predicate pair)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-79-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Enable PSEL for SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:20:40 +0000 (08:20 -0600)] 
target/arm: Enable PSEL for SVE2p1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-78-richard.henderson@linaro.org
This instruction is present in both SME(1) and SVE2.1 extensions.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Split trans_WHILE to lt and gt
Richard Henderson [Fri, 4 Jul 2025 14:20:39 +0000 (08:20 -0600)] 
target/arm: Split trans_WHILE to lt and gt

Use TRANS_FEAT to select the correct predicate.
Pass the helper and a boolean to do_WHILE.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-77-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Move scale by esz into helper_sve_while*
Richard Henderson [Fri, 4 Jul 2025 14:20:38 +0000 (08:20 -0600)] 
target/arm: Move scale by esz into helper_sve_while*

Change the API to pass element count rather than bit count.
This will be helpful later for predicate as counter.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-76-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Split out do_whileg from helper_sve_whileg
Richard Henderson [Fri, 4 Jul 2025 14:20:37 +0000 (08:20 -0600)] 
target/arm: Split out do_whileg from helper_sve_whileg

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-75-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Split out do_whilel from helper_sve_whilel
Richard Henderson [Fri, 4 Jul 2025 14:20:36 +0000 (08:20 -0600)] 
target/arm: Split out do_whilel from helper_sve_whilel

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-74-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Expand do_zero inline
Richard Henderson [Fri, 4 Jul 2025 14:20:35 +0000 (08:20 -0600)] 
target/arm: Expand do_zero inline

Expand to memset plus the return value, when used.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-73-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fold predtest_ones into helper_sve_brkns
Richard Henderson [Fri, 4 Jul 2025 14:20:34 +0000 (08:20 -0600)] 
target/arm: Fold predtest_ones into helper_sve_brkns

Merge predtest_ones into its only caller.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-72-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Introduce pred_count_test
Richard Henderson [Fri, 4 Jul 2025 14:20:33 +0000 (08:20 -0600)] 
target/arm: Introduce pred_count_test

For WHILE, we have the count of enabled predicates, so we don't
need to search to compute the PredTest result.  Reuse the logic
that will shortly be required for counted predicates.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-71-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2p1 Multiple Zero
Richard Henderson [Fri, 4 Jul 2025 14:20:32 +0000 (08:20 -0600)] 
target/arm: Implement SME2p1 Multiple Zero

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-70-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement FCLAMP for SME2, SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:20:31 +0000 (08:20 -0600)] 
target/arm: Implement FCLAMP for SME2, SVE2p1

This is the single vector version within SVE decode space.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-69-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Enable SCLAMP, UCLAMP for SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:20:30 +0000 (08:20 -0600)] 
target/arm: Enable SCLAMP, UCLAMP for SVE2p1

These instructions are present in both SME(1) and SVE2.1 extensions.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-68-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FCLAMP, SCLAMP, UCLAMP
Richard Henderson [Fri, 4 Jul 2025 14:20:29 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FCLAMP, SCLAMP, UCLAMP

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-67-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ZIP, UZP (two registers)
Richard Henderson [Fri, 4 Jul 2025 14:20:28 +0000 (08:20 -0600)] 
target/arm: Implement SME2 ZIP, UZP (two registers)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-66-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SQRSHR, UQRSHR, SQRSHRN
Richard Henderson [Fri, 4 Jul 2025 14:20:27 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SQRSHR, UQRSHR, SQRSHRN

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-65-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Move do_urshr, do_srshr to vec_internal.h
Richard Henderson [Fri, 4 Jul 2025 14:20:26 +0000 (08:20 -0600)] 
target/arm: Move do_urshr, do_srshr to vec_internal.h

Unify two copies of these inline functions.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-64-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ZIP, UZP (four registers)
Richard Henderson [Fri, 4 Jul 2025 14:20:25 +0000 (08:20 -0600)] 
target/arm: Implement SME2 ZIP, UZP (four registers)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-63-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SUNPK, UUNPK
Richard Henderson [Fri, 4 Jul 2025 14:20:24 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SUNPK, UUNPK

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-62-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SQCVTN, UQCVTN, SQCVTUN for SME2/SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:20:23 +0000 (08:20 -0600)] 
target/arm: Implement SQCVTN, UQCVTN, SQCVTUN for SME2/SVE2p1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-61-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SQCVT, UQCVT, SQCVTU
Richard Henderson [Fri, 4 Jul 2025 14:20:22 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SQCVT, UQCVT, SQCVTU

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-60-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Use do_[us]sat_[bhs] in sve_helper.c
Richard Henderson [Fri, 4 Jul 2025 14:20:21 +0000 (08:20 -0600)] 
target/arm: Use do_[us]sat_[bhs] in sve_helper.c

Replace and remove do_sat_bhs.
This avoids multiple repetitions of INT*_MIN/MAX.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-59-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Introduce do_[us]sat_[bhs] macros
Richard Henderson [Fri, 4 Jul 2025 14:20:20 +0000 (08:20 -0600)] 
target/arm: Introduce do_[us]sat_[bhs] macros

Inputs are a wider type of indeterminate sign.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-58-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FRINTN, FRINTP, FRINTM, FRINTA
Richard Henderson [Fri, 4 Jul 2025 14:20:19 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FRINTN, FRINTP, FRINTM, FRINTA

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-57-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SCVTF, UCVTF
Richard Henderson [Fri, 4 Jul 2025 14:20:18 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SCVTF, UCVTF

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-56-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FCVTZS, FCVTZU
Richard Henderson [Fri, 4 Jul 2025 14:20:17 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FCVTZS, FCVTZU

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-55-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FCVT (widening), FCVTL
Richard Henderson [Fri, 4 Jul 2025 14:20:16 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FCVT (widening), FCVTL

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-54-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 BFCVT, BFCVTN, FCVT, FCVTN
Richard Henderson [Fri, 4 Jul 2025 14:20:15 +0000 (08:20 -0600)] 
target/arm: Implement SME2 BFCVT, BFCVTN, FCVT, FCVTN

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-53-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ADD/SUB (array accumulator)
Richard Henderson [Fri, 4 Jul 2025 14:20:14 +0000 (08:20 -0600)] 
target/arm: Implement SME2 ADD/SUB (array accumulator)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-52-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FADD, FSUB, BFADD, BFSUB
Richard Henderson [Fri, 4 Jul 2025 14:20:13 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FADD, FSUB, BFADD, BFSUB

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-51-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 BFMLA, BFMLS
Richard Henderson [Fri, 4 Jul 2025 14:20:12 +0000 (08:20 -0600)] 
target/arm: Implement SME2 BFMLA, BFMLS

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-50-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FMLA, FMLS
Richard Henderson [Fri, 4 Jul 2025 14:20:11 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FMLA, FMLS

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-49-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Rename gvec_fml[as]_[hs] with _nf_ infix
Richard Henderson [Fri, 4 Jul 2025 14:20:10 +0000 (08:20 -0600)] 
target/arm: Rename gvec_fml[as]_[hs] with _nf_ infix

Emphasize the non-fused nature of these multiply-add.
Matches other helpers such as gvec_rsqrts_nf_[hs].

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-48-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SMLAL, SMLSL, UMLAL, UMLSL
Richard Henderson [Fri, 4 Jul 2025 14:20:09 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SMLAL, SMLSL, UMLAL, UMLSL

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-47-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SVDOT, UVDOT, SUVDOT, USVDOT
Richard Henderson [Fri, 4 Jul 2025 14:20:08 +0000 (08:20 -0600)] 
target/arm: Implement SME2 SVDOT, UVDOT, SUVDOT, USVDOT

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-46-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SDOT, UDOT (2-way) for SME2/SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:20:07 +0000 (08:20 -0600)] 
target/arm: Implement SDOT, UDOT (2-way) for SME2/SVE2p1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-45-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Tighten USDOT (vectors) decode
Richard Henderson [Fri, 4 Jul 2025 14:20:06 +0000 (08:20 -0600)] 
target/arm: Tighten USDOT (vectors) decode

Rename to USDOT_zzzz_4s and force size=2 during decode.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-44-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Rename SVE SDOT and UDOT patterns
Richard Henderson [Fri, 4 Jul 2025 14:20:05 +0000 (08:20 -0600)] 
target/arm: Rename SVE SDOT and UDOT patterns

Emphasize the 4-way nature of these dot products.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-43-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implemement SME2 SDOT, UDOT, USDOT, SUDOT
Richard Henderson [Fri, 4 Jul 2025 14:20:04 +0000 (08:20 -0600)] 
target/arm: Implemement SME2 SDOT, UDOT, USDOT, SUDOT

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-42-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Rename helper_gvec_*dot_[bh] to *_4[bh]
Richard Henderson [Fri, 4 Jul 2025 14:20:03 +0000 (08:20 -0600)] 
target/arm: Rename helper_gvec_*dot_[bh] to *_4[bh]

Emphasize that these are 4-way dot products.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-41-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FVDOT, BFVDOT
Richard Henderson [Fri, 4 Jul 2025 14:20:02 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FVDOT, BFVDOT

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-40-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 BFDOT
Richard Henderson [Fri, 4 Jul 2025 14:20:01 +0000 (08:20 -0600)] 
target/arm: Implement SME2 BFDOT

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-39-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FDOT
Richard Henderson [Fri, 4 Jul 2025 14:20:00 +0000 (08:20 -0600)] 
target/arm: Implement SME2 FDOT

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-38-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 FMLAL, BFMLAL
Richard Henderson [Fri, 4 Jul 2025 14:19:59 +0000 (08:19 -0600)] 
target/arm: Implement SME2 FMLAL, BFMLAL

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-37-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Add helper_gvec{_ah}_bfmlsl{_nx}
Richard Henderson [Fri, 4 Jul 2025 14:19:58 +0000 (08:19 -0600)] 
target/arm: Add helper_gvec{_ah}_bfmlsl{_nx}

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-36-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Pass ZA to helper_sve2_fmlal_zz[zx]w_s
Richard Henderson [Fri, 4 Jul 2025 14:19:57 +0000 (08:19 -0600)] 
target/arm: Pass ZA to helper_sve2_fmlal_zz[zx]w_s

Indicate whether to use FPST_FPCR or FPST_ZA via bit 2 of
simd_data(desc).  For SVE, this bit remains zero.
For do_FMLAL_zzzw, this requires no change.
For do_FMLAL_zzxw, move the index up one bit.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-35-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ADD/SUB (array results, multiple vectors)
Richard Henderson [Fri, 4 Jul 2025 14:19:56 +0000 (08:19 -0600)] 
target/arm: Implement SME2 ADD/SUB (array results, multiple vectors)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-34-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ADD/SUB (array results, multiple and single vector)
Richard Henderson [Fri, 4 Jul 2025 14:19:55 +0000 (08:19 -0600)] 
target/arm: Implement SME2 ADD/SUB (array results, multiple and single vector)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-33-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 Multiple Vectors SVE Destructive
Richard Henderson [Fri, 4 Jul 2025 14:19:54 +0000 (08:19 -0600)] 
target/arm: Implement SME2 Multiple Vectors SVE Destructive

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-32-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 Multiple and Single SVE Destructive
Richard Henderson [Fri, 4 Jul 2025 14:19:53 +0000 (08:19 -0600)] 
target/arm: Implement SME2 Multiple and Single SVE Destructive

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-31-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Introduce gen_gvec_sve2_sqdmulh
Richard Henderson [Fri, 4 Jul 2025 14:19:52 +0000 (08:19 -0600)] 
target/arm: Introduce gen_gvec_sve2_sqdmulh

To be used by both SVE2 and SME2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-30-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 SMOPS, UMOPS (2-way)
Richard Henderson [Fri, 4 Jul 2025 14:19:51 +0000 (08:19 -0600)] 
target/arm: Implement SME2 SMOPS, UMOPS (2-way)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-29-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 BMOPA
Richard Henderson [Fri, 4 Jul 2025 14:19:50 +0000 (08:19 -0600)] 
target/arm: Implement SME2 BMOPA

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-28-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 MOVA to/from array, multiple registers
Richard Henderson [Fri, 4 Jul 2025 14:19:49 +0000 (08:19 -0600)] 
target/arm: Implement SME2 MOVA to/from array, multiple registers

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-27-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 MOVA to/from tile, multiple registers
Richard Henderson [Fri, 4 Jul 2025 14:19:48 +0000 (08:19 -0600)] 
target/arm: Implement SME2 MOVA to/from tile, multiple registers

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-26-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Introduce ARMCPU.sme_max_vq
Richard Henderson [Fri, 4 Jul 2025 14:19:47 +0000 (08:19 -0600)] 
target/arm: Introduce ARMCPU.sme_max_vq

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-25-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Split out get_zarray
Richard Henderson [Fri, 4 Jul 2025 14:19:46 +0000 (08:19 -0600)] 
target/arm: Split out get_zarray

Prepare for MOVA array to/from vector with multiple registers
by adding a div_len parameter, herein always 1, and a vec_mod
parameter, herein always 0.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-24-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Rename MOVA for translate
Richard Henderson [Fri, 4 Jul 2025 14:19:45 +0000 (08:19 -0600)] 
target/arm: Rename MOVA for translate

Prepare for more kinds of MOVA from SME2 by renaming the
existing SME1 MOVA to indicate tile to/from vector.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-23-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Split get_tile_rowcol argument tile_index
Richard Henderson [Fri, 4 Jul 2025 14:19:44 +0000 (08:19 -0600)] 
target/arm: Split get_tile_rowcol argument tile_index

Decode tile number and index offset beforehand and separately.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-22-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 MOVT
Richard Henderson [Fri, 4 Jul 2025 14:19:43 +0000 (08:19 -0600)] 
target/arm: Implement SME2 MOVT

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-21-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 LDR/STR ZT0
Richard Henderson [Fri, 4 Jul 2025 14:19:42 +0000 (08:19 -0600)] 
target/arm: Implement SME2 LDR/STR ZT0

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-20-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Add alignment argument to gen_sve_{ldr, str}
Richard Henderson [Fri, 4 Jul 2025 14:19:41 +0000 (08:19 -0600)] 
target/arm: Add alignment argument to gen_sve_{ldr, str}

Honor AlignmentEnforced() for LDR/STR (vector),
(predicate), and (array vector).

Within the expansion functions, clear @align when we're
done emitting loads at the largest size.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-19-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Implement SME2 ZERO ZT0
Richard Henderson [Fri, 4 Jul 2025 14:19:40 +0000 (08:19 -0600)] 
target/arm: Implement SME2 ZERO ZT0

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-18-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Add zt0_excp_el to DisasContext
Richard Henderson [Fri, 4 Jul 2025 14:19:39 +0000 (08:19 -0600)] 
target/arm: Add zt0_excp_el to DisasContext

Pipe the value through from SMCR_ELx through hflags and into
the disassembly context.  Enable EZT0 in smcr_write.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Add ZT0
Richard Henderson [Fri, 4 Jul 2025 14:19:38 +0000 (08:19 -0600)] 
target/arm: Add ZT0

This is a 512-bit array introduced with SME2.
Save it only when ZA is in use.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-16-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Add isar feature tests for SME2p1, SVE2p1
Richard Henderson [Fri, 4 Jul 2025 14:19:37 +0000 (08:19 -0600)] 
target/arm: Add isar feature tests for SME2p1, SVE2p1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-15-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Rename zarray to za_state.za
Richard Henderson [Fri, 4 Jul 2025 14:19:36 +0000 (08:19 -0600)] 
target/arm: Rename zarray to za_state.za

The whole ZA state will also contain ZT0.
Make things easier in aarch64_set_svcr to zero both
by wrapping them in a common structure.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Use FPST_ZA for sme_fmopa_[hsd]
Richard Henderson [Fri, 4 Jul 2025 14:19:35 +0000 (08:19 -0600)] 
target/arm: Use FPST_ZA for sme_fmopa_[hsd]

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Introduce FPST_ZA, FPST_ZA_F16
Richard Henderson [Fri, 4 Jul 2025 14:19:34 +0000 (08:19 -0600)] 
target/arm: Introduce FPST_ZA, FPST_ZA_F16

Rather than repeatedly copying FPST_FPCR to locals
and setting default nan mode, create dedicated float_status.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Remove CPUARMState.vfp.scratch
Richard Henderson [Fri, 4 Jul 2025 14:19:33 +0000 (08:19 -0600)] 
target/arm: Remove CPUARMState.vfp.scratch

The last use of this field was removed in b2fc7be972b9.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix bfdotadd_ebf vs nan selection
Richard Henderson [Fri, 4 Jul 2025 14:19:32 +0000 (08:19 -0600)] 
target/arm: Fix bfdotadd_ebf vs nan selection

Implement FPProcessNaNs4 within bfdotadd_ebf, rather than
simply letting NaNs propagate through the function.

Cc: qemu-stable@nongnu.org
Fixes: 0e1850182a1 ("target/arm: Implement FPCR.EBF=1 semantics for bfdotadd()")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250704142112.1018902-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix f16_dotadd vs nan selection
Richard Henderson [Fri, 4 Jul 2025 14:19:31 +0000 (08:19 -0600)] 
target/arm: Fix f16_dotadd vs nan selection

Implement FPProcessNaNs4 within f16_dotadd, rather than
simply letting NaNs propagate through the function.

Cc: qemu-stable@nongnu.org
Fixes: 3916841ac75 ("target/arm: Implement FMOPA, FMOPS (widening)")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix PSEL size operands to tcg_gen_gvec_ands
Richard Henderson [Fri, 4 Jul 2025 14:19:30 +0000 (08:19 -0600)] 
target/arm: Fix PSEL size operands to tcg_gen_gvec_ands

Gvec only operates on size 8 and multiples of 16.
Predicates may be any multiple of 2.
Round up the size using the appropriate function.

Cc: qemu-stable@nongnu.org
Fixes: 598ab0b24c0 ("target/arm: Implement PSEL")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Disable FEAT_F64MM if maximum SVE vector size too small
Richard Henderson [Fri, 4 Jul 2025 14:19:29 +0000 (08:19 -0600)] 
target/arm: Disable FEAT_F64MM if maximum SVE vector size too small

All F64MM instructions operate on a 256-bit vector.
If only 128-bit vectors is supported by the cpu,
then the cpu cannot enable F64MM.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix FMMLA (64-bit element) for 128-bit VL
Richard Henderson [Fri, 4 Jul 2025 14:19:28 +0000 (08:19 -0600)] 
target/arm: Fix FMMLA (64-bit element) for 128-bit VL

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Replace @rda_rn_rm_e0 in sve.decode
Richard Henderson [Fri, 4 Jul 2025 14:19:27 +0000 (08:19 -0600)] 
target/arm: Replace @rda_rn_rm_e0 in sve.decode

Replace @rda_rn_rm_e0 with @rda_rn_rm_ex, and require
users to supply an explicit esz.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix 128-bit element ZIP, UZP, TRN
Richard Henderson [Fri, 4 Jul 2025 14:19:26 +0000 (08:19 -0600)] 
target/arm: Fix 128-bit element ZIP, UZP, TRN

We missed the instructions UDEF when the vector size is too small.
We missed marking the instructions non-streaming with SME.

Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix sve_access_check for SME
Richard Henderson [Fri, 4 Jul 2025 14:19:25 +0000 (08:19 -0600)] 
target/arm: Fix sve_access_check for SME

Do not assume SME implies SVE.  Ensure that the non-streaming
check is present along the SME path, since it is not implied
by sme_*_enabled_check.

Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix SME vs AdvSIMD exception priority
Richard Henderson [Fri, 4 Jul 2025 14:19:24 +0000 (08:19 -0600)] 
target/arm: Fix SME vs AdvSIMD exception priority

We failed to raise an exception when
sme_excp_el == 0 and fp_excp_el == 1.

Cc: qemu-stable@nongnu.org
Fixes: 3d74825f4d6 ("target/arm: Add SME enablement checks")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VST2 helper store alignment checks
William Kosasih [Thu, 3 Jul 2025 08:56:04 +0000 (18:26 +0930)] 
target/arm: Fix VST2 helper store alignment checks

This patch adds alignment checks in the store operations in the VST2
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-12-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VST4 helper store alignment checks
William Kosasih [Thu, 3 Jul 2025 08:56:03 +0000 (18:26 +0930)] 
target/arm: Fix VST4 helper store alignment checks

This patch adds alignment checks in the store operations in the VST4
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-11-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VLD2 helper load alignment checks
William Kosasih [Thu, 3 Jul 2025 08:56:02 +0000 (18:26 +0930)] 
target/arm: Fix VLD2 helper load alignment checks

This patch adds alignment checks in the load operations in the VLD2
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-10-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VLD4 helper load alignment checks
William Kosasih [Thu, 3 Jul 2025 08:56:01 +0000 (18:26 +0930)] 
target/arm: Fix VLD4 helper load alignment checks

This patch adds alignment checks in the load operations in the VLD4
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-9-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VSTR_SG helper store alignment checks
William Kosasih [Thu, 3 Jul 2025 08:56:00 +0000 (18:26 +0930)] 
target/arm: Fix VSTR_SG helper store alignment checks

This patch adds alignment checks in the store operations in the VSTR_SG
instructions.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-8-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VLDR_SG helper load alignment checks
William Kosasih [Thu, 3 Jul 2025 08:55:59 +0000 (18:25 +0930)] 
target/arm: Fix VLDR_SG helper load alignment checks

This patch adds alignment checks in the load operations in the VLDR_SG
instructions.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-7-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VSTR helper store alignment checks
William Kosasih [Thu, 3 Jul 2025 08:55:58 +0000 (18:25 +0930)] 
target/arm: Fix VSTR helper store alignment checks

This patch adds alignment checks in the store operations in the VSTR
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-6-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix VLDR helper load alignment checks
William Kosasih [Thu, 3 Jul 2025 08:55:57 +0000 (18:25 +0930)] 
target/arm: Fix VLDR helper load alignment checks

This patch adds alignment checks in the load operations in the VLDR
instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-5-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix function_return helper load alignment checks
William Kosasih [Thu, 3 Jul 2025 08:55:56 +0000 (18:25 +0930)] 
target/arm: Fix function_return helper load alignment checks

This patch adds alignment checks in the load operations (when unstacking the
return pc and psr) in the FunctionReturn pseudocode.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-4-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Fix BLXNS helper store alignment checks
William Kosasih [Thu, 3 Jul 2025 08:55:55 +0000 (18:25 +0930)] 
target/arm: Fix BLXNS helper store alignment checks

This patch adds alignment checks in the store operations (when stacking the
return pc and psr) in the BLXNS instruction.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-3-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agotarget/arm: Bring VLSTM/VLLDM helper store/load closer to the ARM pseudocode
William Kosasih [Thu, 3 Jul 2025 08:55:54 +0000 (18:25 +0930)] 
target/arm: Bring VLSTM/VLLDM helper store/load closer to the ARM pseudocode

This patch brings the VLSTM and VLLDM helper functions closer to the ARM
pseudocode by adding MO_ALIGN to the MemOpIdx of the associated store
(`cpu_stl_mmu`) operations and load (`cpu_ldl_mmu`) operations.

Note that this is not a bug fix: an 8-byte alignment check already exists
and remains in place, enforcing stricter alignment than the 4 bytes
requirement in the individual loads and stores. This change merely makes the
helper implementations closer to the ARM pseudocode.

That said, as a side effect, the MMU index is now resolved once instead of
on every `cpu_*_data_ra` call, reducing redundant lookups

Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250703085604.154449-2-kosasihwilliam4@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agohw/arm/highbank: Mark the "highbank" and the "midway" machine as deprecated
Thomas Huth [Wed, 2 Jul 2025 11:30:51 +0000 (13:30 +0200)] 
hw/arm/highbank: Mark the "highbank" and the "midway" machine as deprecated

We don't have any automatic regression tests for these machines and
when asking the usual suspects on the mailing list we came to the
conclusion that nobody tests these machines manually, too, so it seems
like this is currently just completely unused code. Mark them as depre-
cated to see whether anybody still speaks up during the deprecation
period, otherwise we can likely remove these two machines in a couple
of releases.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 20250702113051.46483-1-thuth@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: tweaked deprecation.rst text]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 weeks agoMerge tag 'pull-request-2025-07-02' of https://gitlab.com/thuth/qemu into staging
Stefan Hajnoczi [Thu, 3 Jul 2025 10:01:41 +0000 (06:01 -0400)] 
Merge tag 'pull-request-2025-07-02' of https://gitlab.com/thuth/qemu into staging

* Fix file names of renamed files in comments and MAINTAINERS
* Fix the "deprecated props" in QOM on s390x
* Fix URL of the aarch64_sbsaref_freebsd functional test
* Fix some trouble with trible

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmhlZckRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbVIZhAAltzQ9+lZYa0A5NcgbFlVSmL/E6qDIMXG
# AJcNul3dgrIVcCrxN17dBmU4ftemjQCpcw7I4fL0G0CrAMdB9Yp991tis1SwycNX
# HEDY8THEE7EiOEKxBHtUFo8JbsnT+lcCwNnpvu6RXwnTN4TjT386OwBSeKv4mhHt
# LFoUnX5yZqJQD1bzcrUeo+OBoXrnMkeJRuOTFXval1AGBT4q0G5mMtAcj93gONNe
# hKdXhYst4XYLZIe2TJAdsbKs5Ics5UZ9rkSIC8tw1drt+iueSSSHNoPsg2AP8Ueg
# iqElX3tzzb/P7QF/LWIfu55WLMbP2C2l6Pb37sdZf8Y1QpRaA/6fxQrNRoVLYfdP
# 2Gqtxd8Ynn74LUxOpW+gi90mmrZpIL+M06Al0bzpI+KmWOaZxpBd0E3r5BIO1Ghb
# /7XIn9svlVpBXd5V3M7Myg1BKAlJJ6GtuMMDBv8Yym6bTD+bdjGk28k/uvt6BSpq
# qiMVjKrmmAO4zBkj3OZUKYoqkktf6mjso0xjXxkI2GTQ44dgvXXluwHF8F5LzBPz
# y2X+KGhf/vfXqP7cAGpmFH3SjDqngdqvuBT/pDO/VWRUhyz8lM6DyPsdVhS7KrXl
# QByt4FkCzYS+o9kc2Hlobj+ujjEPG+1ffSDDweioYYygsZny+8GBgD5D31e5cPsP
# 9/Uc75aJD88=
# =SEr8
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 02 Jul 2025 13:00:57 EDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2025-07-02' of https://gitlab.com/thuth/qemu:
  tests/functional/test_aarch64_sbsaref_freebsd: Fix the URL of the ISO image
  target/s390x: A fix for the trouble with tribles
  target/s390x: set has_deprecated_props flag
  MAINTAINERS: fix paths for relocated files
  treewide: fix paths for relocated files in comments
  treewide: update docs file extensions (.txt -> .rst) in comments
  MAINTAINERS: fix VMware filename typo (vwm -> vmw)
  MAINTAINERS: fix vendor capitalization (Vmware -> VMware)
  MAINTAINERS: update docs file extensions (.txt -> .rst)

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 weeks agoMerge tag 'pull-10.1-maintainer-june-2025-020725-1' of https://gitlab.com/stsquad...
Stefan Hajnoczi [Thu, 3 Jul 2025 09:58:56 +0000 (05:58 -0400)] 
Merge tag 'pull-10.1-maintainer-june-2025-020725-1' of https://gitlab.com/stsquad/qemu into staging

Maintainer updates for June (gitlab, semihosting, plugins, virtio-gpu)

 - mark s390x runner system tests as allow_fail
 - build semihosting once
 - add register write support to plugins
 - add virtual memory write support to plugins
 - add harder memory read/write support to plugins
 - add patcher plugin and tests
 - re-stock virtio-gpu MAINTAINERS
 - fix context init for Venus fences

* tag 'pull-10.1-maintainer-june-2025-020725-1' of https://gitlab.com/stsquad/qemu:
  virtio-gpu: support context init multiple timeline
  MAINTAINERS: add Akihiko and Dmitry as reviewers
  MAINTAINERS: add myself to virtio-gpu for Odd Fixes
  plugins: Update plugin version and add notes
  plugins: Add patcher plugin and test
  tests/tcg: Remove copy-pasted notes and from i386 and add x86_64 system tests to tests
  plugins: Add memory hardware address read/write API
  plugins: Add memory virtual address write API
  plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks
  plugins: Add register write API
  gdbstub: Expose gdb_write_register function to consumers of gdbstub
  semihosting/uaccess: Compile once
  semihosting/uaccess: Remove uses of target_ulong type
  tests/functional: Add PCI hotplug test for aarch64
  gitlab: mark s390x-system to allow failures

Conflicts:
  tests/functional/meson.build

  Context conflict with commit 7bc86ccbb59f ("tests/functional: test
  device passthrough on aarch64"), keep both changes to
  tests_aarch64_system_thorough[].

4 weeks agotests/functional/test_aarch64_sbsaref_freebsd: Fix the URL of the ISO image
Thomas Huth [Tue, 1 Jul 2025 10:58:09 +0000 (12:58 +0200)] 
tests/functional/test_aarch64_sbsaref_freebsd: Fix the URL of the ISO image

The original image has been removed from the server, so the test
currently fails if it has to fetch the asset, but we can still
download the ISO from the archive server. While we're at it, prefer
the XZ compressed image, it's much smaller and thus the download
should be faster.

Message-ID: <20250701105809.366180-1-thuth@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agotarget/s390x: A fix for the trouble with tribles
Thomas Huth [Tue, 1 Jul 2025 19:42:41 +0000 (21:42 +0200)] 
target/s390x: A fix for the trouble with tribles

While Tribbles are cute, it should be "triple store" here,
not "trible store".

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250701194241.434183-1-thuth@redhat.com>

4 weeks agotarget/s390x: set has_deprecated_props flag
Collin Walling [Mon, 30 Jun 2025 02:44:04 +0000 (22:44 -0400)] 
target/s390x: set has_deprecated_props flag

Now that the deprecated_props is an optional field, the expansion method
must now set the "has_deprecated_props" flag in order for the data to be
output from the response.

Fixes: 448553bb7c (qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic)
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250630024404.940882-1-walling@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agoMAINTAINERS: fix paths for relocated files
Sean Wei [Tue, 1 Jul 2025 18:06:32 +0000 (14:06 -0400)] 
MAINTAINERS: fix paths for relocated files

Several files were renamed in previous commits, causing their entries
in MAINTAINERS to reference outdated paths.
This prevents scripts/get_maintainer.pl from correctly matching
these files to their maintainers.

Update the filenames to reflect their current locations so that
maintainer lookup works properly.

Related commits
---------------

  c45460decbd (Oct 2023)
    hw/input/stellaris_input: Rename to stellaris_gamepad
    Rename  include/hw/input/{gamepad.h => stellaris_gamepad.h}

  4faf359accb (Nov 2020)
    docs: Move virtio-net-failover.rst into the system manual
    Rename  docs/{ => system}/virtio-net-failover.rst

  89857312f32 (Apr 2024)
    hw/usb: move stubs out of stubs/
    Rename  stubs/usb-dev-stub.c => hw/usb/bus-stub.c

  f2604d8508a (Apr 2024)
    hw/virtio: move stubs out of stubs/
    Rename  stubs/virtio-md-pci.c => hw/virtio/virtio-md-stubs.c

  2c888febdfa (Apr 2024)
    memory-device: move stubs out of stubs/
    Rename  stubs/memory_device.c => hw/mem/memory-device-stubs.c

  d481cec7565 (Oct 2024)
    migration: Move cpu-throttle.c from system to migration
    Rename  {system => migration}/cpu-throttle.c

  864a3fa4392 (Jan 2023)
    monitor: Rename misc.c to hmp-target.c
    Rename  monitor/{misc.c => hmp-target.c}

Signed-off-by: Sean Wei <me@sean.taipei>
Message-ID: <374597a7-94e4-45b2-9617-35183db3ea9d@sean.taipei>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agotreewide: fix paths for relocated files in comments
Sean Wei [Mon, 16 Jun 2025 15:51:30 +0000 (11:51 -0400)] 
treewide: fix paths for relocated files in comments

After the docs directory restructuring, several comments
refer to paths that no longer exist.

Replace these references to the current file locations
so readers can find the correct files.

Related commits
---------------

  189c099f75f (Jul 2021)
    docs: collect the disparate device emulation docs into one section
    Rename  docs/system/{ => devices}/nvme.rst

  5f4c96b779f (Feb 2023)
    docs/system/loongarch: update loongson3.rst and rename it to virt.rst
    Rename  docs/system/loongarch/{loongson3.rst => virt.rst}

  fe0007f3c1d (Sep 2023)
    exec: Rename cpu.c -> cpu-target.c
    Rename  cpus-common.c => cpu-common.c

  42fa9665e59 (Apr 2025)
    exec: Restrict 'cpu_ldst.h' to accel/tcg/
    Rename  include/{exec/cpu_ldst.h => accel/tcg/cpu-ldst.h}

Signed-off-by: Sean Wei <me@sean.taipei>
Message-ID: <20250616.qemu.relocated.06@sean.taipei>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agotreewide: update docs file extensions (.txt -> .rst) in comments
Sean Wei [Mon, 16 Jun 2025 15:50:50 +0000 (11:50 -0400)] 
treewide: update docs file extensions (.txt -> .rst) in comments

Several source comments still refer to docs with the old .txt
extension that were previously converted to reStructuredText.

Update these references to use the correct .rst extensions to
maintain accurate in-tree documentation pointers.

No functional changes.

Related commits:
  50f8174c5c1 (Jul 2021): docs/specs/acpi_nvdimm: Convert to rST
  f054eb1c920 (Jul 2021): docs/specs/acpi_pci_hotplug: Convert to rST
  912fb3678b8 (Sep 2023): docs/specs/vmgenid: Convert to rST
  bb1cff6ee04 (Sep 2023): docs/specs/ivshmem-spec: Convert to rST
  55ff468f781 (Jan 2022): docs: Rename ppc-spapr-hotplug.txt to .rst

Signed-off-by: Sean Wei <me@sean.taipei>
Message-ID: <20250616.qemu.relocated.05@sean.taipei>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agoMAINTAINERS: fix VMware filename typo (vwm -> vmw)
Sean Wei [Mon, 16 Jun 2025 15:50:10 +0000 (11:50 -0400)] 
MAINTAINERS: fix VMware filename typo (vwm -> vmw)

The entry for the VMware PVSCSI spec uses "vwm" instead of "vmw",
which does not match any file in the tree.

Correct the path so scripts/get_maintainer.pl can match the file.

Signed-off-by: Sean Wei <me@sean.taipei>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250616.qemu.relocated.04@sean.taipei>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 weeks agoMAINTAINERS: fix vendor capitalization (Vmware -> VMware)
Sean Wei [Mon, 16 Jun 2025 15:49:30 +0000 (11:49 -0400)] 
MAINTAINERS: fix vendor capitalization (Vmware -> VMware)

"VMware" is the vendor's official spelling.
Adjust the spelling in MAINTAINERS for consistency.

Signed-off-by: Sean Wei <me@sean.taipei>
Message-ID: <20250616.qemu.relocated.03@sean.taipei>
Signed-off-by: Thomas Huth <thuth@redhat.com>