1 | The following changes since commit 1b9fc6d8ba6667ceb56a3392e84656dcaed0d676: | 1 | The following changes since commit 1e62a82574fc28e64deca589a23cf55ada2e1a7d: |
---|---|---|---|
2 | 2 | ||
3 | Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2021-11-11 09:56:22 +0100) | 3 | Merge tag 'm68k-for-7.1-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-06-02 06:30:24 -0700) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20211111 | 7 | https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220602 |
8 | 8 | ||
9 | for you to fetch changes up to d58f01733b94845b0c2232018a2bedb6a2347ec5: | 9 | for you to fetch changes up to 94bcc91b2e95e02ec57ed18d5a5e7cb75aa19a50: |
10 | 10 | ||
11 | tcg/s390x: Fix tcg_out_vec_op argument type (2021-11-11 11:47:58 +0100) | 11 | tcg/aarch64: Fix illegal insn from out-of-range shli (2022-06-02 08:09:46 -0700) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | appease coverity vs extract2 | 14 | Add tcg_gen_mov_ptr. |
15 | update docs for ctpop opcodes | 15 | Fix tcg/i386 encoding of avx512 vpsraq. |
16 | tcg/s390x build fix for gcc11 | 16 | Fix tcg/aarch64 handling of out-of-range shli. |
17 | 17 | ||
18 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
19 | Miroslav Rezanina (1): | 19 | Richard Henderson (3): |
20 | tcg/s390x: Fix tcg_out_vec_op argument type | 20 | tcg: Add tcg_gen_mov_ptr |
21 | tcg/i386: Fix encoding of OPC_VPSRAQ for INDEX_op_sars_vec | ||
22 | tcg/aarch64: Fix illegal insn from out-of-range shli | ||
21 | 23 | ||
22 | Philippe Mathieu-Daudé (1): | 24 | include/tcg/tcg-op.h | 5 +++++ |
23 | tcg: Remove TCI experimental status | 25 | tcg/aarch64/tcg-target.c.inc | 2 +- |
24 | 26 | tcg/i386/tcg-target.c.inc | 2 +- | |
25 | Richard Henderson (2): | 27 | 3 files changed, 7 insertions(+), 2 deletions(-) |
26 | tcg/optimize: Add an extra cast to fold_extract2 | ||
27 | tcg: Document ctpop opcodes | ||
28 | |||
29 | docs/about/build-platforms.rst | 10 ++++++---- | ||
30 | meson.build | 4 ++-- | ||
31 | tcg/optimize.c | 2 +- | ||
32 | tcg/s390x/tcg-target.c.inc | 3 ++- | ||
33 | meson_options.txt | 2 +- | ||
34 | scripts/meson-buildoptions.sh | 3 +-- | ||
35 | tcg/README | 6 ++++++ | ||
36 | 7 files changed, 19 insertions(+), 11 deletions(-) | ||
37 | diff view generated by jsdifflib |
1 | From: Miroslav Rezanina <mrezanin@redhat.com> | 1 | Add an interface to perform moves between TCGv_ptr. |
---|---|---|---|
2 | 2 | ||
3 | Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework) | 3 | Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br> |
4 | for s390x uses pointer argument definition. | ||
5 | This fails on gcc 11 as original declaration uses array argument: | ||
6 | |||
7 | In file included from ../tcg/tcg.c:430: | ||
8 | /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=] | ||
9 | 2702 | const TCGArg *args, const int *const_args) | ||
10 | | ~~~~~~~~~~~~~~^~~~ | ||
11 | ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'} | ||
12 | 121 | const TCGArg args[TCG_MAX_OP_ARGS], | ||
13 | | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ | ||
14 | In file included from ../tcg/tcg.c:430: | ||
15 | /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=] | ||
16 | 2702 | const TCGArg *args, const int *const_args) | ||
17 | | ~~~~~~~~~~~^~~~~~~~~~ | ||
18 | ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]' | ||
19 | 122 | const int const_args[TCG_MAX_OP_ARGS]); | ||
20 | | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
21 | |||
22 | Fixing argument type to pass build. | ||
23 | |||
24 | Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> | ||
25 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
26 | Reviewed-by: Thomas Huth <thuth@redhat.com> | ||
27 | Acked-by: David Hildenbrand <david@redhat.com> | ||
28 | Message-Id: <20211027085629.240704-1-mrezanin@redhat.com> | ||
29 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 4 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
30 | --- | 5 | --- |
31 | tcg/s390x/tcg-target.c.inc | 3 ++- | 6 | include/tcg/tcg-op.h | 5 +++++ |
32 | 1 file changed, 2 insertions(+), 1 deletion(-) | 7 | 1 file changed, 5 insertions(+) |
33 | 8 | ||
34 | diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc | 9 | diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h |
35 | index XXXXXXX..XXXXXXX 100644 | 10 | index XXXXXXX..XXXXXXX 100644 |
36 | --- a/tcg/s390x/tcg-target.c.inc | 11 | --- a/include/tcg/tcg-op.h |
37 | +++ b/tcg/s390x/tcg-target.c.inc | 12 | +++ b/include/tcg/tcg-op.h |
38 | @@ -XXX,XX +XXX,XX @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, | 13 | @@ -XXX,XX +XXX,XX @@ static inline void tcg_gen_addi_ptr(TCGv_ptr r, TCGv_ptr a, intptr_t b) |
39 | 14 | glue(tcg_gen_addi_,PTR)((NAT)r, (NAT)a, b); | |
40 | static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, | 15 | } |
41 | unsigned vecl, unsigned vece, | 16 | |
42 | - const TCGArg *args, const int *const_args) | 17 | +static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_ptr s) |
43 | + const TCGArg args[TCG_MAX_OP_ARGS], | 18 | +{ |
44 | + const int const_args[TCG_MAX_OP_ARGS]) | 19 | + glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s); |
20 | +} | ||
21 | + | ||
22 | static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a, | ||
23 | intptr_t b, TCGLabel *label) | ||
45 | { | 24 | { |
46 | TCGType type = vecl + TCG_TYPE_V64; | ||
47 | TCGArg a0 = args[0], a1 = args[1], a2 = args[2]; | ||
48 | -- | 25 | -- |
49 | 2.25.1 | 26 | 2.34.1 |
50 | |||
51 | diff view generated by jsdifflib |
1 | Fixes: a768e4e99247 | 1 | We wanted the VPSRAQ variant with the scalar vector shift operand, |
---|---|---|---|
2 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658 | 2 | not the variant with an immediate operand. |
3 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 3 | |
4 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1022 | ||
5 | Fixes: 47b331b2a8da ("tcg/i386: Implement avx512 scalar shift") | ||
4 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
5 | --- | 7 | --- |
6 | tcg/README | 6 ++++++ | 8 | tcg/i386/tcg-target.c.inc | 2 +- |
7 | 1 file changed, 6 insertions(+) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
8 | 10 | ||
9 | diff --git a/tcg/README b/tcg/README | 11 | diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc |
10 | index XXXXXXX..XXXXXXX 100644 | 12 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/tcg/README | 13 | --- a/tcg/i386/tcg-target.c.inc |
12 | +++ b/tcg/README | 14 | +++ b/tcg/i386/tcg-target.c.inc |
13 | @@ -XXX,XX +XXX,XX @@ t0 = t1 ? clz(t1) : t2 | 15 | @@ -XXX,XX +XXX,XX @@ static bool tcg_target_const_match(int64_t val, TCGType type, int ct) |
14 | 16 | #define OPC_PSLLQ (0xf3 | P_EXT | P_DATA16) | |
15 | t0 = t1 ? ctz(t1) : t2 | 17 | #define OPC_PSRAW (0xe1 | P_EXT | P_DATA16) |
16 | 18 | #define OPC_PSRAD (0xe2 | P_EXT | P_DATA16) | |
17 | +* ctpop_i32/i64 t0, t1 | 19 | -#define OPC_VPSRAQ (0x72 | P_EXT | P_DATA16 | P_VEXW | P_EVEX) |
18 | + | 20 | +#define OPC_VPSRAQ (0xe2 | P_EXT | P_DATA16 | P_VEXW | P_EVEX) |
19 | +t0 = number of bits set in t1 | 21 | #define OPC_PSRLW (0xd1 | P_EXT | P_DATA16) |
20 | +With "ctpop" short for "count population", matching | 22 | #define OPC_PSRLD (0xd2 | P_EXT | P_DATA16) |
21 | +the function name used in include/qemu/host-utils.h. | 23 | #define OPC_PSRLQ (0xd3 | P_EXT | P_DATA16) |
22 | + | ||
23 | ********* Shifts/Rotates | ||
24 | |||
25 | * shl_i32/i64 t0, t1, t2 | ||
26 | -- | 24 | -- |
27 | 2.25.1 | 25 | 2.34.1 |
28 | |||
29 | diff view generated by jsdifflib |
1 | There is no bug, but silence a warning about computation | 1 | The masking in tcg_out_shl was incorrect, producing an |
---|---|---|---|
2 | in int32_t being assigned to a uint64_t. | 2 | illegal instruction, rather than merely unspecified results |
3 | for the out-of-range shift. | ||
3 | 4 | ||
4 | Reported-by: Coverity CID 1465220 | 5 | Tested-by: Joel Stanley <joel@jms.id.au> |
5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 6 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1051 |
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 7 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
7 | --- | 8 | --- |
8 | tcg/optimize.c | 2 +- | 9 | tcg/aarch64/tcg-target.c.inc | 2 +- |
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
10 | 11 | ||
11 | diff --git a/tcg/optimize.c b/tcg/optimize.c | 12 | diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc |
12 | index XXXXXXX..XXXXXXX 100644 | 13 | index XXXXXXX..XXXXXXX 100644 |
13 | --- a/tcg/optimize.c | 14 | --- a/tcg/aarch64/tcg-target.c.inc |
14 | +++ b/tcg/optimize.c | 15 | +++ b/tcg/aarch64/tcg-target.c.inc |
15 | @@ -XXX,XX +XXX,XX @@ static bool fold_extract2(OptContext *ctx, TCGOp *op) | 16 | @@ -XXX,XX +XXX,XX @@ static inline void tcg_out_shl(TCGContext *s, TCGType ext, |
16 | v2 <<= 64 - shr; | 17 | { |
17 | } else { | 18 | int bits = ext ? 64 : 32; |
18 | v1 = (uint32_t)v1 >> shr; | 19 | int max = bits - 1; |
19 | - v2 = (int32_t)v2 << (32 - shr); | 20 | - tcg_out_ubfm(s, ext, rd, rn, bits - (m & max), max - (m & max)); |
20 | + v2 = (uint64_t)((int32_t)v2 << (32 - shr)); | 21 | + tcg_out_ubfm(s, ext, rd, rn, (bits - m) & max, (max - m) & max); |
21 | } | 22 | } |
22 | return tcg_opt_gen_movi(ctx, op, op->args[0], v1 | v2); | 23 | |
23 | } | 24 | static inline void tcg_out_shr(TCGContext *s, TCGType ext, |
24 | -- | 25 | -- |
25 | 2.25.1 | 26 | 2.34.1 |
26 | |||
27 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
2 | 1 | ||
3 | The following commits (released in v6.0.0) made raised the | ||
4 | quality of the TCI backend to the other TCG architectures, | ||
5 | thus is is not considerated experimental anymore: | ||
6 | - c6fbea47664..2f74f45e32b | ||
7 | - dc09f047edd..9e9acb7b348 | ||
8 | - b6139eb0578..2fc6f16ca5e | ||
9 | - dbcbda2cd84..5e8892db93f | ||
10 | |||
11 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
12 | Message-Id: <20211106111457.517546-1-f4bug@amsat.org> | ||
13 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
14 | --- | ||
15 | docs/about/build-platforms.rst | 10 ++++++---- | ||
16 | meson.build | 4 ++-- | ||
17 | meson_options.txt | 2 +- | ||
18 | scripts/meson-buildoptions.sh | 3 +-- | ||
19 | 4 files changed, 10 insertions(+), 9 deletions(-) | ||
20 | |||
21 | diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst | ||
22 | index XXXXXXX..XXXXXXX 100644 | ||
23 | --- a/docs/about/build-platforms.rst | ||
24 | +++ b/docs/about/build-platforms.rst | ||
25 | @@ -XXX,XX +XXX,XX @@ Those hosts are officially supported, with various accelerators: | ||
26 | * - x86 | ||
27 | - hax, hvf (64 bit only), kvm, nvmm, tcg, whpx (64 bit only), xen | ||
28 | |||
29 | -Other host architectures are not supported. It is possible to build QEMU on an | ||
30 | -unsupported host architecture using the configure ``--enable-tcg-interpreter`` | ||
31 | -option to enable the experimental TCI support, but note that this is very slow | ||
32 | -and is not recommended. | ||
33 | +Other host architectures are not supported. It is possible to build QEMU system | ||
34 | +emulation on an unsupported host architecture using the configure | ||
35 | +``--enable-tcg-interpreter`` option to enable the TCI support, but note that | ||
36 | +this is very slow and is not recommended for normal use. QEMU user emulation | ||
37 | +requires host-specific support for signal handling, therefore TCI won't help | ||
38 | +on unsupported host architectures. | ||
39 | |||
40 | Non-supported architectures may be removed in the future following the | ||
41 | :ref:`deprecation process<Deprecated features>`. | ||
42 | diff --git a/meson.build b/meson.build | ||
43 | index XXXXXXX..XXXXXXX 100644 | ||
44 | --- a/meson.build | ||
45 | +++ b/meson.build | ||
46 | @@ -XXX,XX +XXX,XX @@ tcg_arch = config_host['ARCH'] | ||
47 | if not get_option('tcg').disabled() | ||
48 | if cpu not in supported_cpus | ||
49 | if get_option('tcg_interpreter') | ||
50 | - warning('Unsupported CPU @0@, will use TCG with TCI (experimental and slow)'.format(cpu)) | ||
51 | + warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu)) | ||
52 | else | ||
53 | error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu)) | ||
54 | endif | ||
55 | @@ -XXX,XX +XXX,XX @@ endif | ||
56 | summary_info += {'TCG support': config_all.has_key('CONFIG_TCG')} | ||
57 | if config_all.has_key('CONFIG_TCG') | ||
58 | if get_option('tcg_interpreter') | ||
59 | - summary_info += {'TCG backend': 'TCI (TCG with bytecode interpreter, experimental and slow)'} | ||
60 | + summary_info += {'TCG backend': 'TCI (TCG with bytecode interpreter, slow)'} | ||
61 | else | ||
62 | summary_info += {'TCG backend': 'native (@0@)'.format(cpu)} | ||
63 | endif | ||
64 | diff --git a/meson_options.txt b/meson_options.txt | ||
65 | index XXXXXXX..XXXXXXX 100644 | ||
66 | --- a/meson_options.txt | ||
67 | +++ b/meson_options.txt | ||
68 | @@ -XXX,XX +XXX,XX @@ option('xen_pci_passthrough', type: 'feature', value: 'auto', | ||
69 | option('tcg', type: 'feature', value: 'auto', | ||
70 | description: 'TCG support') | ||
71 | option('tcg_interpreter', type: 'boolean', value: false, | ||
72 | - description: 'TCG with bytecode interpreter (experimental and slow)') | ||
73 | + description: 'TCG with bytecode interpreter (slow)') | ||
74 | option('cfi', type: 'boolean', value: 'false', | ||
75 | description: 'Control-Flow Integrity (CFI)') | ||
76 | option('cfi_debug', type: 'boolean', value: 'false', | ||
77 | diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh | ||
78 | index XXXXXXX..XXXXXXX 100644 | ||
79 | --- a/scripts/meson-buildoptions.sh | ||
80 | +++ b/scripts/meson-buildoptions.sh | ||
81 | @@ -XXX,XX +XXX,XX @@ meson_options_help() { | ||
82 | printf "%s\n" ' jemalloc/system/tcmalloc)' | ||
83 | printf "%s\n" ' --enable-slirp[=CHOICE] Whether and how to find the slirp library' | ||
84 | printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)' | ||
85 | - printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (experimental and' | ||
86 | - printf "%s\n" ' slow)' | ||
87 | + printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)' | ||
88 | printf "%s\n" ' --enable-trace-backends=CHOICE' | ||
89 | printf "%s\n" ' Set available tracing backends [log] (choices:' | ||
90 | printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)' | ||
91 | -- | ||
92 | 2.25.1 | ||
93 | |||
94 | diff view generated by jsdifflib |