[PATCH v2 20/31] tests/functional: let cpio_extract accept filenames

2024-12-11 Thread Daniel P . Berrangé
Currently cpio_extract differs from tar_extract/zip_extract in that it only allows a file-like object as input. Adapt it to also support filenames. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/archive.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-)

[PATCH v2 19/31] tests/functional: add common deb_extract helper

2024-12-11 Thread Daniel P . Berrangé
This mirrors the existing archive_extract, cpio_extract and zip_extract helpers Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/archive.py | 13 + tests/functional/qemu_test/linuxkernel.py | 13 - 2 files changed, 17 insertions(+), 9 deletions(-) dif

[PATCH v2 13/31] tests/functional: switch over to using self.scratch_file()

2024-12-11 Thread Daniel P . Berrangé
Replace any instances of os.path.join(self.workdir, ".../...") self.workdir + "/.../..." with self.scratch_file("...", "...") which is more compact and portable Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/linuxkernel.py | 7 ++- tests/functional/qemu_test/tuxr

[PATCH v2 06/31] tests/functional: introduce some helpful decorators

2024-12-11 Thread Daniel P . Berrangé
Reduce repeated boilerplate with some helper decorators: @skipIfNotPlatform("x86_64", "aarch64") => Skip unless the build host platform matches @skipIfMissingCommands("mkisofs", "losetup") => Skips unless all listed commands are found in $PATH @skipIfMissingImports("numpy", "cv2") =>

[PATCH v3 40/69] target/arm: Convert CNT, NOT, RBIT (vector) to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 34 ++ target/arm/tcg/a64.decode | 4 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PATCH v2 02/31] tests/functional: resolve str(Asset) to cache file path

2024-12-11 Thread Daniel P . Berrangé
Allow an Asset object to be used in place of a filename but making its string representation resolve to the cache file path. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/asset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/qemu_test/asset.py b/tes

[PATCH v2 31/31] tests/functional: ignore errors when caching assets, except for 404

2024-12-11 Thread Daniel P . Berrangé
We see periodic errors caching assets due to a combination of transient networking and server problems. With the previous patch to skip running a test when it has missing assets, we can now treat most cache download errors as non-fatal. Only HTTP 404 is retained as fatal, since it is a strong indi

[PATCH v2 12/31] tests/functional: switch over to using self.data_file(...)

2024-12-11 Thread Daniel P . Berrangé
This removes direct path manipulation to figure out the source dir Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/test_acpi_bits.py | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/functional/test_acpi_bits.py b/

[PATCH v3 23/69] target/arm: Fix decode of fp16 vector fabs, fneg, fsqrt

2024-12-11 Thread Richard Henderson
These opcodes are only supported as vector operations, not as advsimd scalar. Set only_in_vector, and remove the unreachable implementation of scalar fneg. Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH v2 30/31] tests/functional: skip tests if assets are not available

2024-12-11 Thread Daniel P . Berrangé
If downloading of assets has been disabled, then skip running a test if the assets it has registered are not already downloaded. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/asset.py| 8 +++- tests/functional/qemu_test/testcase.py | 11 +++ 2 files changed, 1

[PATCH v2 21/31] tests/functional: add a generalized archive_extract

2024-12-11 Thread Daniel P . Berrangé
There are many types of archives that the tests deal with. Provide a generalized 'archive_extract' that can detect the format and delegate to the appropriate helper for extraction. This ensures that all archive extraction code follows the same design pattern. Signed-off-by: Daniel P. Berrangé ---

Re: [PATCH v3 42/69] target/arm: Introduce gen_gvec_rev{16,32,64}

2024-12-11 Thread Richard Henderson
On 12/11/24 11:19, Philippe Mathieu-Daudé wrote: On 11/12/24 17:30, Richard Henderson wrote: Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---   target/arm/tcg/translate.h  |  6 +++   target/arm/tcg/gengvec.c    | 58 ++   target/arm/tcg/translate-neon.

[PATCH v3 06/69] target/arm: Convert PACGA to decodetree

