[PATCH v7 5/9] target/riscv: Add Ssdbltrp ISA extension enable switch

2024-12-17 Thread Clément Léger
Add the switch to enable the Ssdbltrp ISA extension. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index cfb95eab14..c856a95593 100644 --- a/target/riscv/cpu.c +++ b

[PATCH v7 9/9] target/riscv: Add Smdbltrp ISA extension enable switch

2024-12-17 Thread Clément Léger
Add the switch to enable the Smdbltrp ISA extension. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1b883db0cc..c4330ded69 100644 --- a/target/riscv/cpu.c +++ b

[PATCH v7 6/9] target/riscv: Add Smdbltrp CSRs handling

2024-12-17 Thread Clément Léger
Add `ext_smdbltrp`in RISCVCPUConfig and implement MSTATUS.MDT behavior. Also set MDT to 1 at reset according to the specification. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 3 +++ target/riscv/cpu_bits.h | 1 + target/riscv/cpu_cfg.h | 1 + tar

[PATCH v7 0/9] target/riscv: Add support for Smdbltrp and Ssdbltrp extensions

2024-12-17 Thread Clément Léger
A double trap typically arises during a sensitive phase in trap handling operations — when an exception or interrupt occurs while the trap handler (the component responsible for managing these events) is in a non-reentrant state. This non-reentrancy usually occurs in the early phase of trap handlin

[PATCH v7 4/9] target/riscv: Implement Ssdbltrp exception handling

2024-12-17 Thread Clément Léger
When the Ssdbltrp ISA extension is enabled, if a trap happens in S-mode while SSTATUS.SDT isn't cleared, generate a double trap exception to M-mode. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu.c| 2 +- target/riscv/cpu_bits.h | 1 + target/riscv/c

[PATCH v7 8/9] target/riscv: Implement Smdbltrp behavior

2024-12-17 Thread Clément Léger
When the Smsdbltrp ISA extension is enabled, if a trap happens while MSTATUS.MDT is already set, it will trigger an abort or an NMI is the Smrnmi extension is available. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu_helper.c | 56 ---

Re: [PATCH v3 0/2] Convert the intel_iommu avocado test

2024-12-17 Thread Michael S. Tsirkin
On Tue, Dec 17, 2024 at 01:15:48PM +0100, Thomas Huth wrote: > The first patch introduces a helper function for retrieving the > hostfwd ports from QEMU. > We then use this helper function to run a HTTP server in the guest > in the second patch to exercise the network of the guest. Good stuff Ack

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-17 Thread Donald Dutile
On 12/13/24 8:19 AM, Daniel P. Berrangé wrote: On Fri, Dec 13, 2024 at 08:46:42AM -0400, Jason Gunthorpe wrote: On Fri, Dec 13, 2024 at 12:00:43PM +, Daniel P. Berrangé wrote: On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via wrote: Hi, This series adds initial support for

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

2024-12-17 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

Re: [PATCH v8 10/12] util/dsa: Add unit test coverage for Intel DSA task submission and completion.

2024-12-17 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Test DSA start and stop path. > * Test DSA configure and cleanup path. > * Test DSA task submission and completion path. > > Signed-off-by: Bryan Zhang > Signed-off-by: Hao Xiang > Signed-off-by: Yichen Wang > --- > tests/unit/meson.build | 6 + >

Re: [PATCH 0/6] qtest: Fix some memory issues

2024-12-17 Thread Fabiano Rosas
Fabiano Rosas writes: > I'm trying to get the qtests to run with asan/valgrind without any > warnings so I can run a test before every PR. Here are a few fixes. > > CI run: https://gitlab.com/farosas/qemu/-/pipelines/1580782506 > > Fabiano Rosas (6): > tests/qtest/migration: Do proper cleanup i

Re: [PATCH 22/46] tcg/optimize: Use fold_masks_z in fold_neg_no_const

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 924ee165ba..cc3dc91d3f 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2027,1

Re: [PATCH 21/46] tcg/optimize: Use fold_masks_zs in fold_nand

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 111969c2e3..924ee165ba 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2011,14

