Re: [PATCH v2] hw/i386: fix microvm segfault with virtio cmdline

2023-02-25 Thread Michael S. Tsirkin
On Sat, Feb 25, 2023 at 04:27:57PM -0800, Daniel Hoffman wrote: > The 'microvm' machine type allows for disabling ACPI, in which case > the VirtIO device configuration is passed via appending it to the > kernel cmdline. > > If no cmdline parameter was passed, then a null pointer is dereferenced

Re: [PATCH v2 0/3] VT82xx PCI IRQ routing fixes

2023-02-25 Thread BALATON Zoltan
On Sat, 25 Feb 2023, Bernhard Beschow wrote: This series makes PCI interrupt routing in the VIA south bridges more compliant to the PCI specification. It aims to help bringing audio output support to the ppc/pegasos2 machine [1]. v2: * Remove audio patches which were included for proof of

[PATCH qemu] timer/i8254: Fix one shot PIT mode

2023-02-25 Thread Damien Zammit
Currently, the one-shot (mode 1) PIT expires far too quickly, due to the output being set under the wrong logic. This change fixes the one-shot PIT mode to behave similarly to mode 0. TESTED: using the one-shot PIT mode to calibrate a local apic timer. Signed-off-by: Damien Zammit ---

[PATCH v2] hw/i386: fix microvm segfault with virtio cmdline

2023-02-25 Thread Daniel Hoffman
The 'microvm' machine type allows for disabling ACPI, in which case the VirtIO device configuration is passed via appending it to the kernel cmdline. If no cmdline parameter was passed, then a null pointer is dereferenced when the new cmdline is copied back. A solution is to always define the

Re: [PATCH 3/5] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-02-25 Thread BALATON Zoltan
On Sat, 25 Feb 2023, Philippe Mathieu-Daudé wrote: On 21/2/23 19:44, BALATON Zoltan wrote: According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north bridge and the PINT pins of the VT8231 south bridge so guests can get interrupts from

Re: [PATCH 45/76] target/mips: Fix trans_mult_acc return

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 10:13, Richard Henderson wrote: Success from trans_* subroutines should be true. Signed-off-by: Richard Henderson --- target/mips/tcg/vr54xx_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/vr54xx_translate.c

Re: [PATCH] hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR

2023-02-25 Thread Philippe Mathieu-Daudé
+Rob On 23/2/23 17:19, Jiaxun Yang wrote: 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps") converted CFGADDR/CFGDATA registers to use PCI_HOST_BRIDGE's accessor facility and enabled byte swap for both CFGADDR/CFGDATA register. However CFGADDR as a ISD

Re: [PATCH 4/5] hw/audio/ac97: Split off some definitions to a header

2023-02-25 Thread Philippe Mathieu-Daudé
On 21/2/23 19:44, BALATON Zoltan wrote: These can be shared with other AC97 implementations. Signed-off-by: BALATON Zoltan --- hw/audio/ac97.c | 43 +--- hw/audio/ac97.h | 65 + 2 files changed, 66 insertions(+),

Re: [PATCH 3/5] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-02-25 Thread Philippe Mathieu-Daudé
On 21/2/23 19:44, BALATON Zoltan wrote: According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north bridge and the PINT pins of the VT8231 south bridge so guests can get interrupts from either of these. So far we only had the MV64361

Re: [PATCH 74/76] tracing: remove transform.py

2023-02-25 Thread Richard Henderson
On 2/25/23 00:22, Daniel Henrique Barboza wrote: Richard, Not sure if I forgot or missed something but this patch breaks my build as follows: $  make -j   GIT ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc [1/885] Generating trace/trace-hw_hyperv.c with

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-25 Thread Bernhard Beschow
Am 25. Februar 2023 13:12:05 UTC schrieb BALATON Zoltan : >On Fri, 24 Feb 2023, Bernhard Beschow wrote: >> I can only take the three VT82xx patches as I proposed since I don't know >> the Pegasos2 board as well as you do and I don't want to iterate on any >> review comments for the other

[PATCH v2 0/3] VT82xx PCI IRQ routing fixes