2024-12-11 Thread Richard Henderson
Remove disas_data_proc_2src, as this was the last insn decoded by that function. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 65 ++ target/arm/tcg/a64.decode | 2 ++ 2 files changed, 13 insertion

[PATCH v2 08/31] tests/functional: drop 'has_cmd' and 'has_cmds' helpers

2024-12-11 Thread Daniel P . Berrangé
The 'which' helper is simpler and sufficient for test needs. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py| 54 ++-- tests/functional/qemu_test/tuxruntest.py | 10 ++--- 3 files changed, 9 ins

[PATCH v3 17/69] target/arm: Convert SETF8, SETF16 to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 48 +- target/arm/tcg/a64.decode | 4 +++ 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/transl

[PATCH v2 24/31] tests/functional: add a generalized uncompress helper

2024-12-11 Thread Daniel P . Berrangé
There are many types of compression that the tests deal with, and it makes sense to have a single helper 'uncompress' that can deal with all. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/__init__.py | 1 + tests/functional/qemu_test/uncompress.py | 47 +

[PATCH v2 10/31] tests/functional: switch over to using self.log_file(...)

2024-12-11 Thread Daniel P . Berrangé
This removes direct access of the 'self.logdir' variable. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 9 - tests/functional/test_virtio_gpu.py| 4 +--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/fu

[PATCH v3 36/69] target/arm: Convert ABS, NEG to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 46 +++--- target/arm/tcg/a64.decode | 4 +++ 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/transl

[PATCH v2 15/31] tests/functional: remove redundant 'rmtree' call

2024-12-11 Thread Daniel P . Berrangé
Everything in the scratch directory is automatically purged. Calling 'rmtree' again breaks the ability to optionally preserve the scratch directory contents. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/test_sh4eb_r2d.py | 3 --- 1 file changed, 3 deletions(-)

[PULL 24/72] target/ppc: Set Float3NaNPropRule explicitly

