Re: [PATCH v6 09/12] target/hexagon: import parser for idef-parser

2021-10-18 Thread Anton Johansson via
On 9/7/21 18:08, Taylor Simpson wrote: +HexValue gen_round(Context *c, + YYLTYPE *locp, + HexValue *source, + HexValue *position) { +yyassert(c, locp, source->bit_width <= 32, + "fRNDN not implemented for bit widths > 32!");

Re: [PATCH v6 08/12] target/hexagon: import lexer for idef-parser

2021-10-18 Thread Anton Johansson via
On 9/7/21 18:08, Taylor Simpson wrote: +"fNEWREG"| +"fCAST4s"{ yylval->cast.bit_width = 32; + yylval->cast.signedness = SIGNED; + return CAST; } This doesn't look right - is fNEWREG the same as fCAST4s? We

Re: [PATCH v6 07/12] target/hexagon: prepare input for the idef-parser

2021-10-18 Thread Anton Johansson via
On 9/7/21 18:09, Taylor Simpson wrote: +#define fADDSAT64(DST, A, B)\ +__a = fCAST8u(A); \ +__b = fCAST8u(B); \ +__sum = __a + __b;

[PATCH v7 10/13] target/hexagon: import parser for idef-parser

2021-12-17 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.y| 1064 target/hexagon/idef-parser/parser-helpers.c | 2548 +++ target/hexagon/idef-parser/parser-helpers.h | 379 +++

[PATCH v7 00/13] target/hexagon: introduce idef-parser

2021-12-17 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the seventh iteration of the patchset and includes fixes suggested in previous iterations. `idef-parser` is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for

[PATCH v7 01/13] target/hexagon: update MAINTAINERS for idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson --- MAINTAINERS | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7543eb4d59..f6fbc5f664 100644 ---

[PATCH v7 13/13] gitlab-ci: do not use qemu-project Docker registry

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico This commit is necessary in order to use container built by the current run of the CI. If we don't do this, we use official containers which are not affected by the additional dependencies we're introducing. This should be considered as a temporary solution in order

[PATCH v7 06/13] target/hexagon: expose next PC in DisasContext

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v7 12/13] target/hexagon: import additional tests

2021-12-17 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo --- tests/tcg/hexagon/Makefile.target | 30 +- tests/tcg/hexagon/crt.S| 26 tests/tcg/hexagon/test_abs.S | 20 ++ tests/tcg/hexagon/test_bitcnt.S| 42

[PATCH v7 05/13] target/hexagon: introduce new helper functions

2021-12-17 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code. "Helper" can here mean two things, a helper in the QEMU sense added to `helper.h` and `op_helper.c`, but also helper functions providing a manual TCG implementation of a certain features. Signed-off-by:

[PATCH v7 08/13] target/hexagon: import flex/bison to docker files

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- .gitlab-ci.d/windows.yml | 2 ++ tests/docker/dockerfiles/alpine.docker | 2 ++ tests/docker/dockerfiles/centos8.docker

[PATCH v7 09/13] target/hexagon: import lexer for idef-parser

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.h | 259 ++ target/hexagon/idef-parser/idef-parser.lex | 571 + target/hexagon/meson.build

[PATCH v7 07/13] target/hexagon: prepare input for the idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson --- target/hexagon/gen_idef_parser_funcs.py | 123 +

[PATCH v7 02/13] target/hexagon: import README for idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create mode 100644

[PATCH v7 04/13] target/hexagon: make helper functions non-static

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some op_helper.c non-static in order to avoid having them marked as unused when using the idef-parser

[PATCH v7 03/13] target/hexagon: make slot number an unsigned

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git

[PATCH v7 11/13] target/hexagon: call idef-parser functions

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. An option is also added to fully disable the output of the idef-parser, which is useful for debugging purposes. Signed-off-by: Alessandro Di Federico

[PATCH v8 00/12] target/hexagon: introduce idef-parser