2023-02-25 Thread Bernhard Beschow
This series makes PCI interrupt routing in the VIA south bridges more compliant to the PCI specification. It aims to help bringing audio output support to the ppc/pegasos2 machine [1]. v2: * Remove audio patches which were included for proof of concept Testing done with via-ac97 audio patches on

[PATCH v2 2/3] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-25 Thread Bernhard Beschow
The real VIA south bridges implement a PCI IRQ router which is configured by the BIOS or the OS. In order to respect these configurations, QEMU needs to implement it as well. Note: The implementation was taken from piix4_set_irq() in hw/isa/piix4. Signed-off-by: Bernhard Beschow ---

[PATCH v2 1/3] hw/ppc/pegasos2: Initialize VT8231 PCI IRQ router

2023-02-25 Thread Bernhard Beschow
The firmware of the real PegasosII board routes all PIRQx to IRQ9, so do the same in QEMU. The PCI_INTERRUPT_LINE registers of the respective internal PCI functions are already initialized with IRQ9 which are currently used for routing. Note that the PCI interrupt router isn't implemented yet in

[PATCH v2 3/3] hw/usb/vt82c686-uhci-pci: Use PCI IRQ routing

2023-02-25 Thread Bernhard Beschow
According to the PCI specification, PCI_INTERRUPT_LINE shall have no effect on hardware operations. Now that the VIA south bridges implement the internal PCI interrupt router let's be more conformant to the PCI specification. Signed-off-by: Bernhard Beschow --- hw/usb/vt82c686-uhci-pci.c | 12

[PATCH RFC 0/4] memory: Fix (/ Discuss) a few rcu issues