2024-12-11 Thread Peter Maydell
Set the Float3NaNPropRule explicitly for PPC, and remove the ifdef from pickNaNMulAdd(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20241202131347.498124-20-peter.mayd...@linaro.org --- target/ppc/cpu_init.c | 8 fpu/softfloat-specialize.c.inc | 6

[PATCH v2 23/31] tests/functional: convert tests to new archive_extract helper

2024-12-11 Thread Daniel P . Berrangé
Replace use of utils.archive_extract and extract_from_deb with the new archive_extract helper. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/linuxkernel.py | 20 +-- tests/functional/test_aarch64_aspeed.py | 5 ++- tests/functional/test_aarch64_raspi3.py

[PATCH v3 00/69] target/arm: AArch64 decodetree conversion, final part

2024-12-11 Thread Richard Henderson
Finish the conversion of all aarch64 instructions to decodetree. Changes for v3: - Fix decode for f16 fsqrt (vector) in patch 23, prior to conversion. This is the only patch without R-B. r~ Richard Henderson (69): target/arm: Add section labels for "Data Processing (register)" target

[PULL 10/49] rust: build: establish a baseline of lints across all crates

2024-12-11 Thread Paolo Bonzini
Many lints that default to allow can be helpful in detecting bugs or keeping the code style homogeneous. Add them liberally, though perhaps not as liberally as in hw/char/pl011/src/lib.rs. In particular, enabling entire groups can be problematic because of bitrot when new links are added in the f

[PATCH v3 67/69] target/arm: Introduce gen_gvec_urecpe, gen_gvec_ursqrte

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h | 3 +++ target/arm/tcg/translate.h | 5 + target/arm/tcg/gengvec.c| 16 target/arm/tcg/translate-neon.c | 4 ++-- target/arm/tcg/vec_helper.c | 22 +++

[PATCH v3 26/69] target/arm: Remove helper_sqrt_f16

2024-12-11 Thread Richard Henderson
This function is identical with helper_vfp_sqrth. Replace all uses. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/helper-a64.h| 1 - target/arm/tcg/helper-a64.c| 11 --- target/arm/tcg/translate-a64.c | 4 ++-- 3 files changed, 2 inser

[PATCH v3 21/69] target/arm: Introduce fp_access_check_vector_hsd

2024-12-11 Thread Richard Henderson
Provide a simple way to check for float64, float32, and float16 support vs vector width, as well as the fpu enabled. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 135 + 1 file changed, 54 insertions(+), 81 delet

[PATCH v3 16/69] target/arm: Convert RMIF to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 32 +--- target/arm/tcg/a64.decode | 3 +++ 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg

Re: [PATCH v2 04/31] tests/functional: simplify 'which' implementation

2024-12-11 Thread Richard Henderson
On 12/11/24 11:26, Daniel P. Berrangé wrote: The 'access' check implies the file exists. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test

[PATCH 0/3] riscv misaligned accesses

2024-12-11 Thread Frederic Konrad
Hi, I fell into some strangeness while using RISCV: * firstly the rvi stores / loads don't seem to generate a trap when doing a misaligned access, which is something we would like to happen. According to the documentation an EEI may or may no guarantee misaligned loads and stores are ha

[PATCH 1/3] target/riscv: add a trap-misaligned-access property

2024-12-11 Thread Frederic Konrad
On riscv target, misaligned accesses are either authorized and implemented in hardware, or unimplemented and generate a trap to be implemented in software. At the moment misaligned accesses for rvi just succeed, the intention of this new property is to let the user choose to have a trap when a mis

[PATCH 2/3] target/riscv: generate misaligned access trap for rvi insn

2024-12-11 Thread Frederic Konrad
Now there is an option to enable misaligned accesses traps, check the alignment during load and store for the RVI instructions. Do not generate them if the zama16b extension is there. Signed-off-by: Frederic Konrad --- target/riscv/insn_trans/trans_rvi.c.inc | 7 +++ 1 file changed, 7 inser

[PATCH 3/3] target/riscv: fix the trap generation for conditional store

2024-12-11 Thread Frederic Konrad
>From Unpriviledged ISA manual: "For LR and SC, the Zalrsc extension requires that the address held in rs1 be naturally aligned to the size of the operand (i.e., eight-byte aligned for doublewords and four-byte aligned for words). If the address is not naturally aligned, an address-misaligned exce

Re: [PATCH v2 1/2] os: add an ability to lock memory on_fault

2024-12-11 Thread Peter Xu
On Wed, Dec 11, 2024 at 03:04:46AM +0300, Daniil Tatianin wrote: > This will be used in the following commits to make it possible to only > lock memory on fault instead of right away. > > Signed-off-by: Daniil Tatianin Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 0/3] scripts/qemu-gdb: Make coroutine dumps to work with coredumps

2024-12-11 Thread Peter Xu
On Wed, Dec 11, 2024 at 05:25:10PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > Coroutines are used in many cases in block layers. It's also used in live > > migration when on destination side, and it'll be handy to diagnose crashes > > within a coroutine when we want to also know what ot

Re: [PATCH 2/3] target/riscv: generate misaligned access trap for rvi insn

2024-12-11 Thread Richard Henderson
On 12/11/24 15:19, Frederic Konrad wrote: Now there is an option to enable misaligned accesses traps, check the alignment during load and store for the RVI instructions. Do not generate them if the zama16b extension is there. Signed-off-by: Frederic Konrad --- target/riscv/insn_trans/trans_r

Re: [PATCH v2 2/2] overcommit: introduce mem-lock=on-fault

2024-12-11 Thread Peter Xu
On Wed, Dec 11, 2024 at 03:04:47AM +0300, Daniil Tatianin wrote: > Locking the memory without MCL_ONFAULT instantly prefaults any mmaped > anonymous memory with a write-fault, which introduces a lot of extra > overhead in terms of memory usage when all you want to do is to prevent > kcompactd from

Re: [PATCH 3/3] target/riscv: fix the trap generation for conditional store

2024-12-11 Thread Richard Henderson
On 12/11/24 15:19, Frederic Konrad wrote: +/* + * A misaligned store trap should be triggered even if the store should + * fail due to the reservation. + */ +tcg_gen_andi_tl(tmp, src1, ~((uint64_t)0) << memop_alignment_bits(mop)); The constant is incorrect for testing the lo