Re: [PATCH 20/46] tcg/optimize: Use finish_folding in fold_mul*

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6d2d55f053..111969c2e3 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1952,7 +1

Re: [PATCH 19/46] tcg/optimize: Use fold_masks_zs in fold_movcond

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 260e3ea072..6d2d55f053 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -187

Re: [PATCH 18/46] tcg/optimize: Use fold_masks_zsa in fold_extu

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5d10e704a7..260e3ea072 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1804

Re: [PATCH 23/46] tcg/optimize: Use fold_masks_zs in fold_nor

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index cc3dc91d3f..aa5242a380 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2039,14

Re: [PATCH 28/46] tcg/optimize: Return true from fold_qemu_st, fold_tcg_st

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Stores have no output operands, and so need no further work. Signed-off-by: Richard Henderson --- tcg/optimize.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6f41ef5adb..ee006

Re: [PATCH 24/46] tcg/optimize: Use fold_masks_zs in fold_not

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index aa5242a380..ae1386c681 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2056,12 +

Re: [PATCH 25/46] tcg/optimize: Use fold_masks_zs in fold_or

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index ae1386c681..3d852b44e4 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -20

Re: [PATCH 26/46] tcg/optimize: Use fold_masks_zs in fold_orc

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 3d852b44e4..76ad02d73b 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2078,6

Re: [PATCH 27/46] tcg/optimize: Use fold_masks_zs in fold_qemu_ld

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Be careful not to call fold_masks_zs when the memory operation is wide enough to require multiple outputs, so split into two functions: fold_qemu_ld_1reg and fold_qemu_ld_2reg. Signed-off-by: Richard Henderson --- tcg/optimize.c | 28 +++

Re: [PATCH 30/46] tcg/optimize: Distinguish simplification in fold_setcond_zmask

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Change return from bool to int; distinguish between complete folding, simplification, and no change. Signed-off-by: Richard Henderson --- tcg/optimize.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tcg

Re: [PATCH 31/46] tcg/optimize: Use fold_masks_z in fold_setcond

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 7b1d437c27..cfd4c08f11 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2349,9 +2349

Re: [PATCH 34/46] tcg/optimize: Use finish_folding in fold_cmp_vec

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index dd6ef3d831..30446baabd 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2462,7 +2462,7

Re: [PATCH 32/46] tcg/optimize: Use fold_masks_zs in fold_negsetcond

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index cfd4c08f11..0097502425 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2369,8 +2369,

Re: [PATCH 33/46] tcg/optimize: Use fold_masks_z in fold_setcond2

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 0097502425..dd6ef3d831 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2450,9 +2450

Re: [PATCH 37/46] tcg/optimize: Use fold_masks_zs in fold_shift

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 551f96dfaa..bec5a07288 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@

Re: [PATCH 35/46] tcg/optimize: Use finish_folding in fold_cmpsel_vec

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 30446baabd..c99e6f79d2 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2483,7 +2483,7

Re: [PATCH 36/46] tcg/optimize: Use fold_masks_zsa in fold_sextract

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index c99e6f79d2..551f96dfaa 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2488,7

Re: [PATCH 35/46] tcg/optimize: Use finish_folding in fold_cmpsel_vec

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 30446baabd..c99e6f79d2 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2483,7 +2483,7

Re: [PATCH 40/46] tcg/optimize: Use finish_folding in fold_tcg_ld_memcopy

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 4cccb3b0cf..46116970f3 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2674,7 +2674,7

Re: [PATCH 38/46] tcg/optimize: Use finish_folding in fold_sub, fold_sub_vec

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Duplicate fold_sub_vec into fold_sub instead of calling it, now that fold_sub_vec always returns true. Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b

Re: [PATCH 39/46] tcg/optimize: Use fold_masks_zs in fold_tcg_ld

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6412d5df37..4cccb3b0cf 100644 --- a/tcg/optimize.c +++ b/tcg/optim