2022-02-09 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the eight iteration of the patchset and includes fixes suggested in previous iterations. `idef-parser` is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for

[PATCH v8 07/12] target/hexagon: prepare input for the idef-parser

2022-02-09 Thread Anton Johansson via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson --- target/hexagon/gen_idef_parser_funcs.py | 125 +

[PATCH v8 09/12] target/hexagon: import lexer for idef-parser

2022-02-09 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.h | 254 + target/hexagon/idef-parser/idef-parser.lex | 566 + target/hexagon/meson.build

[PATCH v8 06/12] target/hexagon: expose next PC in DisasContext

2022-02-09 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v8 03/12] target/hexagon: make slot number an unsigned

2022-02-09 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-)

[PATCH v8 01/12] target/hexagon: update MAINTAINERS for idef-parser

2022-02-09 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9814580975..1195edf040

[PATCH v8 11/12] target/hexagon: call idef-parser functions

2022-02-09 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. An option is also added to fully disable the output of the idef-parser, which is useful for debugging purposes. Signed-off-by: Alessandro Di Federico

[PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-02-09 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.y| 1039 target/hexagon/idef-parser/parser-helpers.c | 2551 +++ target/hexagon/idef-parser/parser-helpers.h | 375 +++

[PATCH v8 08/12] target/hexagon: import flex/bison to docker files

2022-02-09 Thread Anton Johansson via
Note: In this version of the patchset `tests/lcitool/libvirt-ci` points to a fork of libvirt-ci that includes flex/bison. This fork has not been merged upstream yet, and can be found at https://gitlab.com/AntonJohansson/libvirt-ci/-/tree/mapping-flex-bison This patch will have to be modified

[PATCH v8 05/12] target/hexagon: introduce new helper functions

2022-02-09 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of certain features. Signed-off-by: Alessandro Di

[PATCH v8 02/12] target/hexagon: import README for idef-parser

2022-02-09 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create

[PATCH v8 12/12] target/hexagon: import additional tests

2022-02-09 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo Signed-off-by: Anton Johansson --- tests/tcg/hexagon/Makefile.target | 28 - tests/tcg/hexagon/crt.S| 14 +++ tests/tcg/hexagon/test_abs.S | 17

[PATCH v8 04/12] target/hexagon: make helper functions non-static

2022-02-09 Thread Anton Johansson via
From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some op_helper.c non-static in order to avoid having them marked as unused when using the idef-parser

Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-12 Thread Anton Johansson via
Very nice catch, this is the bug that plagued us a few weeks ago when rebasing, it has since been fixed. Actually the `gen_set_overflow` fucntion has been removed completely as it was only called when we handled `asl/asr_r_r_sat`. Current way we handle overflow: Overflow is now only set by

Re: [PATCH 00/11] accel/tcg: Make more files target agnostic (& exec/ housekeeping)

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > While reviewing Anton/Richard series [*] it was a bit hard > for me to figure out which headers are target specific and > "taint" the source which include them, in that we can not > compile them once for all targets. > > My understanding is -all.h

Re: [PATCH 02/11] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > While these functions are not TCG specific, they are not target > specific. Move them to "exec/cpu-common.h" so their callers don't > have to be tainted as target specific. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/exec/cpu-common.h |

Re: [PATCH 03/11] accel/tcg: Restrict dump_exec_info() declaration

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > In commit 00c9a5c2c3 ("accel/tcg: Restrict 'qapi-commands-machine.h' > to system emulation") we moved the definition to accel/tcg/ which is > where this function is called. No need to expose it outside. > > Signed-off-by: Philippe Mathieu-Daudé > ---

Re: [PATCH 06/11] exec: Rename cpu.c -> cpu-target.c

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > We have exec/cpu code split in 2 files for target agnostic > ("common") and specific. Rename 'cpu.c' which is target > specific using the '-target' suffix. Update MAINTAINERS. > Remove the 's from 'cpus-common.c' to match the API cpu_foo() > functions.

Re: [PATCH 09/11] accel/tcg: Make monitor.c a target-agnostic unit

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > Move target-agnostic declarations from "internal-target.h" > to a new "internal-common.h" header. > monitor.c now don't include target specific headers and can > be compiled once in system_ss[]. > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH 11/11] accel/tcg: Make cpu-exec-common.c a target agnostic unit

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > cpu_in_serial_context() is not target specific, > move it declaration to "internal-common.h" (which > we include in the 4 source files modified). > > Remove the unused "exec/exec-all.h" header from > cpu-exec-common.c. There is no more target specific

Re: [PATCH 08/11] accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h'

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > accel/tcg/internal.h contains target specific declarations. > Unit files including it become "target tainted": they can not > be compiled as target agnostic. Rename using the '-target' > suffix to make this explicit. > > Signed-off-by: Philippe

Re: [PATCH 05/11] accel: Rename accel-common.c -> accel-target.c

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > We use the '-common.c' suffix for target agnostic units. > This file is target specific, rename it using the '-target' > suffix. > > Signed-off-by: Philippe Mathieu-Daudé > --- > accel/{accel-common.c => accel-target.c} | 0 > accel/meson.build

Re: [PATCH 01/11] exec: Make EXCP_FOO definitions target agnostic

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > The EXCP_* definitions don't need to be target specific, > move them to "exec/cpu-common.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/exec/cpu-all.h| 7 --- > include/exec/cpu-common.h | 7 +++ > 2 files changed, 7

Re: [PATCH 04/11] accel: Make accel-blocker.o target agnostic

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > accel-blocker.c is not target specific, move it to system_ss[]. > > Signed-off-by: Philippe Mathieu-Daudé > --- > accel/meson.build | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/accel/meson.build b/accel/meson.build >

Re: [PATCH 07/11] exec: Rename target specific page-vary.c -> page-vary-target.c

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > This matches the target agnostic 'page-vary-common.c' counterpart. > > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 2 +- > meson.build | 2 +- > page-vary.c => page-vary-target.c | 0 > 3

Re: [PATCH 10/11] accel/tcg: Make icount.o a target agnostic unit

2023-09-15 Thread Anton Johansson via
On 14/09/23, Philippe Mathieu-Daudé wrote: > Remove the unused "exec/exec-all.h" header. There is > no more target specific code in it: make it target > agnostic (rename using the '-common' suffix). Since > it is TCG specific, move it to accel/tcg, updating > MAINTAINERS. > > Signed-off-by:

Re: [PATCH 10/11] accel/tcg: Make icount.o a target agnostic unit

2023-09-15 Thread Anton Johansson via
On 15/09/23, Philippe Mathieu-Daudé wrote: > On 15/9/23 16:31, Anton Johansson wrote: > > On 14/09/23, Philippe Mathieu-Daudé wrote: > > > Remove the unused "exec/exec-all.h" header. There is > > > no more target specific code in it: make it target > > > agnostic (rename using the '-common'

Re: [PATCH v2 02/24] accel/tcg: Move CPUTLB definitions from cpu-defs.h

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Accept that we will consume space in CPUState for CONFIG_USER_ONLY, since we cannot test CONFIG_SOFTMMU within hw/core/cpu.h. Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 150

[PATCH 11/11] accel/tcg: move ld/st helpers to ldst_common.c.inc

2023-09-12 Thread Anton Johansson via
A large chunk of ld/st functions are moved from cputlb.c and user-exec.c to ldst_common.c.inc as their implementation is the same between both modes. Eventually, ldst_common.c.inc could be compiled into a separate target-specific compilation unit, and be linked in with the targets. Keeping

[PATCH 09/11] tcg: Update env_tlb() comments

2023-09-12 Thread Anton Johansson via
Signed-off-by: Anton Johansson --- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 0931a69448..d2f5ca5946 100644 ---

[PATCH 03/11] accel/tcg: Modify tlb_*() to use CPUState

2023-09-12 Thread Anton Johansson via
Changes tlb_*() functions to take CPUState instead of CPUArchState, as they don't require the full CPUArchState. This makes it easier to decouple target-(in)dependent code. Signed-off-by: Anton Johansson --- include/exec/cpu_ldst.h | 8 +- accel/tcg/cputlb.c | 218

[PATCH 08/11] include/exec: Remove env_tlb()

2023-09-12 Thread Anton Johansson via
The function is no longer used to access the TLB, and has been replaced by cpu_tlb(). Signed-off-by: Anton Johansson --- include/exec/cpu-all.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index b03218d7d3..ee21f94969 100644 ---

[PATCH 07/11] accel/tcg: Use CPUState in atomicity helpers

2023-09-12 Thread Anton Johansson via
Makes ldst_atomicity.c.inc almost target-independent, with the exception of TARGET_PAGE_MASK, which will be addressed in a future patch. Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c | 20 accel/tcg/user-exec.c | 16 +++ accel/tcg/ldst_atomicity.c.inc |

[PATCH 02/11] include: Introduce tlb_ptr field to CPUState

2023-09-12 Thread Anton Johansson via
Adds a CPUTLB * field to CPUState in order to access the TLB without knowledge of the ArchCPU struct layout. A cpu_tlb(CPUState *) function is added for ease of access. Signed-off-by: Anton Johansson --- include/exec/cpu-all.h | 12 include/hw/core/cpu.h | 6 ++ 2 files

[PATCH 05/11] accel/tcg: Modifies memory access functions to use CPUState

2023-09-12 Thread Anton Johansson via
do_[ld|st]*() and mmu_lookup*() are changed to use CPUState over CPUArchState, moving the target-dependence to the target-facing facing cpu_[ld|st] functions. Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c | 324 ++--- 1 file changed, 161

[PATCH 04/11] accel/tcg: Modify probe_access_internal() to use CPUState

2023-09-12 Thread Anton Johansson via
probe_access_internal() is changed to instead take the generic CPUState over CPUArchState, in order to lessen the target-specific coupling of cputlb.c. Note: probe_access*() also don't need the full CPUArchState, but aren't touched in this patch as they are target-facing. Signed-off-by: Anton

[PATCH 06/11] accel/tcg: Modify atomic_mmu_lookup() to use CPUState

2023-09-12 Thread Anton Johansson via
The goal is to (in the future) allow for per-target compilation of functions in atomic_template.h whilst atomic_mmu_lookup() and cputlb.c are compiled once-per user- or system mode. Signed-off-by: Anton Johansson --- accel/tcg/atomic_template.h | 20 accel/tcg/cputlb.c

[PATCH 10/11] accel/tcg: Unify user and softmmu do_[st|ld]*_mmu()

2023-09-12 Thread Anton Johansson via
The prototype of do_[st|ld]*_mmu() is unified between system- and user-mode allowing a large chunk of helper_[st|ld]*() and cpu_[st|ld]*() functions to be expressed in same manner between both modes. These functions will be moved to ldst_common.c.inc in a following commit. Signed-off-by: Anton

[PATCH 01/11] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA

2023-09-12 Thread Anton Johansson via
TARGET_PAGE_ENTRY_EXTRA is a macro that allows guests to specify additional fields for caching with the full TLB entry. This macro is replaced with a union in CPUTLBEntryFull, thus making CPUTLB target-agnostic at the cost of slightly inflated CPUTLBEntryFull for non-arm guests. Note, this is

[PATCH 00/11] Reduce usage of CPUArchState in cputlb.c

2023-09-12 Thread Anton Johansson via
This patchset reduces the dependence of cputlb.c on the full CPUArchState, instead replacing it with the generic CPUState. Target- facing functions such as probe_access(), cpu_ld*(), etc. are not modified in this patchset, the idea is to try and isolate all usage of CPUArchState into smaller

Re: [PATCH 05/11] accel/tcg: Modifies memory access functions to use CPUState

2023-09-13 Thread Anton Johansson via
On 9/12/23 21:34, Richard Henderson wrote: On 9/12/23 08:34, Anton Johansson wrote: do_[ld|st]*() and mmu_lookup*() are changed to use CPUState over CPUArchState, moving the target-dependence to the target-facing facing cpu_[ld|st] functions. Signed-off-by: Anton Johansson ---  

Re: [PATCH 02/11] include: Introduce tlb_ptr field to CPUState

2023-09-13 Thread Anton Johansson via
On 9/12/23 08:34, Anton Johansson wrote:   IcountDecr *icount_decr_ptr; +    struct CPUTLB *tlb_ptr; These are both in CPUNegativeOffsetState. We might as well use that pointer instead. r~ Ah, good point. -- Anton Johansson, rev.ng Labs Srl.

Re: [PATCH 03/11] accel/tcg: Modify tlb_*() to use CPUState

2023-09-13 Thread Anton Johansson via
On 9/12/23 08:34, Anton Johansson wrote: Changes tlb_*() functions to take CPUState instead of CPUArchState, as they don't require the full CPUArchState. This makes it easier to decouple target-(in)dependent code. Signed-off-by: Anton Johansson ---   include/exec/cpu_ldst.h |   8 +-  

Re: [PATCH v2 07/24] accel/tcg: Validate placement of CPUNegativeOffsetState

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Verify that the distance between CPUNegativeOffsetState and CPUArchState is no greater than any alignment requirements. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [PATCH v2 09/24] accel/tcg: Remove CPUState.icount_decr_ptr

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: We can now access icount_decr directly. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 1 - include/hw/core/cpu.h | 2 -- hw/core/cpu-common.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v2 15/24] accel/tcg: Remove env_neg()

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Replace the single use within env_tlb() and remove. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h

Re: [PATCH v2 16/24] tcg: Remove TCGContext.tlb_fast_offset

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Now that there is no padding between CPUNegativeOffsetState and CPUArchState, this value is constant across all targets. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 - accel/tcg/translate-all.c | 2 -- tcg/tcg.c

Re: [PATCH v2 13/24] accel/tcg: Replace CPUState.env_ptr with cpu_env()

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 1 - include/hw/core/cpu.h| 9 ++--- target/arm/common-semi-target.h | 2 +- accel/tcg/cpu-exec.c | 8

Re: [PATCH v2 08/24] accel/tcg: Move CPUNegativeOffsetState into CPUState

2023-09-14 Thread Anton Johansson via
On 9/14/23 04:44, Richard Henderson wrote: Retain the separate structure to emphasize its importance. Enforce CPUArchState always follows CPUState without padding. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h| 22 +- include/hw/core/cpu.h | 14

Re: [PATCH v2 22/24] accel/tcg: Remove env_tlb()

2023-09-14 Thread Anton Johansson via
On 9/14/23 17:44, Philippe Mathieu-Daudé wrote: On 14/9/23 04:44, Richard Henderson wrote: From: Anton Johansson The function is no longer used to access the TLB, and has been replaced by cpu->neg.tlb. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-9-a...@rev.ng>

Re: [RFC PATCH v3 37/78] target/hexagon: add fallthrough pseudo-keyword

2023-10-16 Thread Anton Johansson via
On 13/10/23, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > target/hexagon/idef-parser/parser-helpers.c | 5 +++-- > 1

Re: [PATCH 0/3] Hexagon (target/hexagon) Enable more short-circuit packets

2023-11-02 Thread Anton Johansson via
Hi, Taylor!:) Always nice to see your name pop up here. The patches seem to have been sent as attachments for whatever reason. / Anton

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-22 Thread Anton Johansson via
On 21/09/23, Michael Tokarev wrote: > 07.08.2023 18:56, Anton Johansson via wrote: > > This patchset replaces the remaining uses of target_ulong in the accel/ > > directory. Specifically, the address type of a few kvm/hvf functions > > is widened to vaddr, and the address t