Re: [PATCH v2 2/2] overcommit: introduce mem-lock=on-fault

2024-12-11 Thread Daniil Tatianin
On 12/12/24 12:52 AM, Peter Xu wrote: On Wed, Dec 11, 2024 at 03:04:47AM +0300, Daniil Tatianin wrote: Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want t

Re: [PATCH V4 14/19] migration: cpr-transfer mode

2024-12-11 Thread Steven Sistare
On 12/10/2024 7:26 AM, Markus Armbruster wrote: Steve Sistare writes: Add the cpr-transfer migration mode. Usage: qemu-system-$arch -machine aux-ram-share=on ... start new QEMU with "-incoming -incoming " Issue commands to old QEMU: migrate_set_parameter mode cpr-transfer

Re: [PATCH] tcg/riscv: Fix StoreStore barrier generation

2024-12-11 Thread Richard Henderson
On 12/11/24 01:40, Roman Artemev wrote: On RISC-V to StoreStore barrier corresponds `fence w, w` not `fence r, r` Signed-off-by: Denis Tomashev Signed-off-by: Roman Artemev --- tcg/riscv/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/riscv/tcg-targe

[PATCH v3 11/69] target/arm: Convert disas_logic_reg to decodetree

2024-12-11 Thread Richard Henderson
This includes AND, BIC, ORR, ORN, EOR, EON, ANDS, BICS (shifted reg). Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 117 - target/arm/tcg/a64.decode | 9 +++ 2 files changed, 51 insertions(+), 75 deletions

[PATCH v3 13/69] target/arm: Convert disas_add_sub_reg to decodetree

2024-12-11 Thread Richard Henderson
This includes ADD, SUB, ADDS, SUBS (shifted register). Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 64 ++ target/arm/tcg/a64.decode | 9 + 2 files changed, 27 insertions(+), 46 deletions(-) diff --gi

[PATCH v3 22/69] target/arm: Convert FCMP, FCMPE, FCCMP, FCCMPE to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 283 - target/arm/tcg/a64.decode | 8 + 2 files changed, 112 insertions(+), 179 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PATCH v3 58/69] target/arm: Convert FCVT* (vector, fixed-point) scalar to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 4 +--- target/arm/tcg/a64.decode | 19 +++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index

[PATCH v3 45/69] target/arm: Introduce gen_gvec_{s,u}{add,ada}lp

2024-12-11 Thread Richard Henderson
Pairwise addition with and without accumulation. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h | 2 - target/arm/tcg/translate.h | 9 ++ target/arm/tcg/gengvec.c| 230 target/arm/tcg/neon_helper.

[PULL 42/49] rust: qom: rename Class trait to ClassInitImpl

2024-12-11 Thread Paolo Bonzini
While at it, document it. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 4 ++-- rust/qemu-api/src/definitions.rs | 25 ++--- rust/qemu-api/tests/tests.rs | 4 ++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/rust/hw/char/pl011/s

[PATCH v3 47/69] target/arm: Remove helper_neon_{add,sub}l_u{16,32}

2024-12-11 Thread Richard Henderson
These have generic equivalents: tcg_gen_vec_{add,sub}{16,32}_i64. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h | 4 target/arm/tcg/neon_helper.c| 36 - target/arm/tcg/translate-neon.c | 22 ++---

[PATCH v3 48/69] target/arm: Introduce clear_vec

2024-12-11 Thread Richard Henderson
In a couple of places, clearing the entire vector before storing one element is the easiest solution. Wrap that into a helper function. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 21 - 1 file changed, 12 inserti

[PATCH v3 07/69] target/arm: Convert RBIT, REV16, REV32, REV64 to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 137 +++-- target/arm/tcg/a64.decode | 11 +++ 2 files changed, 72 insertions(+), 76 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PULL 48/49] rust: qom: split ObjectType from ObjectImpl trait

2024-12-11 Thread Paolo Bonzini
Define a separate trait for fields that also applies to classes that are defined by C code. This makes it possible to add metadata to core classes, which has multiple uses: - it makes it possible to access the parent struct's TYPE_* for types that are defined in Rust code, and to avoid repeatin