2023-02-25 Thread Peter Xu
[not for merging, but for discussion; this is something I found when looking at another issue on Chuang's optimization for migration downtime] Summary: we tried to access memory_listeners, address_spaces, etc. in RCU way. However we didn't implement them with RCU-safety. This patchset is trying

[PATCH RFC 2/4] memory: Use rcu list variance for address_spaces modifications

2023-02-25 Thread Peter Xu
AddressSpace should be safe to RCU since it's released with call_rcu. Change the list insert/removal to use RCU variances. Signed-off-by: Peter Xu --- softmmu/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index

[PATCH RFC 1/4] memory: Make memory_listeners RCU-safe for real

2023-02-25 Thread Peter Xu
I think the plan was making memory_listeners rcu-safe, but maybe not really. This patch does it for real, by using RCU variances of qtailq helpers when modifying memory_listeners. The modification should be serialized by BQL, add assertions to register/unregister functions. Wait for a quiecent

[PATCH RFC 4/4] memory: Use rcu traversal in memory_region_to_address_space

2023-02-25 Thread Peter Xu
memory_region_to_address_space() is the only function that walks the address_spaces list using RCU read lock only. Use the RCU walker to reflect that. Signed-off-by: Peter Xu --- softmmu/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/memory.c

[PATCH RFC 3/4] memory: Protect memory_region_clear_dirty_bitmap with RCU

2023-02-25 Thread Peter Xu
Clear dirty bitmap operation needs to walk memory_listeners but the context may not hold BQL. These callers hold BQL for it: cpu_physical_memory_sync_dirty_bitmap dirtyrate_manual_reset_protect These callers hold RCU for it: migration_clear_memory_region_dirty_bitmap [1]

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-25 Thread Peter Xu
On Thu, Feb 23, 2023 at 11:28:46AM +0800, Chuang Xu wrote: > Hi, Peter Hi, Chuang, > > On 2023/2/22 下午11:57, Peter Xu wrote: > > On Wed, Feb 22, 2023 at 02:27:55PM +0800, Chuang Xu wrote: > > > Hi, Peter > > Hi, Chuang, > > > > > Note that as I mentioned in the comment, we temporarily replace

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-25 Thread BALATON Zoltan
On Fri, 24 Feb 2023, Bernhard Beschow wrote: I can only take the three VT82xx patches as I proposed since I don't know the Pegasos2 board as well as you do and I don't want to iterate on any review comments for the other patches. I'll send my series soonish. Does soonish means still today?

Re: [PATCH v2] hw/smbios: fix field corruption in type 4 table

2023-02-25 Thread Ani Sinha
On Thu, Feb 23, 2023 at 6:27 PM Julia Suvorova wrote: > > Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the > strings which follow immediately after the struct fields have been > overwritten by unconditional filling of later fields such as core_count2. > Make these fields

Re: [PATCH 26/76] target/cris: Drop tcg_temp_free from gen_tcg_funcs.py

2023-02-25 Thread Richard Henderson
On 2/24/23 23:13, Richard Henderson wrote: Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/hexagon/gen_tcg_funcs.py | 79 + 1 file changed, 1 insertion(+), 78 deletions(-) Bah. s/cris/hexagon/ in

[PATCH 04/76] target/arm: Remove arm_free_cc, a64_free_cc

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate.h | 1 - target/arm/translate-a64.c | 17 - target/arm/translate.c | 9 - 3 files changed, 4 insertions(+), 23 deletions(-) diff --git

[PATCH 43/76] target/mips: Drop tcg_temp_free from translate_addr_const.c

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/mips/tcg/translate_addr_const.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/target/mips/tcg/translate_addr_const.c b/target/mips/tcg/translate_addr_const.c index

[PATCH 60/76] target/s390x: Drop tcg_temp_free from translate_vx.c.inc

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate_vx.c.inc | 143 1 file changed, 143 deletions(-) diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/translate_vx.c.inc

[PATCH 76/76] docs/devel/tcg-ops: Drop recommendation to free temps

2023-02-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 4 1 file changed, 4 deletions(-) diff --git a/docs/devel/tcg-ops.rst b/docs/devel/tcg-ops.rst index 561c416574..f3f451b77f 100644 --- a/docs/devel/tcg-ops.rst +++ b/docs/devel/tcg-ops.rst @@ -951,10 +951,6 @@ Recommended coding

Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 05:59, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/tcg-op-gvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index a10d406bba..877b0b659b 100644 ---

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

2023-02-25 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

[PATCH 39/76] target/mips: Drop tcg_temp_free from msa_translate.c

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/mips/tcg/msa_translate.c | 9 - 1 file changed, 9 deletions(-) diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c index 1bcdbb1121..220cd3b048 100644 ---

[PATCH 25/76] target/cris: Drop tcg_temp_free from C code

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/hexagon/gen_tcg.h | 29 -- target/hexagon/gen_tcg_hvx.h | 15 -- target/hexagon/macros.h | 7 - target/hexagon/genptr.c | 58

[PATCH 69/76] target/sparc: Drop tcg_temp_free

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

[PATCH 08/76] target/arm: Drop new_tmp_a64

2023-02-25 Thread Richard Henderson
This is now a simple wrapper for tcg_temp_new_i64. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 - target/arm/translate-a64.c | 45 +- target/arm/translate-sve.c | 20 - 3 files changed, 30 insertions(+), 36

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

2023-02-25 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

Re: [PATCH 00/76] tcg: Drop tcg_temp_free from translators

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 10:13, Richard Henderson wrote: Based-on: 20230225085945.1798188-1-richard.hender...@linaro.org ("[PATCH v3 00/30] tcg: Simplify temporary usage") In the above patch set, we changed the lifetime of the temps allocated by the guest translators, and eliminated their reuse, so that we

[PATCH 38/76] target/mips: Drop tcg_temp_free from mips16e_translate.c.inc

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/mips/tcg/mips16e_translate.c.inc | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/mips/tcg/mips16e_translate.c.inc b/target/mips/tcg/mips16e_translate.c.inc index

Re: [PATCH 74/76] tracing: remove transform.py

2023-02-25 Thread Daniel Henrique Barboza
Richard, Not sure if I forgot or missed something but this patch breaks my build as follows: $ make -j GIT ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc [1/885] Generating trace/trace-hw_hyperv.c with a custom command FAILED: trace/trace-hw_hyperv.c

Re: [PATCH 76/76] docs/devel/tcg-ops: Drop recommendation to free temps

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 06:14, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza docs/devel/tcg-ops.rst | 4 1 file changed, 4 deletions(-) diff --git a/docs/devel/tcg-ops.rst b/docs/devel/tcg-ops.rst index 561c416574..f3f451b77f 100644 ---

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

2023-02-25 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

Re: [PATCH 74/76] tracing: remove transform.py

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 06:14, Richard Henderson wrote: This file got left behind when the tcg stuff was removed from tracetool. Fixes: 126d4123c50a ("tracing: excise the tcg related from tracetool") Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza meson.build

Re: [PATCH 74/76] tracing: remove transform.py

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 07:22, Daniel Henrique Barboza wrote: Richard, Not sure if I forgot or missed something but this patch breaks my build as follows: Nevermind, just did it again to test the powerpc changes and it worked. I probably goofed something the first time. Daniel $  make -j  

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

2023-02-25 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

[PATCH 02/76] accel/tcg: Remove translator_loop_temp_check

2023-02-25 Thread Richard Henderson
Finish removing tcg temp free accounting interfaces. Signed-off-by: Richard Henderson --- include/exec/translator.h | 2 -- accel/tcg/translator.c | 4 target/alpha/translate.c | 1 - target/arm/translate-a64.c | 2 -- target/arm/translate.c | 1 - target/ppc/translate.c | 2

[PATCH 72/76] target/xtensa: Drop tcg_temp_free

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

[PATCH 03/76] target/alpha: Drop tcg_temp_free

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 70 1 file changed, 70 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index a0afdbb465..9d25e21164

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

2023-02-25 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 ---

[PATCH 19/76] target/avr: Drop R from trans_COM

2023-02-25 Thread Richard Henderson
This variable is not used, only allocated and freed. Signed-off-by: Richard Henderson --- target/avr/translate.c | 4 1 file changed, 4 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index e7f0e2bbe3..4f8112c3e6 100644 --- a/target/avr/translate.c +++

[PATCH 31/76] target/loongarch: Drop temp_new

2023-02-25 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/loongarch/translate.h | 3 --- target/loongarch/translate.c

[PATCH 21/76] target/cris: Drop cris_alu_free_temps

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/cris/translate.c | 20 1 file changed, 20 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index a959b27373..76db745fe2 100644 ---

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

2023-02-25 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

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

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 06:14, Richard Henderson wrote: Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza target/riscv/translate.c | 7 --- target/riscv/insn_trans/trans_rvb.c.inc| 24

Re: [PATCH 52/76] target/riscv: Drop temp_new

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 06:14, Richard Henderson wrote: 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 --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 51/76] target/riscv: Drop ftemp_new

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 06:14, Richard Henderson wrote: 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_i64. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza

[PATCH 51/76] target/riscv: Drop ftemp_new

2023-02-25 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_i64. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 24 1 file changed, 4 insertions(+), 20

[PATCH 05/76] target/arm: Remove value_global from DisasCompare

2023-02-25 Thread Richard Henderson
This field was only used to avoid freeing globals. Since we no longer free any temps, this is dead. Signed-off-by: Richard Henderson --- target/arm/translate.h | 1 - target/arm/translate.c | 5 - 2 files changed, 6 deletions(-) diff --git a/target/arm/translate.h b/target/arm/translate.h

[PATCH 52/76] target/riscv: Drop temp_new

2023-02-25 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/riscv/translate.c | 30 +--

[PATCH 45/76] target/mips: Fix trans_mult_acc return

2023-02-25 Thread Richard Henderson
Success from trans_* subroutines should be true. Signed-off-by: Richard Henderson --- target/mips/tcg/vr54xx_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/vr54xx_translate.c b/target/mips/tcg/vr54xx_translate.c index 3e2c98f2c6..a7d241e4e7

[PATCH 41/76] target/mips: Drop tcg_temp_free from nanomips_translate.c.inc

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/mips/tcg/nanomips_translate.c.inc | 127 ++- 1 file changed, 10 insertions(+), 117 deletions(-) diff --git a/target/mips/tcg/nanomips_translate.c.inc

[PATCH 63/76] target/s390x: Remove g_out, g_out2, g_in1, g_in2 from DisasContext

2023-02-25 Thread Richard Henderson
These fields are no longer read, so remove them and the writes. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 17 - 1 file changed, 17 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index c431903c67..9974162527 100644

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