Re: [PATCH 43/46] tcg/optimize: Use finish_folding as default in tcg_optimize

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: All non-default cases now finish folding within each function. Do the same with the default case and assert it is done after. Signed-off-by: Richard Henderson --- tcg/optimize.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --gi

Re: [PATCH 42/46] tcg/optimize: Use finish_folding in fold_bitsel_vec

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index fec46014be..24ec14f476 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2821,7 +2821,7

Re: [PATCH 41/46] tcg/optimize: Use fold_masks_zs in fold_xor

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 46116970f3..fec46014be 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c

Re: [PATCH 46/46] tcg/optimize: Move fold_cmp_vec, fold_cmpsel_vec into alphabetic sort

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:24, Richard Henderson wrote: The big comment just above says functions should be sorted. Signed-off-by: Richard Henderson --- tcg/optimize.c | 60 +- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tcg/optimize.c

Re: [PATCH 45/46] tcg/optimize: Move fold_bitsel_vec into alphabetic sort

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:24, Richard Henderson wrote: The big comment just above says functions should be sorted. Add forward declarations as needed. Signed-off-by: Richard Henderson --- tcg/optimize.c | 114 + 1 file changed, 59 insertions(+), 55 deleti

Re: [PATCH 44/46] tcg/optimize: Remove [zsa]_mask from OptContext

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: All mask setting is now done with parameters via fold_masks_*. Signed-off-by: Richard Henderson --- tcg/optimize.c | 16 1 file changed, 16 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 94e942e1cf..eb6e93809e 100

Re: [PATCH 29/46] tcg/optimize: Use finish_folding in fold_remainder

2024-12-17 Thread Pierrick Bouvier
On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index ee00620ce0..eac5ef5eec 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2134,7 +2134,7

Re: [PATCH 3/8] pci/msix: Implement PBA writes

2024-12-17 Thread Nicholas Piggin
On Fri Dec 13, 2024 at 3:14 PM AEST, Akihiko Odaki wrote: > On 2024/12/12 17:34, Nicholas Piggin wrote: > > Implement MMIO PBA writes, 1 to trigger and 0 to clear. > > > > This functionality is used by some qtests, which keep the msix irq > > masked and test irq pending via the PBA bits, for simpl

[PATCH v2 03/11] tests/tcg/plugins/syscall: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index ff452178b18..47aad55fc1b 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/sysca

[PATCH v2 00/11] Fix 32-bit build for plugins

2024-12-17 Thread Pierrick Bouvier
Since 9.2.0 release, we are building contrib plugins using the QEMU build system (before, it was external makefiles). When building for 32-bit host platform, some warnings are triggered and build fail. Thus, at the time, the decision was to not fix those plugins, and disable by default plugins for

[PATCH v2 01/11] tests/tcg/plugins/insn: remove unused callback parameter

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/insn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index baf2d07205d..0c723cb9ed8 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -150,10 +1

Re: [PATCH v2 00/11] Fix 32-bit build for plugins

2024-12-17 Thread Pierrick Bouvier
On 12/17/24 14:38, Pierrick Bouvier wrote: Since 9.2.0 release, we are building contrib plugins using the QEMU build system (before, it was external makefiles). When building for 32-bit host platform, some warnings are triggered and build fail. Thus, at the time, the decision was to not fix thos

[PATCH v3 09/11] contrib/plugins/hwprofile: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hwprofile.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b5..2a4cbc47d40 100644 --- a/c

[PATCH v3 01/11] tests/tcg/plugins/insn: remove unused callback parameter

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/insn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index baf2d07205d..0c723cb9ed8 100644 --- a/tests/tcg/p

[PATCH v3 11/11] configure: reenable plugins by default for 32-bit hosts

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- configure | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configure b/configure index 18336376bff..02f1dd2311f 100755 --- a/configure +++ b/configure @@ -528,25 +528,6 @@ case "$cpu" in

[PATCH v3 03/11] tests/tcg/plugins/syscall: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index ff452178b18..47aad55fc1b 100644 --- a/tests/tcg/plugins/syscall