[PULL 46/49] rust: qdev: move bridge for realize and reset functions out of pl011

2024-12-11 Thread Paolo Bonzini
Allow the DeviceImpl trait to expose safe Rust functions. rust_device_class_init<> adds thunks around the functions in DeviceImpl. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 5 ++-- rust/hw/char/pl011/src/device_class.rs | 26 ---

[PATCH v2 27/31] tests/functional: drop back compat imports from utils.py

2024-12-11 Thread Daniel P . Berrangé
Now that all tests are converted over to the higher level wrapper functions, the back compat imports from utils.py are redundant. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/utils.py | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/functional/qemu_test/utils.py

[PULL 38/49] rust: define prelude

2024-12-11 Thread Paolo Bonzini
Add a module that will contain frequently used traits and occasionally structs. They can be included quickly with "use qemu_api::prelude::*". Signed-off-by: Paolo Bonzini --- rust/qemu-api/meson.build| 1 + rust/qemu-api/src/lib.rs | 5 + rust/qemu-api/src/prelude.rs | 6 ++ 3 f

[PATCH v3 55/69] target/arm: Convert FSQRT (vector) to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 69 -- target/arm/tcg/a64.decode | 3 ++ 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/transla

[PATCH v3 38/69] target/arm: Convert CLS, CLZ (vector) to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 37 -- target/arm/tcg/a64.decode | 2 ++ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/transla

[PATCH v3 18/69] target/arm: Convert CCMP, CCMN to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 66 +++--- target/arm/tcg/a64.decode | 6 ++-- 2 files changed, 25 insertions(+), 47 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PULL 35/49] bql: check that the BQL is not dropped within marked sections

2024-12-11 Thread Paolo Bonzini
The Big QEMU Lock (BQL) is used to provide interior mutability to Rust code. While BqlCell performs indivisible accesses, an equivalent of RefCell will allow the borrower to hold to the interior content for a long time. If the BQL is dropped, another thread could come and mutate the data from C c

[PATCH v3 61/69] target/arm: Rename helper_gvec_vcvt_[hf][su] with _rz

2024-12-11 Thread Richard Henderson
Emphasize that these functions use round-to-zero mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h | 8 target/arm/tcg/translate-neon.c | 8 target/arm/tcg/vec_helper.c | 8 3 files changed, 12 insertions(+), 12

[PATCH v2 14/31] tests/functional: switch over to using self.socket_dir(...)

2024-12-11 Thread Daniel P . Berrangé
This removes direct creation of temporary dirs Signed-off-by: Daniel P. Berrangé --- tests/functional/test_arm_aspeed.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py index 9561129c51..5bd31e43ee 1

[PATCH v3 52/69] target/arm: Convert SHLL to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 75 +- target/arm/tcg/a64.decode | 2 + 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translat

[PATCH v3 14/69] target/arm: Convert disas_data_proc_3src to decodetree

2024-12-11 Thread Richard Henderson
This includes MADD, MSUB, SMADDL, SMSUBL, UMADDL, UMSUBL, SMULH, UMULH. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 119 - target/arm/tcg/a64.decode | 16 + 2 files changed, 59 insertions(+), 76 delet

[PULL 32/49] ui: Replace type_register() with type_register_static()

2024-12-11 Thread Paolo Bonzini
From: Zhao Liu Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20241029085934.2799066-15-zhao1@intel.com --- ui/console-vc.c | 2 +- ui/dbus.c | 2 +-

[PATCH v3 25/69] target/arm: Pass fpstatus to vfp_sqrt*

2024-12-11 Thread Richard Henderson
Pass fpstatus not env, like most other fp helpers. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h| 6 +++--- target/arm/tcg/translate-a64.c | 15 +++ target/arm/tcg/translate-vfp.c | 6 +++--- target/arm/vfp_helper.c| 12 +++