2023-02-25 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

[PATCH 33/76] target/m68k: Drop mark_to_release

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries, therefore there's no need to record temps for later freeing. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 55 ++--- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git

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

2023-02-25 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

Re: [PATCH v3 20/30] target/arm: Don't use tcg_temp_local_new_*

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 09:59, Richard Henderson wrote: 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

[PATCH 13/76] target/arm: Drop tcg_temp_free from translator-neon.c

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-neon.c | 131 +--- 1 file changed, 1 insertion(+), 130 deletions(-) diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c index

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

2023-02-25 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

[PATCH 12/76] target/arm: Drop tcg_temp_free from translator-mve.c

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-mve.c | 52 -- 1 file changed, 52 deletions(-) diff --git a/target/arm/translate-mve.c b/target/arm/translate-mve.c index

[PATCH 71/76] target/sparc: Drop reset_sar_tracker

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Remove sar_m32_allocated, as sar_m32 non-null is equivalent. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/target/xtensa/translate.c

Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup

2023-02-25 Thread Richard Henderson
On 2/24/23 23:53, Philippe Mathieu-Daudé wrote: On 25/2/23 09:59, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   tcg/tcg-op-gvec.c | 3 +--   1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index a10d406bba..877b0b659b 100644

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

2023-02-25 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

Re: [PATCH 1/4] apic: add support for x2APIC mode

2023-02-25 Thread Bui Quang Minh
On 2/24/23 21:29, Igor Mammedov wrote: On Tue, 21 Feb 2023 23:04:57 +0700 Bui Quang Minh wrote: This commit refactors APIC registers read/write function to support both MMIO read/write in xAPIC mode and MSR read/write in x2APIC mode. Also, support larger APIC ID, self IPI, new IPI destination

Re: [PATCH v3 10/30] tcg: Use tcg_constant_i32 in tcg_gen_io_start

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 05:59, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza 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

[PATCH 67/76] target/sparc: Remove egress label in disas_sparc_context

2023-02-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/translate.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index bdf464f802..560fb32e28 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c

Re: [PATCH v3 20/30] target/arm: Don't use tcg_temp_local_new_*

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 11:09, Richard Henderson wrote: On 2/25/23 00:05, Philippe Mathieu-Daudé wrote: On 25/2/23 09:59, Richard Henderson wrote: 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

[PATCH 27/76] target/hexagon/idef-parser: Drop tcg_temp_free

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. This removes gen_rvalue_free, gen_rvalue_free_manual and free_variables, whose only purpose was to emit tcg_temp_free. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/README.rst | 8 --

[PATCH 30/76] target/i386: Drop tcg_temp_free

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 41 target/i386/tcg/decode-new.c.inc | 15 target/i386/tcg/emit.c.inc | 6 - 3 files changed, 62

[PATCH 74/76] tracing: remove transform.py

2023-02-25 Thread Richard Henderson
This file got left behind when the tcg stuff was removed from tracetool. Fixes: 126d4123c50a ("tracing: excise the tcg related from tracetool") Signed-off-by: Richard Henderson --- meson.build| 1 - scripts/tracetool/transform.py | 168 - 2

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

2023-02-25 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 | 16 target/hexagon/idef-parser/idef-parser.y| 2 -- 3 files changed, 19 deletions(-) diff --git

[PATCH 26/76] target/cris: Drop tcg_temp_free from gen_tcg_funcs.py

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/hexagon/gen_tcg_funcs.py | 79 + 1 file changed, 1 insertion(+), 78 deletions(-) diff --git a/target/hexagon/gen_tcg_funcs.py

Re: [PATCH 00/76] tcg: Drop tcg_temp_free from translators

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 11:10, Philippe Mathieu-Daudé wrote: On 25/2/23 10:13, Richard Henderson wrote: Based-on: 20230225085945.1798188-1-richard.hender...@linaro.org ("[PATCH v3 00/30] tcg: Simplify temporary usage") In the above patch set, we changed the lifetime of the temps allocated by the guest

Re: [PATCH v3 20/30] target/arm: Don't use tcg_temp_local_new_*