Re: [PATCH 0/3] accel: Factor tcg_cpu_reset_hold() out of cpu-common.c

2023-09-18 Thread Anton Johansson via
On 18/09/23, Philippe Mathieu-Daudé wrote: > Hi, > > We want to have exec/ code agnostic to accelerators. > still we use various call to TCG and KVM. This series > factor the TCG code from cpu_common_reset_hold() to an > accel-specific handler within AccelOpsClass. > > Based-on:

Re: [PATCH 0/2] Fix usage of GETPC(), variable shadowing

2023-10-04 Thread Anton Johansson via
On 04/10/23, Brian Cain wrote: > Matheus' patch has previously been reviewed, but I based my -Wshadow > patch on his. So I'm submitting the series for review. > > Brian Cain (1): > target/hexagon: fix some occurrences of -Wshadow=local > > Matheus Tavares Bernardino (1): > target/hexagon:

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-25 Thread Anton Johansson via
On 23/09/23, Michael Tokarev wrote: > [Trimming Cc list] > > 22.09.2023 13:45, Anton Johansson: > > On 21/09/23, Michael Tokarev wrote: > > > > > Anton Johansson (9): > > > > accel/kvm: Widen pc/saved_insn for kvm_sw_breakpoint > > > > accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint

Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-21 Thread Anton Johansson via
-Original Message- From: Anton Johansson Sent: Thursday, April 21, 2022 6:51 AM To: Taylor Simpson ; qemu-devel@nongnu.org Cc: a...@rev.ng; Brian Cain ; Michael Lambert ; bab...@rev.ng; ni...@rev.ng; richard.hender...@linaro.org Subject: Re: [PATCH v8 10/12] target/hexagon: import