[PATCH v3 00/11] Fix 32-bit build for plugins

2024-12-17 Thread Pierrick Bouvier
Since 9.2.0 release, we are building contrib plugins using the QEMU build system (before, it was external makefiles). When building for 32-bit host platform, some warnings are triggered and build fail. Thus, at the time, the decision was to not fix those plugins, and disable by default plugins for

[PATCH v3 04/11] tests/tcg/plugins/mem: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f277..d87d6628e09 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/t

[PATCH v3 05/11] contrib/plugins/stoptrigger: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/stoptrigger.c | 48 --- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 03ee22f4c6a..b3a6ed66a7b 100644 --- a/contrib/plugins/sto

[PATCH v3 08/11] contrib/plugins/cflow: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/cflow.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b39974d1cf3..930ecb46fcd 100644 --- a/contrib/plugins/cflow.c

[PATCH v3 06/11] contrib/plugins/cache: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/cache.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b7..7baff868609 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @

[PATCH v3 02/11] contrib/plugins/howvec: ensure we don't regress if this plugin is extended

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/howvec.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 9be67f74534..2aa9029c3f0 100644 --- a/contrib/plugins/howvec.c +++ b/co

[PATCH v3 07/11] contrib/plugins/hotblocks: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..f12bfb7a267 100644 --- a/contrib/plugins/hotblocks.c +++

[PATCH v3 10/11] contrib/plugins/hotpages: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c72..c6e64937194 100644 --- a/contrib/plugins/hotpages.c +

Re: (Proposal) New TDX Global Metadata To Report FIXED0 and FIXED1 CPUID Bits

2024-12-17 Thread Sean Christopherson
On Tue, Dec 17, 2024, Rick P Edgecombe wrote: > On Mon, 2024-12-16 at 17:53 -0800, Sean Christopherson wrote: > > Every new feature that lands in hardware needs to either be "benign" or > > have the > > appropriate virtualization controls.  KVM already has to deal with cases > > where > > feature

Re: [PATCH for-10.0 3/9] target/riscv: add shcounterenw

2024-12-17 Thread Alistair Francis
On Thu, Nov 14, 2024 at 3:20 AM Daniel Henrique Barboza wrote: > > shcounterenw is defined in RVA22 as: > > "For any hpmcounter that is not read-only zero, the corresponding bit in > hcounteren must be writable." > > This is always true in TCG so let's claim support for it. > > Signed-off-by: Dani

Re: [PATCH v2] riscv/gdb: add virt mode debug interface

2024-12-17 Thread Yanfeng Liu
On Mon, 2024-12-16 at 15:33 +1000, Alistair Francis wrote: > On Thu, Dec 5, 2024 at 7:17 PM Yanfeng Liu wrote: > > > > On Thu, 2024-12-05 at 08:10 +, Alex Bennée wrote: > > > Yanfeng Liu writes: > > > > > > > On Wed, 2024-12-04 at 17:03 +0100, Mario Fleischmann wrote: > > > > > Hi everyone,

Re: [PATCH V4 02/19] physmem: fd-based shared memory

2024-12-17 Thread Peter Xu
On Tue, Dec 17, 2024 at 04:54:43PM -0500, Steven Sistare wrote: > On 12/16/2024 1:19 PM, Peter Xu wrote: > > On Fri, Dec 13, 2024 at 11:41:45AM -0500, Steven Sistare wrote: > > > On 12/12/2024 4:22 PM, Peter Xu wrote: > > > > On Thu, Dec 12, 2024 at 03:38:00PM -0500, Steven Sistare wrote: > > > > >

[PATCH v2 04/11] tests/tcg/plugins/mem: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f277..d87d6628e09 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -135,14 +135

[PATCH v2 07/11] contrib/plugins/hotblocks: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..f12bfb7a267 100644 --- a/contrib/plugins/hotblocks.c +++

[PATCH v2 09/11] contrib/plugins/hwprofile: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/hwprofile.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b5..2a4cbc47d40 100644 --- a/contrib/plugins/hwprofile.c +++ b