2023-02-25 Thread Richard Henderson
On 2/25/23 00:05, Philippe Mathieu-Daudé wrote: On 25/2/23 09:59, Richard Henderson wrote: 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

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

2023-02-25 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

[PATCH 11/76] target/arm: Drop tcg_temp_free from translator-m-nocp.c

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/arm/translate-m-nocp.c | 20 1 file changed, 20 deletions(-) diff --git a/target/arm/translate-m-nocp.c b/target/arm/translate-m-nocp.c index 5df7d46120..9a89aab785

Re: [PATCH v3 10/30] tcg: Use tcg_constant_i32 in tcg_gen_io_start

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 09:59, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

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

2023-02-25 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 +++

[PATCH 07/76] target/arm: Drop DisasContext.tmp_a64

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries, therefore there's no need to record temps for later freeing. Signed-off-by: Richard Henderson --- target/arm/translate.h | 3 --- target/arm/translate-a64.c | 25 + 2 files changed, 1 insertion(+), 27

Re: [PATCH v3 30/30] tcg: Update docs/devel/tcg-ops.rst for temporary changes

2023-02-25 Thread Daniel Henrique Barboza
On 2/25/23 05:59, Richard Henderson wrote: Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza docs/devel/tcg-ops.rst | 230

Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup

2023-02-25 Thread Philippe Mathieu-Daudé
On 25/2/23 09:59, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index a10d406bba..877b0b659b 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@

[PATCH 24/76] target/cris: Drop tcg_temp_free

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/cris/translate.c | 70 - target/cris/translate_v10.c.inc | 41 --- 2 files changed, 111 deletions(-) diff --git

[PATCH 06/76] target/arm: Drop tcg_temp_free from translator.c

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

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

2023-02-25 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

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

2023-02-25 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

[PATCH 20/76] target/avr: Drop tcg_temp_free

2023-02-25 Thread Richard Henderson
Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson --- target/avr/translate.c | 228 - 1 file changed, 228 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 4f8112c3e6..b9506a8d86

[PATCH v6 3/5] dump: Clean included headers

2023-02-25 Thread Philippe Mathieu-Daudé
"qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Remove various unused headers. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- dump/dump-hmp-cmds.c | 2 +-

[PATCH v6 5/5] dump: Add create_win_dump() stub for non-x86 targets

2023-02-25 Thread Philippe Mathieu-Daudé
Implement the non-x86 create_win_dump(). We can remove the last TARGET_X86_64 #ifdef'ry in dump.c, which thus becomes target-independent. Update meson accordingly. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 2 --

[PATCH v6 4/5] dump: Simplify compiling win_dump.o by introducing win_dump_available()

2023-02-25 Thread Philippe Mathieu-Daudé
To make dump.c less target dependent, move the TARGET_X86_64 #ifdef'ry from dump.c to win_dump.c (introducing a win_dump_available() method there). By doing so we can build win_dump.c on any target, and simplify the meson rule. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth

[PATCH 01/76] tcg: Remove tcg_check_temp_count, tcg_clear_temp_count

2023-02-25 Thread Richard Henderson
Since all temps allocated by guest front-ends are now TEMP_TB, and we don't recycle TEMP_TB, there's no point in requiring that the front-ends free the temps at all. Begin by dropping the inner-most checks that all temps have been freed. Signed-off-by: Richard Henderson --- include/tcg/tcg.h

[PATCH v6 2/5] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size()

2023-02-25 Thread Philippe Mathieu-Daudé
TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- dump/dump.c | 3 ++-

[PATCH v6 1/5] dump: Replace tswapN() -> cpu_to_dumpN()

2023-02-25 Thread Philippe Mathieu-Daudé
All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Reported-by: Richard Henderson Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth ---

[PATCH 23/76] target/cris: Drop addr from dec10_ind_move_m_pr

2023-02-25 Thread Richard Henderson
This variable is not used, only allocated and freed. Signed-off-by: Richard Henderson --- target/cris/translate_v10.c.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/cris/translate_v10.c.inc b/target/cris/translate_v10.c.inc index 5e9d1c0fe8..4f03548365 100644

  1   2   >