From 425d6aba9994277da5edbf2cbd97502a107a794a Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 1 Mar 2022 09:59:00 +0100 Subject: tests/Makefile.include: Let "make clean" remove the TCG tests, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "make clean" should clear all binaries that have been built, but so far it left the TCG tests still in place. Let's make sure that they are now removed, too. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220301085900.1443232-1-thuth@redhat.com> Signed-off-by: Alex Bennée --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index b89018c..05c534e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -155,6 +155,6 @@ check-build: run-ninja check-clean: rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR) -clean: check-clean +clean: check-clean clean-tcg endif -- cgit v1.1 From 276de33f3db65199689b8748bde836e031e461c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 7 Mar 2022 18:41:59 +0000 Subject: target/i386: force maximum rounding precision for fildl[l] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The instruction description says "It is loaded without rounding errors." which implies we should have the widest rounding mode possible. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/888 Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220315121251.2280317-4-alex.bennee@linaro.org> --- target/i386/tcg/fpu_helper.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index cdd8e9f..ebf5e73 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -237,24 +237,37 @@ void helper_fldl_ST0(CPUX86State *env, uint64_t val) merge_exception_flags(env, old_flags); } +static FloatX80RoundPrec tmp_maximise_precision(float_status *st) +{ + FloatX80RoundPrec old = get_floatx80_rounding_precision(st); + set_floatx80_rounding_precision(floatx80_precision_x, st); + return old; +} + void helper_fildl_ST0(CPUX86State *env, int32_t val) { int new_fpstt; + FloatX80RoundPrec old = tmp_maximise_precision(&env->fp_status); new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt].d = int32_to_floatx80(val, &env->fp_status); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; /* validate stack entry */ + + set_floatx80_rounding_precision(old, &env->fp_status); } void helper_fildll_ST0(CPUX86State *env, int64_t val) { int new_fpstt; + FloatX80RoundPrec old = tmp_maximise_precision(&env->fp_status); new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt].d = int64_to_floatx80(val, &env->fp_status); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; /* validate stack entry */ + + set_floatx80_rounding_precision(old, &env->fp_status); } uint32_t helper_fsts_ST0(CPUX86State *env) -- cgit v1.1 From b8003f99565c9d7862938c586fecd1d9a56ee22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 11 Mar 2022 13:41:53 +0000 Subject: mailmap/gitdm: more fixes for bad tags and authors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was running some historical tags for the last 10 years and got the following warnings: git log --use-mailmap --numstat --since "June 2010" | ~/src/gitdm.git/gitdm -n -l 5 alarson@ddci.com is an author name, probably not what you want bad utf-8 ('utf-8' codec can't decode byte 0xe4 in position 552: invalid continuation byte) in patchm skipping bad utf-8 ('utf-8' codec can't decode byte 0xe4 in position 342: invalid continuation byte) in patchm skipping michael@ozlabs.org is an author name, probably not what you want Oops...funky email nicta.com.au bad utf-8 ('utf-8' codec can't decode byte 0xe9 in position 232: invalid continuation byte) in patchm skipping Oops...funky email andreas.faerber Grabbing changesets...done Processed 76422 csets from 1902 developers The following fixes try and alleviate that although I still get a warning for Aaron which I think is from 9743cd5736. Signed-off-by: Alex Bennée Message-Id: <20220315121251.2280317-6-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Acked-by: Aaron Larson Acked-by: Michael Ellerman Cc: Andreas Färber Cc: Jason Wang --- .mailmap | 6 ++++++ contrib/gitdm/aliases | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 5113f55..09dcd8c 100644 --- a/.mailmap +++ b/.mailmap @@ -28,7 +28,11 @@ Thiemo Seufer ths malc malc # Corrupted Author fields +Aaron Larson alarson@ddci.com +Andreas Färber Andreas Färber +Jason Wang Jason Wang Marek Dolata mkdolata@us.ibm.com +Michael Ellerman michael@ozlabs.org Nick Hudson hnick@vmware.com # There is also a: @@ -70,6 +74,7 @@ Yongbok Kim # Also list preferred name forms where people have changed their # git author config, or had utf8/latin1 encoding issues. Aaron Lindsay +Aaron Larson Alexey Gerasimenko Alex Chen Alex Ivanov @@ -144,6 +149,7 @@ Pan Nengyuan Pavel Dovgaluk Pavel Dovgaluk Pavel Dovgaluk +Peter Chubb Peter Crosthwaite Peter Crosthwaite Peter Crosthwaite diff --git a/contrib/gitdm/aliases b/contrib/gitdm/aliases index 4792413..e26b00a 100644 --- a/contrib/gitdm/aliases +++ b/contrib/gitdm/aliases @@ -34,8 +34,10 @@ malc@c046a42c-6fe2-441c-8c8c-71466251a162 av1474@comtv.ru # canonical emails liq3ea@163.com liq3ea@gmail.com -# some broken tags +# some broken DCO tags yuval.shaia.ml.gmail.com yuval.shaia.ml@gmail.com +jasowang jasowang@redhat.com +nicta.com.au peter.chubb@nicta.com.au # There is also a: # (no author) <(no author)@c046a42c-6fe2-441c-8c8c-71466251a162> -- cgit v1.1 From c6afd2bdfd69e9a8d2c0c7c41aac5255e34a60bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 9 Mar 2022 13:52:15 +0000 Subject: docs/devel: try and impose some organisation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have a growing set of developer docs but the index is currently in order of when stuff was added. Try and make things a bit easier to find my adding sub indexes and organising into themes. Signed-off-by: Alex Bennée Reviewed-by: Kashyap Chamarthy Message-Id: <20220315121251.2280317-7-alex.bennee@linaro.org> --- docs/devel/index-api.rst | 15 ++++++++++++++ docs/devel/index-build.rst | 19 +++++++++++++++++ docs/devel/index-internals.rst | 21 +++++++++++++++++++ docs/devel/index-process.rst | 17 ++++++++++++++++ docs/devel/index-tcg.rst | 16 +++++++++++++++ docs/devel/index.rst | 46 +++++++----------------------------------- 6 files changed, 95 insertions(+), 39 deletions(-) create mode 100644 docs/devel/index-api.rst create mode 100644 docs/devel/index-build.rst create mode 100644 docs/devel/index-internals.rst create mode 100644 docs/devel/index-process.rst create mode 100644 docs/devel/index-tcg.rst diff --git a/docs/devel/index-api.rst b/docs/devel/index-api.rst new file mode 100644 index 0000000..b749240 --- /dev/null +++ b/docs/devel/index-api.rst @@ -0,0 +1,15 @@ +Internal QEMU APIs +------------------ + +Details about how QEMU's various internal APIs. Most of these are +generated from in-code annotations to function prototypes. + +.. toctree:: + :maxdepth: 2 + :includehidden: + + bitops + loads-stores + memory + modules + ui diff --git a/docs/devel/index-build.rst b/docs/devel/index-build.rst new file mode 100644 index 0000000..d96894f --- /dev/null +++ b/docs/devel/index-build.rst @@ -0,0 +1,19 @@ +QEMU Build and Test System +-------------------------- + +Details about how QEMU's build system works and how it is integrated +into our testing infrastructure. You will need to understand some of +the basics if you are adding new files and targets to the build. + +.. toctree:: + :maxdepth: 2 + :includehidden: + + build-system + kconfig + testing + qtest + ci + qapi-code-gen + fuzzing + control-flow-integrity diff --git a/docs/devel/index-internals.rst b/docs/devel/index-internals.rst new file mode 100644 index 0000000..bb118b8 --- /dev/null +++ b/docs/devel/index-internals.rst @@ -0,0 +1,21 @@ +Internal Subsystem Information +------------------------------ + +Details about QEMU's various subsystems including how to add features to them. + +.. toctree:: + :maxdepth: 2 + :includehidden: + + qom + atomics + block-coroutine-wrapper + clocks + ebpf_rss + migration + multi-process + reset + s390-dasd-ipl + tracing + vfio-migration + writing-monitor-commands diff --git a/docs/devel/index-process.rst b/docs/devel/index-process.rst new file mode 100644 index 0000000..314e9e9 --- /dev/null +++ b/docs/devel/index-process.rst @@ -0,0 +1,17 @@ +QEMU Community Processes +------------------------ + +Notes about how to interact with the community and how and where to submit patches. + +.. toctree:: + :maxdepth: 2 + :includehidden: + + code-of-conduct + conflict-resolution + style + submitting-a-patch + trivial-patches + stable-process + submitting-a-pull-request + secure-coding-practices diff --git a/docs/devel/index-tcg.rst b/docs/devel/index-tcg.rst new file mode 100644 index 0000000..3acbd95 --- /dev/null +++ b/docs/devel/index-tcg.rst @@ -0,0 +1,16 @@ +TCG Emulation +------------- + +Details about QEMU's Tiny Code Generator and the infrastructure +associated with emulation. You do not need to worry about this if you +are only implementing things for HW accelerated hypervisors. + +.. toctree:: + :maxdepth: 2 + :includehidden: + + tcg + decodetree + multi-thread-tcg + tcg-icount + tcg-plugins diff --git a/docs/devel/index.rst b/docs/devel/index.rst index afd9375..a682070 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -7,44 +7,12 @@ You only need to read it if you are interested in reading or modifying QEMU's source code. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :includehidden: - code-of-conduct - conflict-resolution - build-system - style - kconfig - testing - fuzzing - control-flow-integrity - loads-stores - memory - migration - atomics - stable-process - ci - qtest - decodetree - secure-coding-practices - tcg - tcg-icount - tracing - multi-thread-tcg - tcg-plugins - bitops - ui - reset - s390-dasd-ipl - clocks - qom - modules - block-coroutine-wrapper - multi-process - ebpf_rss - vfio-migration - qapi-code-gen - writing-monitor-commands - trivial-patches - submitting-a-patch - submitting-a-pull-request + + index-process + index-build + index-api + index-internals + index-tcg -- cgit v1.1 From 78beee809d49adc0862c89816d72ece57c3913b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 15 Mar 2022 11:46:12 +0000 Subject: semihosting: clean up handling of expanded argv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Another cleanup patch tripped over the fact we weren't being careful in our casting. Fix the casts, allow for a non-const and switch from g_realloc to g_renew. The whole semihosting argument handling could do with some tests though. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220315121251.2280317-8-alex.bennee@linaro.org> --- semihosting/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/semihosting/config.c b/semihosting/config.c index 137171b..50d8210 100644 --- a/semihosting/config.c +++ b/semihosting/config.c @@ -51,7 +51,7 @@ typedef struct SemihostingConfig { bool enabled; SemihostingTarget target; Chardev *chardev; - const char **argv; + char **argv; int argc; const char *cmdline; /* concatenated argv */ } SemihostingConfig; @@ -98,8 +98,8 @@ static int add_semihosting_arg(void *opaque, if (strcmp(name, "arg") == 0) { s->argc++; /* one extra element as g_strjoinv() expects NULL-terminated array */ - s->argv = g_realloc(s->argv, (s->argc + 1) * sizeof(void *)); - s->argv[s->argc - 1] = val; + s->argv = g_renew(char *, s->argv, s->argc + 1); + s->argv[s->argc - 1] = g_strdup(val); s->argv[s->argc] = NULL; } return 0; -- cgit v1.1 From efd080de762220cd7e6df1c4706ed92cf0b6f219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 15 Mar 2022 11:49:13 +0000 Subject: gitlab: include new aarch32 job in custom-runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without linking it in it won't be presented on the UI. Also while doing that fix the misnamed job from 20.40 to 20.04. Fixes: cc44a16002 ("gitlab: add a new aarch32 custom runner definition") Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220315121954.2283887-1-alex.bennee@linaro.org> --- .gitlab-ci.d/custom-runners.yml | 1 + .../custom-runners/ubuntu-20.04-aarch32.yml | 23 ++++++++++++++++++++++ .../custom-runners/ubuntu-20.40-aarch32.yml | 23 ---------------------- 3 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml delete mode 100644 .gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.yml index 3e76a20..15aaccc 100644 --- a/.gitlab-ci.d/custom-runners.yml +++ b/.gitlab-ci.d/custom-runners.yml @@ -16,4 +16,5 @@ variables: include: - local: '/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml' - local: '/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml' + - local: '/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml' - local: '/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml' diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml new file mode 100644 index 0000000..9c589bc --- /dev/null +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml @@ -0,0 +1,23 @@ +# All ubuntu-20.04 jobs should run successfully in an environment +# setup by the scripts/ci/setup/qemu/build-environment.yml task +# "Install basic packages to build QEMU on Ubuntu 18.04/20.04" + +ubuntu-20.04-aarch32-all: + needs: [] + stage: build + tags: + - ubuntu_20.04 + - aarch32 + rules: + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + allow_failure: true + - if: "$AARCH32_RUNNER_AVAILABLE" + when: manual + allow_failure: true + script: + - mkdir build + - cd build + - ../configure --cross-prefix=arm-linux-gnueabihf- + - make --output-sync -j`nproc` + - make --output-sync -j`nproc` check V=1 diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml deleted file mode 100644 index 9c589bc..0000000 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml +++ /dev/null @@ -1,23 +0,0 @@ -# All ubuntu-20.04 jobs should run successfully in an environment -# setup by the scripts/ci/setup/qemu/build-environment.yml task -# "Install basic packages to build QEMU on Ubuntu 18.04/20.04" - -ubuntu-20.04-aarch32-all: - needs: [] - stage: build - tags: - - ubuntu_20.04 - - aarch32 - rules: - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' - when: manual - allow_failure: true - - if: "$AARCH32_RUNNER_AVAILABLE" - when: manual - allow_failure: true - script: - - mkdir build - - cd build - - ../configure --cross-prefix=arm-linux-gnueabihf- - - make --output-sync -j`nproc` - - make --output-sync -j`nproc` check V=1 -- cgit v1.1 From f503b7e327301e789b4d19a4bd554d02934608aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 16 Mar 2022 16:05:22 +0000 Subject: docs: remove qemu_logo.pdf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As far as I can tell nothing in the source tree uses this file. The original comment mentions texi2pdf and I think that was all culled when we switched to our rst documentation pipeline. Fixes: 4ac2ee194b ("docs/interop: Convert qemu-qmp-ref to rST") Cc: Marc-André Lureau Signed-off-by: Alex Bennée Message-Id: <20220316161038.3033723-1-alex.bennee@linaro.org> --- docs/qemu_logo.pdf | Bin 9117 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/qemu_logo.pdf diff --git a/docs/qemu_logo.pdf b/docs/qemu_logo.pdf deleted file mode 100644 index 294cb7d..0000000 Binary files a/docs/qemu_logo.pdf and /dev/null differ -- cgit v1.1 From 0f37cf2f71f764c5649e149c774172df7ab187c7 Mon Sep 17 00:00:00 2001 From: Christoph Muellner Date: Wed, 16 Mar 2022 19:14:12 +0100 Subject: docs/tcg-plugins: document QEMU_PLUGIN behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU plugins can be loaded via command line arguments or via the QEMU_PLUGIN environment variable. Currently, only the first method is documented. Let's document QEMU_PLUGIN. As drive-by cleanup, this patch fixes the path to the plugins in the same section of the documentation. Signed-off-by: Christoph Muellner Message-Id: <20220316181412.1550044-1-cmuellner@linux.com> [AJB: fixed some minor typos] Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index f93ef4f..a7cc44a 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -27,13 +27,18 @@ Once built a program can be run with multiple plugins loaded each with their own arguments:: $QEMU $OTHER_QEMU_ARGS \ - -plugin tests/plugin/libhowvec.so,inline=on,count=hint \ - -plugin tests/plugin/libhotblocks.so + -plugin contrib/plugin/libhowvec.so,inline=on,count=hint \ + -plugin contrib/plugin/libhotblocks.so Arguments are plugin specific and can be used to modify their behaviour. In this case the howvec plugin is being asked to use inline ops to count and break down the hint instructions by type. +Linux user-mode emulation also evaluates the environment variable +``QEMU_PLUGIN``:: + + QEMU_PLUGIN="file=contrib/plugins/libhowvec.so,inline=on,count=hint" $QEMU + Writing plugins --------------- -- cgit v1.1