[PATCH v9 01/12] target/hexagon: update MAINTAINERS for idef-parser

2022-04-22 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 294c88ace9..d6b62ff319

[PATCH v9 08/12] target/hexagon: import flex/bison to docker files

2022-04-22 Thread Anton Johansson via
This patch points `tests/lcitool/libvirt-ci` to an upstreamed commit of `libvirt-ci` which includes flex and bison. The `lcitool/refresh` script was then ran to update the the generated docker/cirrus files. Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton

[PATCH v9 07/12] target/hexagon: prepare input for the idef-parser

2022-04-22 Thread Anton Johansson via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/gen_idef_parser_funcs.py | 128

[PATCH v9 11/12] target/hexagon: call idef-parser functions

2022-04-22 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. An option is also added to fully disable the output of the idef-parser, which is useful for debugging purposes. Signed-off-by: Alessandro Di Federico

[PATCH v9 05/12] target/hexagon: introduce new helper functions

2022-04-22 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of certain features. Signed-off-by: Alessandro Di

[PATCH v9 12/12] target/hexagon: import additional tests

2022-04-22 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- tests/tcg/hexagon/Makefile.target | 28 - tests/tcg/hexagon/crt.S| 14 +++ tests/tcg/hexagon/test_abs.S | 17

[PATCH v9 06/12] target/hexagon: expose next PC in DisasContext

