From e8d61f7d21666a5172b8c040b897d60fb57c2ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 23 Jun 2021 11:27:42 +0100 Subject: tests/acceptance: tweak the tcg/kvm tests for virt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Really it's only TCG that can select which GIC model you want, KVM guests should always be using the "host" version of the GIC for which QEMU already provides a handy shortcut. Make the KVM test use this and split the TCG test into it's two versions. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Message-Id: <20210623102749.25686-2-alex.bennee@linaro.org> --- tests/acceptance/boot_linux.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 314370f..4c8a599 100644 --- a/tests/acceptance/boot_linux.py +++ b/tests/acceptance/boot_linux.py @@ -75,10 +75,11 @@ class BootLinuxAarch64(LinuxTest): self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0') self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom') - def test_virt_tcg(self): + def test_virt_tcg_gicv2(self): """ :avocado: tags=accel:tcg :avocado: tags=cpu:max + :avocado: tags=device:gicv2 """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") @@ -87,29 +88,28 @@ class BootLinuxAarch64(LinuxTest): self.add_common_args() self.launch_and_wait(set_up_ssh_connection=False) - def test_virt_kvm_gicv2(self): + def test_virt_tcg_gicv3(self): """ - :avocado: tags=accel:kvm - :avocado: tags=cpu:host - :avocado: tags=device:gicv2 + :avocado: tags=accel:tcg + :avocado: tags=cpu:max + :avocado: tags=device:gicv3 """ - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.vm.add_args("-cpu", "host") - self.vm.add_args("-machine", "virt,gic-version=2") + self.require_accelerator("tcg") + self.vm.add_args("-accel", "tcg") + self.vm.add_args("-cpu", "max") + self.vm.add_args("-machine", "virt,gic-version=3") self.add_common_args() self.launch_and_wait(set_up_ssh_connection=False) - def test_virt_kvm_gicv3(self): + def test_virt_kvm(self): """ :avocado: tags=accel:kvm :avocado: tags=cpu:host - :avocado: tags=device:gicv3 """ self.require_accelerator("kvm") self.vm.add_args("-accel", "kvm") self.vm.add_args("-cpu", "host") - self.vm.add_args("-machine", "virt,gic-version=3") + self.vm.add_args("-machine", "virt,gic-version=host") self.add_common_args() self.launch_and_wait(set_up_ssh_connection=False) -- cgit v1.1 From ae63ed16916304665b45759751a5062638211c14 Mon Sep 17 00:00:00 2001 From: Luis Pires Date: Wed, 23 Jun 2021 11:27:43 +0100 Subject: docs/devel: Add a single top-level header to MTTCG's doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without a single top-level header in the .rst file, the index ended up linking to all of the top-level headers separately. Now the index links to the top-level header at the beginning of the document and any inner headers are correctly linked as sub-items in the index. Signed-off-by: Luis Pires Signed-off-by: Alex Bennée Message-Id: <20210528123526.144065-1-luis.pires@eldorado.org.br> Message-Id: <20210623102749.25686-3-alex.bennee@linaro.org> --- docs/devel/multi-thread-tcg.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index 92a9eba..5b446ee 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -4,8 +4,9 @@ This work is licensed under the terms of the GNU GPL, version 2 or later. See the COPYING file in the top-level directory. -Introduction -============ +================== +Multi-threaded TCG +================== This document outlines the design for multi-threaded TCG (a.k.a MTTCG) system-mode emulation. user-mode emulation has always mirrored the -- cgit v1.1 From 66cf70149ad23ba8ea71b88d3564517c44e35630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 23 Jun 2021 11:27:44 +0100 Subject: scripts/checkpatch: roll diff tweaking into checkpatch itself MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210623102749.25686-4-alex.bennee@linaro.org> --- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml index 7e685c6..c5fa4fc 100644 --- a/.gitlab-ci.d/static_checks.yml +++ b/.gitlab-ci.d/static_checks.yml @@ -4,9 +4,6 @@ check-patch: needs: job: amd64-centos8-container script: - - git config --local diff.renamelimit 0 - - git config --local diff.renames True - - git config --local diff.algorithm histogram - .gitlab-ci.d/check-patch.py variables: GIT_DEPTH: 1000 diff --git a/.patchew.yml b/.patchew.yml index 2638b7f..1b78262 100644 --- a/.patchew.yml +++ b/.patchew.yml @@ -138,9 +138,6 @@ testing: script: | #!/bin/bash git rev-parse base > /dev/null || exit 0 - git config --local diff.renamelimit 0 - git config --local diff.renames True - git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. docker-mingw@fedora: enabled: true diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bbcd25a..cb8eff2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -399,7 +399,12 @@ if ($chk_branch) { my $num_patches = @patches; for my $hash (@patches) { my $FILE; - open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) || + open($FILE, '-|', "git", + "-c", "diff.renamelimit=0", + "-c", "diff.renames=True", + "-c", "diff.algorithm=histogram", + "show", + "--patch-with-stat", $hash) || die "$P: git show $hash - $!\n"; while (<$FILE>) { chomp; -- cgit v1.1 From f64766976d39fbf2b81a25b5c5f043180383d408 Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 23 Jun 2021 11:27:45 +0100 Subject: GitLab: Add "Bug" issue reporting template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based loosely on libvirt's template, written by Peter Krempa. Signed-off-by: John Snow Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Stefan Hajnoczi CC: Peter Krempa Message-Id: <20210607153155.1760158-2-jsnow@redhat.com> Message-Id: <20210623102749.25686-5-alex.bennee@linaro.org> --- .gitlab/issue_templates/bug.md | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .gitlab/issue_templates/bug.md diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md new file mode 100644 index 0000000..e910f7b --- /dev/null +++ b/.gitlab/issue_templates/bug.md @@ -0,0 +1,64 @@ + + +## Host environment + - Operating system: (Windows 10 21H1, Fedora 34, etc.) + - OS/kernel version: (For POSIX hosts, use `uname -a`) + - Architecture: (x86, ARM, s390x, etc.) + - QEMU flavor: (qemu-system-x86_64, qemu-aarch64, qemu-img, etc.) + - QEMU version: (e.g. `qemu-system-x86_64 --version`) + - QEMU command line: + + ``` + ./qemu-system-x86_64 -M q35 -m 4096 -enable-kvm -hda fedora32.qcow2 + ``` + +## Emulated/Virtualized environment + - Operating system: (Windows 10 21H1, Fedora 34, etc.) + - OS/kernel version: (For POSIX guests, use `uname -a`.) + - Architecture: (x86, ARM, s390x, etc.) + + +## Description of problem + + + +## Steps to reproduce +1. +2. +3. + + +## Additional information + + + + +/label ~"kind::Bug" -- cgit v1.1 From 6a9c2e07ccc3074086fb14f238b2292a20050bce Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 23 Jun 2021 11:27:46 +0100 Subject: GitLab: Add "Feature Request" issue template. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on Peter Krempa's libvirt template, feature.md. Signed-off-by: John Snow Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée CC: Peter Krempa Message-Id: <20210607153155.1760158-3-jsnow@redhat.com> Message-Id: <20210623102749.25686-6-alex.bennee@linaro.org> --- .gitlab/issue_templates/feature_request.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab/issue_templates/feature_request.md diff --git a/.gitlab/issue_templates/feature_request.md b/.gitlab/issue_templates/feature_request.md new file mode 100644 index 0000000..7de02dc --- /dev/null +++ b/.gitlab/issue_templates/feature_request.md @@ -0,0 +1,32 @@ + + +## Goal + + + +## Technical details + + + +## Additional information + + + +/label ~"kind::Feature Request" -- cgit v1.1 From f101c9fe29cfb009a7e20b68142a575b3384a4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 23 Jun 2021 11:27:47 +0100 Subject: tests/tcg: skip the signals test for hppa/s390x for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are fixes currently in flight but as this is getting in the way of a green CI we might as well skip for now. For reference the fix series are: linux-user: Move signal trampolines to new page 20210616011209.1446045-1-richard.henderson@linaro.org and linux-user: Load a vdso for x86_64 and hppa 20210619034329.532318-1-richard.henderson@linaro.org Signed-off-by: Alex Bennée Acked-by: Cornelia Huck Cc: Richard Henderson Message-Id: <20210623102749.25686-7-alex.bennee@linaro.org> --- tests/tcg/hppa/Makefile.target | 4 ++++ tests/tcg/s390x/Makefile.target | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/tcg/hppa/Makefile.target b/tests/tcg/hppa/Makefile.target index 8bf0196..7179123 100644 --- a/tests/tcg/hppa/Makefile.target +++ b/tests/tcg/hppa/Makefile.target @@ -4,3 +4,7 @@ # On parisc Linux supports 4K/16K/64K (but currently only 4k works) EXTRA_RUNS+=run-test-mmap-4096 # run-test-mmap-16384 run-test-mmap-65536 + +# There is a race that causes this to fail about 1% of the time +run-signals: signals + $(call skip-test, $<, "BROKEN awaiting vdso support") diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target index 241ef28..0036b8a 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -8,3 +8,7 @@ TESTS+=exrl-trtr TESTS+=pack TESTS+=mvo TESTS+=mvc + +# This triggers failures on s390x hosts about 4% of the time +run-signals: signals + $(call skip-test, $<, "BROKEN awaiting sigframe clean-ups") -- cgit v1.1 From 7c4ab60f18f5257d37164df0ae0951ece4425b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 23 Jun 2021 11:27:48 +0100 Subject: plugins/api: expose symbol lookup to plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a quality of life helper for plugins so they don't need to re-implement symbol lookup when dumping an address. The strings are constant so don't need to be duplicated. One minor tweak is to return NULL instead of a zero length string to show lookup failed. Signed-off-by: Alex Bennée Signed-off-by: Mahmoud Mandour Message-Id: <20210608040532.56449-2-ma.mandourr@gmail.com> Message-Id: <20210623102749.25686-8-alex.bennee@linaro.org> --- include/qemu/qemu-plugin.h | 9 +++++++++ plugins/api.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 97cdfd7..dc3496f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -526,6 +526,15 @@ qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, char *qemu_plugin_insn_disas(const struct qemu_plugin_insn *insn); /** + * qemu_plugin_insn_symbol() - best effort symbol lookup + * @insn: instruction reference + * + * Return a static string referring to the symbol. This is dependent + * on the binary QEMU is running having provided a symbol table. + */ +const char *qemu_plugin_insn_symbol(const struct qemu_plugin_insn *insn); + +/** * qemu_plugin_vcpu_for_each() - iterate over the existing vCPU * @id: plugin ID * @cb: callback function diff --git a/plugins/api.c b/plugins/api.c index 817c9b6..332e2c6 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -233,6 +233,12 @@ char *qemu_plugin_insn_disas(const struct qemu_plugin_insn *insn) return plugin_disas(cpu, insn->vaddr, insn->data->len); } +const char *qemu_plugin_insn_symbol(const struct qemu_plugin_insn *insn) +{ + const char *sym = lookup_symbol(insn->vaddr); + return sym[0] != 0 ? sym : NULL; +} + /* * The memory queries allow the plugin to query information about a * memory access. -- cgit v1.1