[PATCH v3 41/69] target/arm: Convert CMGT, CMGE, GMLT, GMLE, CMEQ (zero) to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 94 +++--- target/arm/tcg/a64.decode | 10 2 files changed, 40 insertions(+), 64 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PATCH v3 12/69] target/arm: Convert disas_add_sub_ext_reg to decodetree

2024-12-11 Thread Richard Henderson
This includes ADD, SUB, ADDS, SUBS (extended register). Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 65 +++--- target/arm/tcg/a64.decode | 9 + 2 files changed, 29 insertions(+), 45 deletions(-) diff --g

Re: [PATCH v2 01/31] tests/functional: remove many unused imports

2024-12-11 Thread Thomas Huth
On 11/12/2024 18.26, Daniel P. Berrangé wrote: Identified using 'pylint --disable=all --enable=W0611' Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/asset.py | 1 - tests/functional/qemu_test/tesseract.py | 1 - tests/functio

Re: [PATCH v2 04/31] tests/functional: simplify 'which' implementation

2024-12-11 Thread Thomas Huth
On 11/12/2024 18.26, Daniel P. Berrangé wrote: The 'access' check implies the file exists. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_te

[PATCH 1/3] scripts/qemu-gdb: Always do full stack dump for python errors

2024-12-11 Thread Peter Xu
It's easier for either debugging plugin errors, or issue reports. Signed-off-by: Peter Xu --- scripts/qemu-gdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu-gdb.py b/scripts/qemu-gdb.py index 4d2a9f6c43..cfae94a2e9 100644 --- a/scripts/qemu-gdb.py +++ b/scripts/qemu-gdb.p

[PATCH 3/3] scripts/qemu-gdb: Support coroutine dumps in coredumps

2024-12-11 Thread Peter Xu
Dumping coroutines don't yet work with coredumps. Let's make it work. We still kept most of the old code because they can be either more flexible, or prettier. Only add the fallbacks when they stop working. Currently the raw unwind is pretty ugly, but it works, like this: (gdb) qemu bt Corouti

[PATCH 0/3] scripts/qemu-gdb: Make coroutine dumps to work with coredumps

2024-12-11 Thread Peter Xu
Coroutines are used in many cases in block layers. It's also used in live migration when on destination side, and it'll be handy to diagnose crashes within a coroutine when we want to also know what other coroutines are doing. This series adds initial support for that, not pretty but it should sta

[PATCH 2/3] scripts/qemu-gdb: Simplify fs_base fetching for coroutines

2024-12-11 Thread Peter Xu
There're a bunch of code trying to fetch fs_base in different ways. IIUC the simplest way instead is "$fs_base". It also has the benefit that it'll work for both live gdb session or coredumps. Signed-off-by: Peter Xu --- scripts/qemugdb/coroutine.py | 23 ++- 1 file changed

Re: [PATCH 3/3] scripts/qemu-gdb: Support coroutine dumps in coredumps

2024-12-11 Thread Peter Xu
On Wed, Dec 11, 2024 at 03:17:39PM -0500, Peter Xu wrote: > Dumping coroutines don't yet work with coredumps. Let's make it work. > > We still kept most of the old code because they can be either more > flexible, or prettier. Only add the fallbacks when they stop working. > > Currently the raw

Re: [PATCH 0/3] scripts/qemu-gdb: Make coroutine dumps to work with coredumps

2024-12-11 Thread Fabiano Rosas
Peter Xu writes: > Coroutines are used in many cases in block layers. It's also used in live > migration when on destination side, and it'll be handy to diagnose crashes > within a coroutine when we want to also know what other coroutines are > doing. Not sure if you've seen this message on the

Re: [PATCH 2/2] s390x/pci: indicate QEMU supports relaxed translation for passthrough

2024-12-11 Thread Thomas Huth
On 09/12/2024 20.29, Matthew Rosato wrote: Specifying this bit in the guest CLP response indicates that the guest can optionally choose to skip translation and instead use identity-mapped operations. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c| 4 +++- include/hw/s390x

[PATCH v3 27/69] target/arm: Convert FSQRT (scalar) to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 72 -- target/arm/tcg/a64.decode | 1 + 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translat

[PATCH v3 43/69] target/arm: Convert handle_rev to decodetree