2022-04-22 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v9 10/12] target/hexagon: import parser for idef-parser

2022-04-22 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.y| 961 target/hexagon/idef-parser/parser-helpers.c | 2346 +++

[PATCH v9 02/12] target/hexagon: import README for idef-parser

2022-04-22 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create

[PATCH v9 09/12] target/hexagon: import lexer for idef-parser

2022-04-22 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.h | 253 +++ target/hexagon/idef-parser/idef-parser.lex | 471 +

[PATCH v9 00/12] target/hexagon: introduce idef-parser

2022-04-22 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the ninth iteration of the patchset and includes fixes suggested in previous iterations. `idef-parser` is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for

[PATCH v9 03/12] target/hexagon: make slot number an unsigned

2022-04-22 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-)

[PATCH v9 04/12] target/hexagon: make helper functions non-static

2022-04-22 Thread Anton Johansson via
From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some op_helper.c non-static in order to avoid having them marked as unused when using the idef-parser

Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-21 Thread Anton Johansson via
Here's an updated version of `gen_set_usr_field_If` https://gitlab.com/AntonJohansson/qemu/-/blob/feature/idef-parser/target/hexagon/genptr.c#L673 If this looks alright and we have your "reviewed-by" on this patch, I'll go ahead and submit the new patchset! :) -- Anton Johansson, rev.ng Labs