[PATCH v2 11/11] configure: reenable plugins by default for 32-bit hosts

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- configure | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configure b/configure index 18336376bff..02f1dd2311f 100755 --- a/configure +++ b/configure @@ -528,25 +528,6 @@ case "$cpu" in ;; esac -# Now we have ou

[PATCH v2 08/11] contrib/plugins/cflow: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/cflow.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b39974d1cf3..930ecb46fcd 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@

[PATCH v2 05/11] contrib/plugins/stoptrigger: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/stoptrigger.c | 48 --- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 03ee22f4c6a..b3a6ed66a7b 100644 --- a/contrib/plugins/sto

[PATCH v2 10/11] contrib/plugins/hotpages: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c72..c6e64937194 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c

[PATCH v2 06/11] contrib/plugins/cache: fix 32-bit build

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/cache.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b7..7baff868609 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @

[PATCH v2 02/11] contrib/plugins/howvec: ensure we don't regress if this plugin is extended

2024-12-17 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- contrib/plugins/howvec.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 9be67f74534..2aa9029c3f0 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -253,6

Re: [PATCH 03/46] tcg/optimize: Add fold_masks_zsa, fold_masks_zs, fold_masks_z

2024-12-17 Thread Richard Henderson
On 12/17/24 14:03, Pierrick Bouvier wrote: +__attribute__((unused)) +static bool fold_masks_zs(OptContext *ctx, TCGOp *op, +  uint64_t z_mask, uint64_t s_mask) +{ +    return fold_masks_zsa(ctx, op, z_mask, s_mask, -1); +} + +__attribute__((unused)) +static bool fold_masks

Re: [PATCH 27/46] tcg/optimize: Use fold_masks_zs in fold_qemu_ld

2024-12-17 Thread Richard Henderson
On 12/17/24 14:35, Pierrick Bouvier wrote: @@ -3001,11 +3010,18 @@ void tcg_optimize(TCGContext *s)   break;   case INDEX_op_qemu_ld_a32_i32:   case INDEX_op_qemu_ld_a64_i32: +    done = fold_qemu_ld_1reg(&ctx, op); +    break;   case INDEX_op_q

Re: [PATCH 41/46] tcg/optimize: Use fold_masks_zs in fold_xor

2024-12-17 Thread Richard Henderson
On 12/17/24 14:45, Pierrick Bouvier wrote: On 12/10/24 07:23, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   tcg/optimize.c | 17 +++--   1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 46116970f3..fec46014be 10064

Re: [PATCH v2 1/2] hw/usb/hcd-xhci-pci: Make PCI device more configurable

2024-12-17 Thread Nicholas Piggin
On Thu Dec 12, 2024 at 8:41 PM AEST, Phil Dennis-Jordan wrote: > Hey Nicholas, > > I'm not an XHCI & PCI expert (yet?) so apologies if I've got some of this > wrong, but I've asked some questions and made some comments inline: Hey Phil, Thanks for the review, looks like you are the expert now :)

Re: [PATCH 24/26] rust: qom: move device_id to PL011 class side

2024-12-17 Thread Zhao Liu
On Tue, Dec 17, 2024 at 05:50:09PM +0100, Paolo Bonzini wrote: > Date: Tue, 17 Dec 2024 17:50:09 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 24/26] rust: qom: move device_id to PL011 class side > > Il mar 17 dic 2024, 04:39 Zhao Liu ha scritto: > > > > +impl ClassInitImpl for PL011State {

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2024-12-17 Thread Chenyi Qiang
On 12/13/2024 3:08 PM, Chenyi Qiang wrote: > As the commit 852f0048f3 ("RAMBlock: make guest_memfd require > uncoordinated discard") highlighted, some subsystems like VFIO might > disable ram block discard. However, guest_memfd relies on the discard > operation to perform page conversion between

Re: [PATCH 26/26] rust: callbacks: allow passing optional callbacks as ()

2024-12-17 Thread Zhao Liu
On Tue, Dec 17, 2024 at 05:40:14PM +0100, Paolo Bonzini wrote: > Date: Tue, 17 Dec 2024 17:40:14 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 26/26] rust: callbacks: allow passing optional > callbacks as () > > Il mar 17 dic 2024, 16:55 Zhao Liu ha scritto: > > > On Mon, Dec 09, 2024 at 0