2024-12-11 Thread Richard Henderson
This includes REV16, REV32, REV64. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 79 +++--- target/arm/tcg/a64.decode | 5 +++ 2 files changed, 10 insertions(+), 74 deletions(-) diff --git a/target/arm/tcg/tra

[PULL 18/49] kvm: remove unnecessary #ifdef

2024-12-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm_i386.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 9de9c0d3038..7edb154a16e 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386

[PATCH v2 29/31] tests/functional: remove now unused 'run_cmd' helper

2024-12-11 Thread Daniel P . Berrangé
All usage has been replaced by direct 'subprocess' helpers. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 11 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/functional/qemu_test/__i

[PATCH v3 68/69] target/arm: Convert URECPE and URSQRTE to decodetree

2024-12-11 Thread Richard Henderson
Remove handle_2misc_reciprocal as these were the last insns decoded by that function. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 139 ++--- target/arm/tcg/a64.decode | 3 + 2 files changed, 8 insertions(+),

[PATCH v3 59/69] target/arm: Convert [US]CVTF (vector, integer) scalar to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 35 -- target/arm/tcg/a64.decode | 6 ++ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/tra

[PULL 39/49] rust: add bindings for interrupt sources

2024-12-11 Thread Paolo Bonzini
The InterruptSource bindings let us call qemu_set_irq() and sysbus_init_irq() as safe code. Interrupt sources, qemu_irq in C code, are pointers to IRQState objects. They are QOM link properties and can be written to outside the control of the device (i.e. from a shared reference); therefore they m

[PATCH v2 00/31] tests/functional: various improvements wrt assets/scratch files

2024-12-11 Thread Daniel P . Berrangé
This series is an attempt to bring a little more guaranteed order to asset and scratch file handling in the functional tests. The main highlights are: * Add custom @skipX decorators for common scenarios present in QEMU tests * Add helpers for creating file paths for various well known

[PATCH v2 07/31] tests/functional: switch to new test skip decorators

2024-12-11 Thread Daniel P . Berrangé
This ensures consistency of behaviour across all the tests, and requires that we provide gitlab bug links when marking a test to be skipped due to unreliability. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/test_acpi_bits.py | 25 +++-- t

[PATCH v2 01/31] tests/functional: remove many unused imports

2024-12-11 Thread Daniel P . Berrangé
Identified using 'pylint --disable=all --enable=W0611' Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/asset.py | 1 - tests/functional/qemu_test/tesseract.py | 1 - tests/functional/qemu_test/tuxruntest.py | 3 +-- tests/f

[PATCH v3 35/69] target/arm: Convert SQABS, SQNEG to decodetree

2024-12-11 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 123 + target/arm/tcg/a64.decode | 11 +++ 2 files changed, 89 insertions(+), 45 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/trans

[PATCH v2 03/31] tests/functional: remove duplicated 'which' function impl

2024-12-11 Thread Daniel P . Berrangé
Put the 'which' function into shared code. Reviewed-by: Richard Henderson Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 10 ++ tests/functional/test_acpi_bits.py | 13 + tests/functional/tes

[PATCH v2 26/31] tests/functional: convert tests to new uncompress helper

2024-12-11 Thread Daniel P . Berrangé
Replace use of lzma_uncompress and gzip_uncompress with the new uncompress helper. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_aarch64_raspi4.py | 5 + tests/functional/test_aarch64_sbsaref.py | 10 +++--- tests/functional/test_alpha_clipper.py| 4 +--- tests/fun

[PATCH v2 18/31] tests/functional: add common zip_extract helper

2024-12-11 Thread Daniel P . Berrangé
This mirrors the existing archive_extract and cpio_extract helpers Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/archive.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/functional/qemu_test/archive.py b/tests/functional/qemu_test/archive.py index 9872f08d

Re: [RFC PATCH 5/5] hw/arm/virt-acpi-build: Add IORT RMR regions to handle MSI nested binding