Re: [PATCH v9 08/12] target/hexagon: import flex/bison to docker files

2022-05-25 Thread Anton Johansson via
On 5/25/22 18:38, Alex Bennée wrote: Richard Henderson writes: On 5/25/22 05:29, Anton Johansson wrote: For clarity's sake, here are the exact steps taken to produce this patch:     1. Update QEMU's libvirt-ci to the commit

Re: [PATCH v9 08/12] target/hexagon: import flex/bison to docker files

2022-05-25 Thread Anton Johansson via
On 5/25/22 22:16, Richard Henderson wrote: No: * one patch to update libvirt-ci and does nothing else. * one patch to update yml template. * one patch to refresh. Just like you enumerated before. r~ Ah, right! Thanks for clarifying. Should I keep all 3 patches in this series? -- Anton

[PATCH v10 00/16] target/hexagon: introduce idef-parser

2022-06-01 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the tenth iteration of the patchset and includes fixes suggested in previous iterations. idef-parser is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for

[PATCH v10 14/16] target/hexagon: import parser for idef-parser

2022-06-01 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.y| 961 target/hexagon/idef-parser/parser-helpers.c | 2346 +++

[PATCH v10 05/16] target/hexagon: introduce new helper functions

2022-06-01 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of certain features. Signed-off-by: Alessandro Di