[PATCH] meson.build: Disallow libnfs v6 to fix the broken macOS build

2024-12-17 Thread Thomas Huth
The macOS build in our CI is currently broken since homebrew updated libnfs to version 6 - and that version apparently comes with a big API breakage. Disallow that version for now to get the broken CI job working again. Once somebody had enough time to adapt our code in block/nfs.c, we can revert t

Re: [PATCH v8 03/12] util/dsa: Implement DSA device start and stop logic.

2024-12-17 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * DSA device open and close. > * DSA group contains multiple DSA devices. > * DSA group configure/start/stop/clean. > > Signed-off-by: Hao Xiang > Signed-off-by: Bryan Zhang > Signed-off-by: Yichen Wang Reviewed-by: Fabiano Rosas

Re: [PATCH 8/9] migration: Drop migration_is_device()

2024-12-17 Thread Peter Xu
On Mon, Dec 16, 2024 at 11:46:37AM +0200, Avihai Horon wrote: > After being removed from VFIO, migration_is_device() no longer has any > users. Drop it. > > Signed-off-by: Avihai Horon Thanks for working on this, Avihai! Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 9/9] migration: Unexport migration_is_active()

2024-12-17 Thread Peter Xu
On Mon, Dec 16, 2024 at 11:46:38AM +0200, Avihai Horon wrote: > After being removed from VFIO and dirty limit, migration_is_active() no > longer has any users outside the migration subsystem, and in fact, it's > only used in migration.c. > > Unexport it and also relocate it so it can be made stati

[PULL 16/17] migration/block: Rewrite disk activation

2024-12-17 Thread Fabiano Rosas
From: Peter Xu This patch proposes a flag to maintain disk activation status globally. It mostly rewrites disk activation mgmt for QEMU, including COLO and QMP command xen_save_devices_state. Backgrounds === We have two problems on disk activations, one resolved, one not. Problem 1: d

[PULL 09/17] migration/multifd: Fix compat with QEMU < 9.0