2024-12-11 Thread Nicolin Chen
On Wed, Dec 11, 2024 at 09:11:12AM -0400, Jason Gunthorpe wrote: > On Tue, Dec 10, 2024 at 05:28:17PM -0800, Nicolin Chen wrote: > > > I would ideally turn it around and provide that range information to > > > the kernel and totally ignore the SW_MSI reserved region once > > > userspace provides it

[PATCH v3 46/69] target/arm: Convert handle_2misc_pairwise to decodetree

2024-12-11 Thread Richard Henderson
This includes SADDLP, UADDLP, SADALP, UADALP. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/helper-a64.h| 2 - target/arm/tcg/helper-a64.c| 18 target/arm/tcg/translate-a64.c | 84 +++--- target/arm/tcg/a64.decode

[PATCH v2 17/31] tests/functional: move uncompress handling into new uncompress.py file

2024-12-11 Thread Daniel P . Berrangé
More uncompress related code will be added shortly, so having a separate file makes more sense. The utils.py imports the functions from archive.py, so that existing callers don't need to be modified. This avoids redundant code churn until later in the series when all calls will be adapted for othe

[PATCH v2 11/31] tests/functional: switch over to using self.build_file(...)

2024-12-11 Thread Daniel P . Berrangé
This removes direct access of the 'BUILD_DIR' variable. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/cmd.py | 5 ++--- tests/functional/qemu_test/testcase.py | 4 ++-- tests/functional/test_aarch64_virt.py | 5 ++--- tests/functional/test_vi

[PATCH v2 16/31] tests/functional: move archive handling into new archive.py file

2024-12-11 Thread Daniel P . Berrangé
More archive related code will be added shortly, so having a separate file makes more sense. The utils.py imports the functions from archive.py, so that existing callers don't need to be modified. This avoids redundant code churn until later in the series when all calls will be adapted for other r

[PATCH v2 22/31] tests/functional: add 'archive_extract' to QemuBaseTest

2024-12-11 Thread Daniel P . Berrangé
This helper wrappers archive.archive_extract, forcing the use of the scratch directory, to ensure any extracted files are cleaned at test termination. If a specific member is requested, then the path to the extracted file is also returned. Signed-off-by: Daniel P. Berrangé --- tests/functional/q

[PATCH v2 25/31] tests/functional: add 'uncompress' to QemuBaseTest

2024-12-11 Thread Daniel P . Berrangé
This helper wrappers utils.uncompress, forcing the use of the scratch directory, to ensure any uncompressed files are cleaned at test termination. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 25 + 1 file changed, 25 insertions(+) diff -

[PATCH v2 28/31] tests/functional: replace 'run_cmd' with subprocess helpers

2024-12-11 Thread Daniel P . Berrangé
The 'run_cmd' helper is re-implementing a convenient helper that already exists in the form of the 'run' and 'check_call' methods provided by 'subprocess'. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/archive.py| 9 --- tests/functional/qemu_test/tesseract.py | 10 +

[PATCH v2 09/31] tests/functional: add helpers for building file paths

2024-12-11 Thread Daniel P . Berrangé
Add helper methods that construct paths for * log files - to be preserved at the end of a test * scratch files - to be purged at the end of a test * build files - anything relative to the build root * data files - anything relative to the functional test source root * socket files - a short t

[PATCH v2 05/31] tests/functional: drop 'tesseract_available' helper

2024-12-11 Thread Daniel P . Berrangé
Platforms we target have new enough tesseract that it suffices to merely check if the binary exists. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/tesseract.py | 12 +--- tests/functional/test_m68k_nextcube.py | 8 +++- 2 files changed, 4 insertions(+), 16 deleti

[PATCH v2 04/31] tests/functional: simplify 'which' implementation

2024-12-11 Thread Daniel P . Berrangé
The 'access' check implies the file exists. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index 4106f1ee7c..600e0509db 100644 --- a

[PATCH v3 31/69] target/arm: Convert FCVT (scalar) to decodetree

2024-12-11 Thread Richard Henderson
Remove handle_fp_fcvt and disas_fp_1src as these were the last insns decoded by those functions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 172 + target/arm/tcg/a64.decode | 7 ++ 2 files changed, 74 i

  1   2   3   4   5   >