[PATCH v2 73/76] include/exec/gen-icount: Drop tcg_temp_free in gen_tb_start

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 733a2fb228..bbeb85832e 100644 --- a/include/exec/gen-icount.

[PATCH 27/70] target/m68k: Avoid tcg_const_i32 in bfop_reg

2023-02-27 Thread Richard Henderson
Tidy up the whole function, hoisting is_bfffo as a common test for whether tlen and tofs needed. Use tcg_constant_i32, and load a separate temporary for mask. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 42 - 1 file changed, 20 insertion

[PATCH v4 31/31] tcg: Update docs/devel/tcg-ops.rst for temporary changes

2023-02-27 Thread Richard Henderson
Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 230 +++-- 1 file changed, 129 insertions(+), 101 del

[PATCH 57/70] target/tricore: Rename t_off10 and use tcg_constant_i32

2023-02-27 Thread Richard Henderson
While temp3 could simply be initialized with tcg_constant_i32, the renaming makes the purpose clearer. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 56 ++ 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/target/tricore/trans

[PATCH v2 15/76] target/arm: Drop tcg_temp_free from translator-sve.c

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 186 + 1 file changed, 2 insertions(+), 184 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2

[PATCH 02/70] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf

2023-02-27 Thread Richard Henderson
While this enumerator has been present since the first commit, it isn't ever used. The first actual use of round-to-odd came with SVE, which currently uses float_round_to_odd instead of the arm-specific enumerator. Amusingly, the comment about unhandled TIEAWAY has been out of date since the init

[PATCH 00/70] tcg: Remove tcg_const_*

2023-02-27 Thread Richard Henderson
This completes the transition from tcg_const_* to tcg_constant_* that started in 2020. This isn't hard, but non-mechanical. One must identify when the variable is used only for the constant, or if it is also written as a general purpose temporary. For the most part, breaking this apart makes the

[PATCH 65/70] target/xtensa: Use tcg_gen_subfi_i32 in translate_sll

2023-02-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 41b84082de..2903c73f8e 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -2324

Re: [PATCH v4 05/15] vdpa: move vhost reset after get vring base

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: The function vhost.c:vhost_dev_stop calls vhost operation vhost_dev_start(false). In the case of vdpa it totally reset and wipes the device, making the fetching of the vring base (virtqueue state) totally useless. As discussed before, should we do somethi

[PATCH v2 16/76] target/arm: Drop tcg_temp_free from translator-vfp.c

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.c | 193 - 1 file changed, 193 deletions(-) diff --git a/target/arm/translate-vfp.c b/target/arm/translate-vfp.c index 5c5d58d2c6..757a2b

[PATCH 14/70] target/cris: Avoid use of tcg_const_i32 throughout

2023-02-27 Thread Richard Henderson
All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- target/cris/translate.c | 46 +++-- target/cris/translate_v10.c.inc | 26 +-- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/target/cris/translate

[PATCH 61/70] target/tricore: Avoid tcg_const_i32

2023-02-27 Thread Richard Henderson
All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 127 +++-- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 71c8f3d568..3dd932

[PATCH 29/70] target/microblaze: Avoid tcg_const_* throughout

2023-02-27 Thread Richard Henderson
All uses are strictly read-only. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 35 +++ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index eb6bdb49e1..ee0d7b81ad

[PATCH v4 28/31] target/xtensa: Don't use tcg_temp_local_new_*

2023-02-27 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 8

[PATCH 62/70] target/xtensa: Tidy translate_bb

2023-02-27 Thread Richard Henderson
Replace ifdefs with C, tcg_const_i32 with tcg_constant_i32. We only need a single temporary for this. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/t

[PATCH 58/70] target/tricore: Use min/max for saturate

2023-02-27 Thread Richard Henderson
Use tcg_constant_i32 for the bounds. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 19cf4b6cc7..d5129f22f5 100644 --- a/target/tricor

[PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm

2023-02-27 Thread Richard Henderson
Rename from gen_tmp_value_from_imm to match gen_constant vs gen_tmp. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/parser-helpers.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/

[PATCH 68/70] tcg: Replace tcg_const_i64 in tcg-op.c

2023-02-27 Thread Richard Henderson
These three instances got missed in previous conversion. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 53e96b5b69..9753b08f6c 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -15

[PATCH 38/70] target/ppc: Avoid tcg_const_* in xxeval

2023-02-27 Thread Richard Henderson
Initialize a new temp instead of tcg_const_*. Fix a pasto in a comment. Signed-off-by: Richard Henderson --- target/ppc/translate/vsx-impl.c.inc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx-impl.c.inc

[PATCH 60/70] target/tricore: Drop some temp initialization

2023-02-27 Thread Richard Henderson
The temp variables here are always set afterward; the initialization with a constant was discarded. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c inde

[PATCH v4 09/31] tcg: Pass TCGTempKind to tcg_temp_new_internal

2023-02-27 Thread Richard Henderson
While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 18 +- tcg/tcg.c | 8 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/i

[PATCH v4 00/31] tcg: Simplify temporary usage

2023-02-27 Thread Richard Henderson
The biggest pitfall for new users of TCG is the fact that "normal" temporaries die at branches, and we must therefore use a different "local" temporary in that case. The following patch set changes that, so that the "normal" temporary is the one that lives across branches, and there is a special t

Re: [PATCH v16 08/11] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-02-27 Thread Thomas Huth
On 24/02/2023 18.15, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-22 at 15:21 +0100, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor

[PATCH 66/70] target/xtensa: Split constant in bit shift

2023-02-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 2903c73f8e..f906ba7ed5 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -

[PATCH v2 62/76] target/s390x: Remove assert vs g_in2

2023-02-27 Thread Richard Henderson
These were trying to determine if o->in2 was available for use as a temporary. It's better to just allocate a new one. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/s390x/tcg/tr

[PATCH 50/70] target/s390x: Split out gen_ri2

2023-02-27 Thread Richard Henderson
Use tcg_constant_i64. Adjust in2_mri2_* to allocate a new temporary for the output, using gen_ri2 for the address. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/target/s390x/tcg/tran

[PATCH 44/70] target/ppc: Avoid tcg_const_* in translate.c

2023-02-27 Thread Richard Henderson
All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 142 + 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 52b812a01f..fb545423f5 100

[PATCH v2 49/76] target/openrisc: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 39 - 1 file changed, 39 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index b8cd8e0964..76e53

[PATCH 31/70] target/mips: Split out gen_lxr

2023-02-27 Thread Richard Henderson
Common subroutine for LDR and LWR. Use tcg_constant_tl of ~1 instead of tcg_const_tl of 0x..fe. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 116 +--- 1 file changed, 40 insertions(+), 76 deletions(-) diff --git a/target/mips/tcg/translate.c

[PATCH 43/70] target/ppc: Fix gen_tlbsx_booke206

2023-02-27 Thread Richard Henderson
Fix incorrect read from rD. Avoid adding 0 when rA == 0. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f74f3b8f0d..52b812a01f 100644 --- a/target/ppc/tran

[PATCH 35/70] target/ppc: Avoid tcg_const_i64 in do_vector_shift_quad

2023-02-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/translate/vmx-impl.c.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc index ee656d6a44..7af6d7217d 100644 --- a/target/ppc/translate/vmx-impl.c.inc

[PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B

2023-02-27 Thread Richard Henderson
Since we're assigning to cpu_sr_t in the end, use that as the intermediate temp as well. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index ad6de41712..70a4

[PATCH 63/70] target/xtensa: Tidy translate_clamps

2023-02-27 Thread Richard Henderson
All writes to arg[0].out; use tcg_constant_i32. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index e3fcd50691..d727f9ffd8 100644 --- a/target/xtensa

Re: [PATCH v4 11/15] vdpa net: block migration if the device has CVQ

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: Devices with CVQ needs to migrate state beyond vq state. Leaving this to future series. Signed-off-by: Eugenio Pérez --- v3: Migration blocker is registered in vhost_dev. --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 1 +

[PATCH v2 14/76] target/arm: Drop tcg_temp_free from translator-sme.c

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-sme.c | 28 1 file changed, 28 deletions(-) diff --git a/target/arm/translate-sme.c b/target/arm/translate-sme.c index 7b87a9df63..e3adba314e 100644

Re: [PATCH v4 06/15] vdpa: add vhost_vdpa->suspended parameter

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: This allows vhost_vdpa to track if it is safe to get vring base from the device or not. If it is not, vhost can fall back to fetch idx from the guest buffer again. No functional change intended in this patch, later patches will use this field. Signed-off-

Re: [PATCH v4 09/15] vdpa: add vdpa net migration state notifier

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might need to b

Re: [PATCH v4 08/15] vdpa: rewind at get_base, not set_base

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: At this moment it is only possible to migrate to a vdpa device running with x-svq=on. As a protective measure, the rewind of the inflight descriptors was done at the destination. That way if the source sent a virtqueue with inuse descriptors they are always

[PATCH 24/70] target/m68k: Reject immediate as destination in gen_ea_mode

2023-02-27 Thread Richard Henderson
In theory this should never happen, as all such instructions are illegal. This is checked in e.g. gen_lea_mode and gen_ea_mode_fp but not here. In case something higher up isn't checking modes properly, return NULL_QREG. This will result in an illegal instruction exception being raised. Signed-

[PATCH 30/70] target/mips: Split out gen_lxl

2023-02-27 Thread Richard Henderson
Common subroutine for LDL and LWL. Use tcg_constant_tl instead of tcg_const_tl and t2. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 106 1 file changed, 36 insertions(+), 70 deletions(-) diff --git a/target/mips/tcg/translate.c b/target

Re: [PATCH v4 10/15] vdpa: disable RAM block discard only for the first device

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: Although it does not make a big difference, its more correct and simplifies the cleanup path in subsequent patches. Move ram_block_discard_disable(false) call to the top of vhost_vdpa_cleanup because: * We cannot use vhost_vdpa_first_dev after dev->opaque =

Re: [PATCH v4 07/15] vdpa: add vhost_vdpa_suspend

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: The function vhost.c:vhost_dev_stop fetches the vring base so the vq state can be migrated to other devices. However, this is unreliable in vdpa, since we didn't signal the device to suspend the queues, making the value fetched useless. Suspend the device

[PATCH 01/70] target/arm: Use rmode >= 0 for need_rmode

2023-02-27 Thread Richard Henderson
Initialize rmode to -1 instead of keeping two variables. This is already used elsewhere in translate-a64.c. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 34 ++ 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/target/arm/translate

[PATCH 54/70] tcg/sparc: Avoid tcg_const_tl in gen_edge

2023-02-27 Thread Richard Henderson
Push tcg_constant_tl into the shift argument directly. Since t1 no longer exists as a temp, replace with lo1, whose last use was just above. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target/spa

Re: [PATCH v4 01/15] vdpa net: move iova tree creation from init to start

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: Only create iova_tree if and when it is needed. The cleanup keeps being responsible of last VQ but this change allows it to merge both cleanup functions. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- v4: * Remove leak of iova_tree because double

Re: [PATCH v4 03/15] vdpa: stop svq at vhost_vdpa_dev_start(false)

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: It used to be done at vhost_vdpa_svq_cleanup, since a device couldn't switch to SVQ mode dynamically. Now that we need to fetch the state and trust SVQ will not modify guest's used_idx at migration, stop effectively SVQ at suspend time, as a real device wou

[PATCH v1] target/loongarch: Implement Chip Configuraiton Version Register(0x0000)

2023-02-27 Thread Song Gao
According to the 3A5000 manual 4.1 implement Chip Configuration Version Register(0x). The manual does not state that 0x0018 is reserved for the vendor name and 0x0028 is reserved for the chip name. Signed-off-by: Song Gao --- target/loongarch/cpu.c | 2 ++ target/loongarch/cpu.h | 3 +++ 2 f

[PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn

2023-02-27 Thread Richard Henderson
It is easy enough to use mov instead of or-with-zero and relying on the optimizer to fold away the or. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64

Re: [PATCH v4 12/15] vdpa: block migration if device has unsupported features

2023-02-27 Thread Jason Wang
在 2023/2/24 23:54, Eugenio Pérez 写道: A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so the vhost subsystem will block VM

Re: [PATCH v2 0/2] QGA installer fixes

2023-02-27 Thread Konstantin Kostiuk
ping On Tue, Feb 21, 2023 at 1:41 PM Philippe Mathieu-Daudé wrote: > On 21/2/23 12:21, Konstantin Kostiuk wrote: > > resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 > > fixes: CVE-2023-0664 > > > > CVE Technical details: The cached installer for QEMU Guest Agent in > c:\windows\ins

[PATCH 18/70] target/hexagon/idef-parser: Use gen_tmp for gen_rvalue_pred

2023-02-27 Thread Richard Henderson
The allocation is immediately followed by either tcg_gen_mov_i32 or gen_read_preg (which contains tcg_gen_mov_i32), so the zero initialization is immediately discarded. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/parser-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH v3 4/8] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-27 Thread Bernhard Beschow
Am 26. Februar 2023 23:33:20 UTC schrieb BALATON Zoltan : >On Sun, 26 Feb 2023, Bernhard Beschow wrote: >> Am 25. Februar 2023 18:11:49 UTC schrieb BALATON Zoltan : >>> From: Bernhard Beschow >>> >>> The real VIA south bridges implement a PCI IRQ router which is configured >>> by the BIOS or t

[PATCH v4 19/31] target/arm: Drop copies in gen_sve_{ldr,str}

2023-02-27 Thread Richard Henderson
Since we now get TEMP_TB temporaries by default, we no longer need to make copies across these loops. These were the only uses of new_tmp_a64_local(), so remove that as well. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 - target/arm/translate

Re: [PATCH 1/3] qga: test: Use absolute path to test data

2023-02-27 Thread Marc-André Lureau
Hi On Fri, Feb 24, 2023 at 8:31 AM Daniel Xu wrote: > > It looks like qga's working directory is in a tempdir. So the relative > path that the test case gives qga through the QGA_OS_RELEASE= > env variable does not resolve correctly. > > Fix by doing a poor man's path canonicalization of the test

Re: [PATCH v4 12/15] vdpa: block migration if device has unsupported features

2023-02-27 Thread Jason Wang
On Mon, Feb 27, 2023 at 4:15 PM Jason Wang wrote: > > > 在 2023/2/24 23:54, Eugenio Pérez 写道: > > A vdpa net device must initialize with SVQ in order to be migratable at > > this moment, and initialization code verifies some conditions. If the > > device is not initialized with the x-svq parameter

[PATCH 47/70] target/rx: Use cpu_psw_z as temp in flags computation

2023-02-27 Thread Richard Henderson
Since PSW_Z = PSW_S, we can move that assignment to the end and use PSW_Z as a temporary while computing PSW_O. Use tcg_constant_i32 instead of tcg_const_i32. Signed-off-by: Richard Henderson --- target/rx/translate.c | 28 +--- 1 file changed, 13 insertions(+), 15 deleti

[PATCH v4 03/31] accel/tcg: Use more accurate max_insns for tb_overflow

2023-02-27 Thread Richard Henderson
Write back the number of insns that we attempt to translate, so that if we longjmp out we have a more accurate limit for the next attempt. This results in fewer restarts when some limit is consumed by few instructions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- ac

Re: [PATCH 58/70] target/tricore: Use min/max for saturate

2023-02-27 Thread Richard Henderson
On 2/26/23 19:42, Richard Henderson wrote: static void gen_saturate_u(TCGv ret, TCGv arg, int32_t up) { -TCGv temp = tcg_const_i32(up); -/* sat_neg = (arg > up ) ? up : arg; */ -tcg_gen_movcond_tl(TCG_COND_GTU, ret, arg, temp, temp, arg); +tcg_gen_umin_tl(ret, ret, tcg_constan

[PATCH v2 68/76] target/sparc: Drop free_compare

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Remove the g1 and g2 members of DisasCompare, as they were used to track which temps needed to be freed. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 32 1 file changed, 32 deletions(-

[PATCH v4 22/31] target/hexagon: Don't use tcg_temp_local_new_*

2023-02-27 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/README.rst | 4 ++-- target/hexagon/gen_tcg.h| 4 ++-- target/hexagon/genptr.c | 16 -

[PATCH 69/70] tcg: Drop tcg_const_*_vec

2023-02-27 Thread Richard Henderson
Replace with tcg_constant_vec*. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 4 tcg/tcg-op-vec.c | 34 ++ tcg/i386/tcg-target.c.inc | 9 - 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/include/tcg/tcg.h

[PATCH 56/70] target/tricore: Split t_n as constant from temp as variable

2023-02-27 Thread Richard Henderson
As required, allocate temp separately. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 268 +++-- 1 file changed, 140 insertions(+), 128 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 127f9a989a..194bef27

[PATCH v4 05/31] tcg: Rename TEMP_LOCAL to TEMP_TB

2023-02-27 Thread Richard Henderson
Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that now. Do not yet rename tcg_temp_local_new_*, just the enum. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PATCH v4 15/31] accel/tcg/plugin: Use tcg_temp_ebb_*

2023-02-27 Thread Richard Henderson
All of these uses have quite local scope. Avoid tcg_const_*, because we haven't added a corresponding interface for TEMP_EBB. Use explicit tcg_gen_movi_* instead. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 24 ++-- 1 fi

[PATCH v4 21/31] target/cris: Don't use tcg_temp_local_new

2023-02-27 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/cris/translate.c | 6 +++--- target/cris/translate_v10.c.inc | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/cris/transl

Re: [PATCH 2/3] qga: Add optional `merge-output` flag to guest-exec qapi

2023-02-27 Thread Marc-André Lureau
Hi On Fri, Feb 24, 2023 at 8:31 AM Daniel Xu wrote: > > Currently, the captured output (via `capture-output`) is segregated into > separate GuestExecStatus fields (`out-data` and `err-data`). This means > that downstream consumers have no way to reassemble the captured data > back into the origin

Re: [PATCH v4 23/31] target/hexagon/idef-parser: Drop gen_tmp_local

2023-02-27 Thread Philippe Mathieu-Daudé
On 27/2/23 06:36, Richard Henderson wrote: This is now equivalent to gen_tmp. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/parser-helpers.c | 24 ++--- 1 file changed, 2 insertions(+), 22 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH 13/70] target/avr: Avoid use of tcg_const_i32 throughout

2023-02-27 Thread Richard Henderson
All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- target/avr/translate.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 190d0c3f97..a6aeae6dfa 100644 --- a/ta

[PATCH v2 66/76] target/sparc: Drop get_temp_i32

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries, therefore there's no need to record temps for later freeing. Replace the few uses with tcg_temp_new_i32. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 25 - 1 file changed, 4 insertions(+), 21 d

[PATCH v4 02/31] accel/tcg: Pass max_insn to gen_intermediate_code by pointer

2023-02-27 Thread Richard Henderson
In preparation for returning the number of insns generated via the same pointer. Adjust only the prototypes so far. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/translator.h | 4 ++-- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c

[PATCH 19/70] target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op

2023-02-27 Thread Richard Henderson
We already have a temporary, res, which we can use for the intermediate shift result. Simplify the constant to -1 instead of 0xf*f. This was the last use of gen_tmp_value, so remove it. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/parser-helpers.c | 30 +++--

[PATCH v2 28/76] target/hexagon/idef-parser: Drop HexValue.is_manual

2023-02-27 Thread Richard Henderson
This field is no longer used. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/idef-parser.h| 1 - target/hexagon/idef-parser/parser-helpers.c | 15 --- target/hexagon/idef-parser/idef-parser.y| 2 -- 3 files changed, 18 deletions(-) diff --git a/target/hexa

[PATCH 23/70] target/i386: Avoid use of tcg_const_* throughout

2023-02-27 Thread Richard Henderson
All uses are strictly read-only. Most of the obviously so, as direct arguments to gen_helper_*. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 83 +++-- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/target/i386/tcg/translate.

Re: [PATCH v3 4/8] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-27 Thread Bernhard Beschow
Am 26. Februar 2023 23:37:24 UTC schrieb BALATON Zoltan : >On Sun, 26 Feb 2023, Bernhard Beschow wrote: >> Am 26. Februar 2023 22:27:50 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> On 25/2/23 19:11, BALATON Zoltan wrote: From: Bernhard Beschow The real VIA south bridges implem

[PATCH 55/70] target/sparc: Avoid tcg_const_{tl,i32}

2023-02-27 Thread Richard Henderson
All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 80 +++- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 925023adef..137bdc5159

[PATCH 08/70] target/arm: Avoid tcg_const_* in translate-mve.c

2023-02-27 Thread Richard Henderson
All uses are in the context of an accumulator conditionally having a zero input. Split the rda variable to rda_{i,o}, and set rda_i to tcg_constant_foo(0) when required. Signed-off-by: Richard Henderson --- target/arm/translate-mve.c | 54 -- 1 file changed,

[PATCH v2 61/76] target/s390x: Drop tcg_temp_free from translate.c

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 105 --- 1 file changed, 105 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 76a1233946..be

Re: [PATCH v16 08/11] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-02-27 Thread Pierre Morel
/o\ Sorry, I changed the HMP arguments in the C code from core.. to core-id.. and forgot to change them inside the hmp-command.hx file. Also I need to extend the info hotpluggable-cpus. I will provide alternate patches with these two corrections. Regards, Pierre On Wed, 2023-02-22 at 15:21

[PATCH v2 64/76] target/sh4: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 110 - 1 file changed, 110 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 23563024e0..ad6de41712 100

[PATCH v4 06/31] tcg: Use noinline for major tcg_gen_code subroutines

2023-02-27 Thread Richard Henderson
This makes it easier to assign blame with perf. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index bf2af8b0fe..7ee935701a 100644 -

[PATCH v2 48/76] target/nios2: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 140bc31017..6610e22236 100644 --- a/target/nios2

[PATCH v2 53/76] target/riscv: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Reviewed-by: Weiwei Li Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- target/riscv/translate.c | 7 --- target/riscv/insn_trans/trans_rvb.c.inc| 24 -- target/riscv/insn_trans/

Re: [PATCH v3 4/8] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-27 Thread Bernhard Beschow
Am 26. Februar 2023 23:58:32 UTC schrieb BALATON Zoltan : >On Sun, 26 Feb 2023, Bernhard Beschow wrote: >> Am 26. Februar 2023 22:27:50 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> On 25/2/23 19:11, BALATON Zoltan wrote: From: Bernhard Beschow The real VIA south bridges implem

Re: [PATCH 3/3] qga: test: Add tests for `merge-output` flag

2023-02-27 Thread Marc-André Lureau
Hi On Fri, Feb 24, 2023 at 8:31 AM Daniel Xu wrote: > > This commit adds a test to ensure `merge-output` functions as expected. > We also add a negative test to ensure we haven't regressed previous > functionality. > > Signed-off-by: Daniel Xu Please check your patch with ASAN, you have use aft

[PATCH v4 20/31] target/arm: Don't use tcg_temp_local_new_*

2023-02-27 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c b/ta

Re: [PATCH 1/2] gitlab/opensbi: Move to docker:stable

2023-02-27 Thread Thomas Huth
On 24/02/2023 22.25, Palmer Dabbelt wrote: The OpenSBI build has been using docker:19.03.1, which appears to be old enough that v2 of the manifest is no longer supported. Something has started serving us those manifests, resulting in errors along the lines of $ docker build --cache-from $I

[PATCH v2 55/76] target/s390x: Use tcg_constant_* in local contexts

2023-02-27 Thread Richard Henderson
Replace tcg_const_* with tcg_constant_* in contexts where the free to remove is nearby. Reviewed-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 410 +-- 1 file changed, 147 insertions(

[PATCH v17 08/12] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-02-27 Thread Pierre Morel
The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifiers like polarization e

[PATCH v17 12/12] machine: adding s390 topology to info hotpluggable-cpus

2023-02-27 Thread Pierre Morel
S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c ind

[PATCH v4 13/31] tcg: Use tcg_temp_ebb_new_* in tcg/

2023-02-27 Thread Richard Henderson
All of these have obvious and quite local scope. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 186 - tcg/tcg-op.c | 258 +++--- tcg/tcg.c | 2 +- 3 files change

[PATCH v4 10/31] tcg: Use tcg_constant_i32 in tcg_gen_io_start

2023-02-27 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c57204ddad..4d8b1f9ae5 10064

[PATCH v4 26/31] target/mips: Don't use tcg_temp_local_new

2023-02-27 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 57 ++-- target/mips/tcg/nanomips_translate.c.inc | 4 +- 2 files changed, 16 insertions(+), 45 deletions(-) d

[PATCH v2 65/76] target/sparc: Drop get_temp_tl

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries, therefore there's no need to record temps for later freeing. Replace the few uses with tcg_temp_new. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 53 ++-- 1 file changed, 18 inserti

[PATCH v2 47/76] target/mips: Drop tcg_temp_free from translate.c

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 537 +--- 1 file changed, 14 insertions(+), 523 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c inde

[PATCH v2 17/76] target/arm: Drop tcg_temp_free from translator.h

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/translate.h b/target/arm/translate.h index d7fdbc1e3e..3dbff87349 100644 --- a/target/arm/translate.h +++ b/targ

Re: [PATCH 29/70] target/microblaze: Avoid tcg_const_* throughout

2023-02-27 Thread Philippe Mathieu-Daudé
On 27/2/23 06:41, Richard Henderson wrote: All uses are strictly read-only. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 35 +++ 1 file changed, 15 insertions(+), 20 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v4 23/31] target/hexagon/idef-parser: Drop gen_tmp_local

2023-02-27 Thread Richard Henderson
This is now equivalent to gen_tmp. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/parser-helpers.c | 24 ++--- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/idef-parser/parser-helpers.

[PATCH v2 54/76] target/rx: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/rx/translate.c | 84 --- 1 file changed, 84 deletions(-) diff --git a/target/rx/translate.c b/target/rx/translate.c index af23876cb3..6624414739 100644

[PATCH v2 57/76] target/s390x: Use tcg_constant_i32 for fpinst_extract_m34

2023-02-27 Thread Richard Henderson
Return a constant or NULL, which means the free may be removed from all callers of fpinst_extract_m34. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 26 +- 1 file changed, 1 insertio

[PATCH v2 70/76] target/tricore: Drop tcg_temp_free

2023-02-27 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 540 + 1 file changed, 4 insertions(+), 536 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 1

  1   2   3   4   5   6   7   8   >