2024-12-17 Thread Fabiano Rosas
Commit f5f48a7891 ("migration/multifd: Separate SYNC request with normal jobs") changed the multifd source side to stop sending data along with the MULTIFD_FLAG_SYNC, effectively introducing the concept of a SYNC-only packet. Relying on that, commit d7e58f412c ("migration/multifd: Don't send ram da

[PULL 05/17] migration/multifd: Unify RAM_SAVE_FLAG_MULTIFD_FLUSH messages

2024-12-17 Thread Fabiano Rosas
From: Peter Xu RAM_SAVE_FLAG_MULTIFD_FLUSH message should always be correlated to a sync request on src. Unify such message into one place, and conditionally send the message only if necessary. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu Message-Id: <20241206224755.1108686-5-pet...@red

[PULL 08/17] migration/multifd: Document the reason to sync for save_setup()

2024-12-17 Thread Fabiano Rosas
From: Peter Xu It's not straightforward to see why src QEMU needs to sync multifd during setup() phase. After all, there's no page queued at that point. For old QEMUs, there's a solid reason: EOS requires it to work. While it's clueless on the new QEMUs which do not take EOS message as sync re

[PULL 10/17] s390x: Fix CSS migration

2024-12-17 Thread Fabiano Rosas
Commit a55ae46683 ("s390: move css_migration_enabled from machine to css.c") disabled CSS migration globally instead of doing it per-instance. CC: Paolo Bonzini CC: qemu-sta...@nongnu.org #9.1 Fixes: a55ae46683 ("s390: move css_migration_enabled from machine to css.c") Resolves: https://gitlab.co

[PULL 01/17] migration/multifd: Fix compile error caused by page_size usage

2024-12-17 Thread Fabiano Rosas
From: Shameer Kolothum >From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and page_count") onwards page_size is not part of MutiFD*Params but uses an inline constant instead. However, it missed updating an old usage, causing a compile error. Fixes: 90fa121c6c07 ("migration/multifd:

[PULL 00/17] Migration patches for 2024-12-17

2024-12-17 Thread Fabiano Rosas
/migration-20241217-pull-request for you to fetch changes up to 1bed6df0c71d3a74286f53c01fafd21fde8777f4: tests/qtest/migration: Fix compile errors when CONFIG_UADK is set (2024-12-17 13:51:19 -0300) Migration pull request - Shame

[PULL 04/17] migration/ram: Move RAM_SAVE_FLAG* into ram.h

2024-12-17 Thread Fabiano Rosas
From: Peter Xu Firstly, we're going to use the multifd flag soon in multifd code, so ram.c isn't gonna work. Secondly, we have a separate RDMA flag dangling around, which is definitely not obvious. There's one comment that helps, but not too much. Put all RAM save flags altogether, so nothing

Re: [PATCH v3 06/32] tests/functional: drop 'tesseract_available' helper

2024-12-17 Thread Richard Henderson
On 12/17/24 09:59, Daniel P. Berrangé wrote: 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 +++--

[PULL 03/17] migration/multifd: Allow to sync with sender threads only

2024-12-17 Thread Fabiano Rosas
From: Peter Xu Teach multifd_send_sync_main() to sync with threads only. We already have such requests, which is when mapped-ram is enabled with multifd. In that case, no SYNC messages will be pushed to the stream when multifd syncs the sender threads because there's no destination threads wait

[PULL 12/17] qmp/cont: Only activate disks if migration completed

2024-12-17 Thread Fabiano Rosas
From: Peter Xu As the comment says, the activation of disks is for the case where migration has completed, rather than when QEMU is still during migration (RUN_STATE_INMIGRATE). Move the code over to reflect what the comment is describing. Cc: Kevin Wolf Cc: Markus Armbruster Signed-off-by: P

[PULL 02/17] migration/multifd: Further remove the SYNC on complete

2024-12-17 Thread Fabiano Rosas
From: Peter Xu Commit 637280aeb2 ("migration/multifd: Avoid the final FLUSH in complete()") stopped sending the RAM_SAVE_FLAG_MULTIFD_FLUSH flag at ram_save_complete(), because the sync on the destination side is not needed due to the last iteration of find_dirty_block() having already done it.

[PULL 07/17] migration/multifd: Cleanup src flushes on condition check

2024-12-17 Thread Fabiano Rosas
From: Peter Xu The src flush condition check is over complicated, and it's getting more out of control if postcopy will be involved. In general, we have two modes to do the sync: legacy or modern ways. Legacy uses per-section flush, modern uses per-round flush. Mapped-ram always uses the modern

[PULL 14/17] migration/block: Apply late-block-active behavior to postcopy

2024-12-17 Thread Fabiano Rosas
From: Peter Xu Postcopy never cared about late-block-active. However there's no mention in the capability that it doesn't apply to postcopy. Considering that we _assumed_ late activation is always good, do that too for postcopy unconditionally, just like precopy. After this patch, we should ha

[PULL 15/17] migration/block: Fix possible race with block_inactive

2024-12-17 Thread Fabiano Rosas
From: Peter Xu Src QEMU sets block_inactive=true very early before the invalidation takes place. It means if something wrong happened during setting the flag but before reaching qemu_savevm_state_complete_precopy_non_iterable() where it did the invalidation work, it'll make block_inactive flag i

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

2024-12-17 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

Re: [PATCH v8 08/12] migration/multifd: Add new migration option for multifd DSA offloading.

2024-12-17 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > Intel DSA offloading is an optional feature that turns on if > proper hardware and software stack is available. To turn on > DSA offloading in multifd live migration by setting: > > zero-page-detection=dsa-accel > accel-path="dsa: dsa:[dsa_dev_path2] ...

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

2024-12-17 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. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/utils.py | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/func

<    1   2   3   4   >