[PATCH v10 06/16] target/hexagon: expose next PC in DisasContext

2022-06-01 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v10 11/16] target/hexagon: regenerate docker/cirrus files

2022-06-01 Thread Anton Johansson via
This patch updates the docker and cirrus files with the new packages by running tests/lcitool/refresh Signed-off-by: Anton Johansson --- .gitlab-ci.d/cirrus/freebsd-12.vars| 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars| 2 +- .gitlab-ci.d/cirrus/macos-11.vars

[PATCH v10 12/16] target/hexagon: manually add flex/bison/glib2 to remaining containers

2022-06-01 Thread Anton Johansson via
Adds our build-time dependencies to containers which build qemu-hexagon, but aren't covered by libvirt-ci. Signed-off-by: Anton Johansson --- .gitlab-ci.d/windows.yml | 6 -- tests/docker/dockerfiles/debian-riscv64-cross.docker | 3 +++

[PATCH v10 03/16] target/hexagon: make slot number an unsigned

2022-06-01 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-)

[PATCH v10 16/16] target/hexagon: import additional tests

2022-06-01 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- tests/tcg/hexagon/Makefile.target | 28 - tests/tcg/hexagon/crt.S| 14 +++ tests/tcg/hexagon/test_abs.S | 17

[PATCH v10 13/16] target/hexagon: import lexer for idef-parser

2022-06-01 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.h | 253 +++ target/hexagon/idef-parser/idef-parser.lex | 471 +

[PATCH v10 15/16] target/hexagon: call idef-parser functions

2022-06-01 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. An option is also added to fully disable the output of the idef-parser, which is useful for debugging purposes. Signed-off-by: Alessandro Di Federico

  1   2   3   4   5   >