Skip to contentSkip to conversation

tweaks and fixes for 8.0-rc1 (tests, plugins, docs)

PATCH In review Alex Bennée 7 participants 46 messages Mar 15, 2023 – Mar 17, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover tweaks and fixes for 8.0-rc1 (tests, plugins, docs)

As usual for softfreeze I switch from my usual maintainer trees to collecting up miscellaneous fixes and tweaks as we stabilise the build. I was intending to send it as a PR but I had to squash a number of CI failures by adding stuff to:

*: Add missing includes of qemu/error-report.h *: Add missing includes of qemu/plugin.h

so I thought it was worth another spin and I can cut the PR from this if the reviews are ok.

Since v1:
- grabbed Daniel's iotest cleanup for CI
- new version of Richard's plugin fix
- a number of gitdm updates

I've left:
tests/tcg: disable pauth for aarch64 gdb tests

in for now, but I can easily drop it for the PR as it seems the consensus is there will be stable updates to gdb that no longer crash on our pauth support.

The following still need review:

- contrib/gitdm: add more individual contributors (1 acks, 1 sobs)
- tests/tcg: add some help output for running individual tests
- include/qemu: add documentation for memory callbacks
- gitlab: update centos-8-stream job
- scripts/ci: update gitlab-runner playbook to handle CentOS
- tests/docker: all add DOCKER_BUILDKIT to RUNC environment

Alex Bennée (16):
tests/docker: all add DOCKER_BUILDKIT to RUNC environment scripts/ci: add libslirp-devel to build-environment scripts/ci: update gitlab-runner playbook to handle CentOS
gitlab: update centos-8-stream job
include/qemu: add documentation for memory callbacks tests/tcg: add some help output for running individual tests tests/tcg: disable pauth for aarch64 gdb tests include/exec: fix kerneldoc definition tests/avocado: don't use tags to define drive contrib/gitdm: Add ASPEED Technology to the domain map contrib/gitdm: Add SYRMIA to the domain map contrib/gitdm: add Amazon to the domain map contrib/gitdm: add Alibaba to the domain-map contrib/gitdm: add revng to domain map contrib/gitdm: add more individual contributors contrib/gitdm: add group map for AMD

Daniel P. Berrangé (8):
iotests: explicitly pass source/build dir to 'check' command
iotests: allow test discovery before building
iotests: strip subdir path when listing tests
iotests: print TAP protocol version when reporting tests
iotests: connect stdin to /dev/null when running tests
iotests: always use a unique sub-directory per test
iotests: register each I/O test separately with meson
iotests: remove the check-block.sh script

Marcin Juszkiewicz (1):
tests/avocado: update AArch64 tests to Alpine 3.17.2

Richard Henderson (7):
tcg: Clear plugin_mem_cbs on TB exit
tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT
*: Add missing includes of qemu/error-report.h
*: Add missing includes of qemu/plugin.h include/qemu: Split out plugin-event.h include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers

 include/exec/memory.h                         |  2 +-
 include/hw/core/cpu.h                         |  2 +-
 include/qemu/plugin-event.h                   | 26 ++++++++
 include/qemu/plugin.h                         | 27 ++-------
 include/qemu/qemu-plugin.h                    | 47 +++++++++++++--
 include/user/syscall-trace.h                  |  1 +
 accel/accel-softmmu.c                         |  2 +-
 accel/tcg/cpu-exec-common.c                   |  3 +
 accel/tcg/cpu-exec.c                          |  5 +-
 block/monitor/block-hmp-cmds.c                |  1 +
 cpu.c                                         |  1 +
 dump/dump.c                                   |  1 +
 dump/win_dump.c                               |  1 +
 gdbstub/gdbstub.c                             |  1 +
 hw/arm/collie.c                               |  2 +
 hw/arm/cubieboard.c                           |  1 +
 hw/arm/musicpal.c                             |  2 +
 hw/arm/npcm7xx_boards.c                       |  2 +
 hw/arm/nseries.c                              |  2 +
 hw/arm/omap_sx1.c                             |  2 +
 hw/arm/orangepi.c                             |  1 +
 hw/arm/palm.c                                 |  2 +
 hw/core/loader.c                              |  1 +
 hw/core/machine-smp.c                         |  2 +
 hw/i386/kvm/xen_xenstore.c                    |  1 +
 hw/i386/sgx.c                                 |  1 +
 hw/intc/apic.c                                |  1 +
 hw/loongarch/acpi-build.c                     |  1 +
 hw/loongarch/virt.c                           |  2 +
 hw/m68k/next-cube.c                           |  1 +
 hw/m68k/q800.c                                |  1 +
 hw/m68k/virt.c                                |  1 +
 hw/mem/memory-device.c                        |  1 +
 hw/mem/sparse-mem.c                           |  1 +
 hw/openrisc/boot.c                            |  1 +
 hw/ppc/spapr_softmmu.c                        |  2 +
 hw/riscv/opentitan.c                          |  1 +
 hw/riscv/shakti_c.c                           |  1 +
 hw/riscv/virt-acpi-build.c                    |  1 +
 hw/vfio/display.c                             |  1 +
 hw/vfio/igd.c                                 |  1 +
 hw/vfio/migration.c                           |  1 +
 linux-user/elfload.c                          |  1 +
 linux-user/exit.c                             |  1 +
 linux-user/syscall.c                          |  1 +
 migration/dirtyrate.c                         |  1 +
 migration/exec.c                              |  1 +
 plugins/core.c                                | 11 ----
 target/i386/cpu.c                             |  1 +
 target/i386/host-cpu.c                        |  1 +
 target/i386/sev.c                             |  1 +
 target/i386/whpx/whpx-apic.c                  |  1 +
 target/mips/cpu.c                             |  1 +
 target/s390x/cpu-sysemu.c                     |  1 +
 target/s390x/cpu_models.c                     |  1 +
 target/s390x/diag.c                           |  2 +
 tcg/tcg-op.c                                  |  1 -
 .../custom-runners/centos-stream-8-x86_64.yml | 18 ++----
 contrib/gitdm/domain-map                      |  7 ++-
 contrib/gitdm/group-map-alibaba               |  7 +++
 contrib/gitdm/group-map-amd                   |  8 +++
 contrib/gitdm/group-map-individuals           |  1 +
 gitdm.config                                  |  2 +
 .../org.centos/stream/8/build-environment.yml |  1 +
 scripts/ci/setup/gitlab-runner.yml            | 20 ++++++-
 tests/avocado/machine_aarch64_virt.py         |  8 +--
 tests/avocado/tuxrun_baselines.py             | 60 ++++++++-----------
 tests/check-block.sh                          | 43 -------------
 tests/docker/Makefile.include                 |  2 +-
 tests/qemu-iotests/check                      | 30 ++++++++--
 tests/qemu-iotests/meson.build                | 35 +++++++++--
 tests/qemu-iotests/testenv.py                 | 20 +++----
 tests/qemu-iotests/testrunner.py              | 43 ++++---------
 tests/tcg/Makefile.target                     |  7 +++
 tests/tcg/aarch64/Makefile.target             |  2 +
 ui/cocoa.m                                    |  1 +
 76 files changed, 305 insertions(+), 193 deletions(-)
 create mode 100644 include/qemu/plugin-event.h
 create mode 100644 contrib/gitdm/group-map-alibaba
 create mode 100644 contrib/gitdm/group-map-amd
 delete mode 100755 tests/check-block.sh
Signature · 1 line
2.39.2
#1 lore raw

PATCH v2 1/32 tests/avocado: update AArch64 tests to Alpine 3.17.2

From: Marcin Juszkiewicz <[email protected]>

To test Alpine boot on SBSA-Ref target we need Alpine Linux 'standard' image as 'virt' one lacks kernel modules.

So to minimalize Avocado cache I move test to 'standard' image.

Message-Id: <[email protected]>
Message-Id: <[email protected]>

---
 tests/avocado/machine_aarch64_virt.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/avocado/machine_aarch64_virt.py +4 -4
index 25dab8dc00..a90dc6ff4b 100644
@@ -38,11 +38,11 @@ def test_alpine_virt_tcg_gic_max(self):
         :avocado: tags=accel:tcg
         """
         iso_url = ('https://dl-cdn.alpinelinux.org/'
-                   'alpine/v3.16/releases/aarch64/'
-                   'alpine-virt-3.16.3-aarch64.iso')
+                   'alpine/v3.17/releases/aarch64/'
+                   'alpine-standard-3.17.2-aarch64.iso')
 
         # Alpine use sha256 so I recalculated this myself
-        iso_sha1 = '0683bc089486d55c91bf6607d5ecb93925769bc0'
+        iso_sha1 = '76284fcd7b41fe899b0c2375ceb8470803eea839'
         iso_path = self.fetch_asset(iso_url, asset_hash=iso_sha1)
 
         self.vm.set_console()
@@ -65,7 +65,7 @@ def test_alpine_virt_tcg_gic_max(self):
         self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom')
 
         self.vm.launch()
-        self.wait_for_console_pattern('Welcome to Alpine Linux 3.16')
+        self.wait_for_console_pattern('Welcome to Alpine Linux 3.17')
 
 
     def common_aarch64_virt(self, machine):
Signature · 1 line
2.39.2
#2 lore raw

PATCH v2 2/32 tests/docker: all add DOCKER_BUILDKIT to RUNC environment

In reply to Alex Bennée

It seems we also need to pass DOCKER_BUILDKIT as an argument to docker itself to get the full benefit of caching.

---
 tests/docker/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
index 54ed77f671..9401525325 100644
@@ -39,7 +39,7 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
 # General rule for building docker images.
 docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 	  $(call quiet-command,			\
-		$(RUNC) build				\
+		DOCKER_BUILDKIT=1 $(RUNC) build		\
 		$(if $V,,--quiet)			\
 		$(if $(NOCACHE),--no-cache,		\
 			$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
Signature · 1 line
2.39.2
Tested-by on v2 2/32
#3 lore raw

Re: [PATCH v2 02/32] tests/docker: all add DOCKER_BUILDKIT to RUNC environment

Quoted 8 lines · Alex Bennée

It seems we also need to pass DOCKER_BUILDKIT as an argument to docker itself to get the full benefit of caching.

---
  tests/docker/Makefile.include | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

Quoted 14 lines
tests/docker/Makefile.include +1 -1
index 54ed77f671..9401525325 100644
@@ -39,7 +39,7 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
  # General rule for building docker images.
  docker-image-%: $(DOCKER_FILES_DIR)/%.docker
  	  $(call quiet-command,			\
-		$(RUNC) build				\
+		DOCKER_BUILDKIT=1 $(RUNC) build		\
  		$(if $V,,--quiet)			\
  		$(if $(NOCACHE),--no-cache,		\
  			$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
Reviewed-by on v2 2/32
#4 lore raw

Re: [PATCH v2 02/32] tests/docker: all add DOCKER_BUILDKIT to RUNC environment

In reply to Alex Bennée
Quoted 14 lines · Alex Bennée

It seems we also need to pass DOCKER_BUILDKIT as an argument to docker itself to get the full benefit of caching.

---
  tests/docker/Makefile.include | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +0 -0
index 54ed77f671..9401525325 100644

tests/docker/Makefile.include docker-qemu-src: $(DOCKER_SRC_COPY) · line 45

Quoted 8 lines
tests/docker/Makefile.include +1 -1
@@ -39,7 +39,7 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
  # General rule for building docker images.
  docker-image-%: $(DOCKER_FILES_DIR)/%.docker
  	  $(call quiet-command,			\
-		$(RUNC) build				\
+		DOCKER_BUILDKIT=1 $(RUNC) build		\
  		$(if $V,,--quiet)			\
  		$(if $(NOCACHE),--no-cache,		\
  			$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
#5 lore raw

PATCH v2 3/32 scripts/ci: add libslirp-devel to build-environment

In reply to Alex Bennée

Without libslip enabled we won't have user networking which means the KVM tests won't run.

---
 scripts/ci/org.centos/stream/8/build-environment.yml | 1 +
 1 file changed, 1 insertion(+)
scripts/ci/org.centos/stream/8/build-environment.yml +1 -0
index 0d094d70c3..1ead77e2cb 100644
@@ -55,6 +55,7 @@
           - librados-devel
           - librbd-devel
           - libseccomp-devel
+          - libslirp-devel
           - libssh-devel
           - libxkbcommon-devel
           - lzo-devel
Signature · 1 line
2.39.2
#6 lore raw

PATCH v2 4/32 scripts/ci: update gitlab-runner playbook to handle CentOS

In reply to Alex Bennée

This was broken when we moved to using the pre-built packages as we didn't take care to ensure we used RPMs where required.

NB: I could never get this to complete on my test setup but I suspect this was down to network connectivity and timeouts while downloading.

Fixes 69c4befba1 (scripts/ci: update gitlab-runner playbook to use latest runner)
---
 scripts/ci/setup/gitlab-runner.yml | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
scripts/ci/setup/gitlab-runner.yml +18 -2
index 95d4199c03..1a1b270ff2 100644
@@ -48,13 +48,29 @@
     - debug:
         msg: gitlab-runner arch is {{ gitlab_runner_arch }}
 
-    - name: Download the matching gitlab-runner
+    - name: Download the matching gitlab-runner (DEB)
       get_url:
         dest: "/root/"
         url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{ gitlab_runner_arch }}.deb"
+      when:
+        - ansible_facts['distribution'] == 'Ubuntu'
+
+    - name: Download the matching gitlab-runner (RPM)
+      get_url:
+        dest: "/root/"
+        url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
+      when:
+        - ansible_facts['distribution'] == 'CentOS'
 
-    - name: Install gitlab-runner via package manager
+    - name: Install gitlab-runner via package manager (DEB)
       apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb"
+      when:
+        - ansible_facts['distribution'] == 'Ubuntu'
+
+    - name: Install gitlab-runner via package manager (RPM)
+      yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
+      when:
+        - ansible_facts['distribution'] == 'CentOS'
 
     - name: Register the gitlab-runner
       command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list {{ ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"
Signature · 1 line
2.39.2
#7 lore raw

PATCH v2 5/32 gitlab: update centos-8-stream job

In reply to Alex Bennée

A couple of clean-ups here:

- inherit from the custom runners job for artefacts
- call check-avocado directly
- add some comments to the top about setup

---
 .../custom-runners/centos-stream-8-x86_64.yml  | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml +6 -12
index 068b0c4335..367424db78 100644
@@ -1,4 +1,9 @@
+# All centos-stream-8 jobs should run successfully in an environment
+# setup by the scripts/ci/setup/stream/8/build-environment.yml task
+# "Installation of extra packages to build QEMU"
+
 centos-stream-8-x86_64:
+ extends: .custom_runner_template
  allow_failure: true
  needs: []
  stage: build
@@ -8,15 +13,6 @@ centos-stream-8-x86_64:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
  - if: "$CENTOS_STREAM_8_x86_64_RUNNER_AVAILABLE"
- artifacts:
-   name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
-   when: on_failure
-   expire_in: 7 days
-   paths:
-     - build/tests/results/latest/results.xml
-     - build/tests/results/latest/test-results
-   reports:
-     junit: build/tests/results/latest/results.xml
  before_script:
  - JOBS=$(expr $(nproc) + 1)
  script:
@@ -25,6 +21,4 @@ centos-stream-8-x86_64:
  - ../scripts/ci/org.centos/stream/8/x86_64/configure
    || { cat config.log meson-logs/meson-log.txt; exit 1; }
  - make -j"$JOBS"
- - make NINJA=":" check
-   || { cat meson-logs/testlog.txt; exit 1; } ;
- - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado
+ - make NINJA=":" check check-avocado
Signature · 1 line
2.39.2
Reviewed-by on v2 5/32
#8 lore raw

Re: [PATCH v2 05/32] gitlab: update centos-8-stream job

Quoted 3 lines · Alex Bennée

A couple of clean-ups here:

- inherit from the custom runners job for artefacts

I know, it's a difference between BE and AE, but in case you want to be consistent with the yml: s/artefacts/artifacts/

Quoted 7 lines

- call check-avocado directly
- add some comments to the top about setup

---
  .../custom-runners/centos-stream-8-x86_64.yml  | 18 ++++++------------
  1 file changed, 6 insertions(+), 12 deletions(-)
#9 lore raw

PATCH v2 6/32 include/qemu: add documentation for memory callbacks

In reply to Alex Bennée

Some API documentation was missed, rectify that.

---
 include/qemu/qemu-plugin.h | 47 ++++++++++++++++++++++++++++++++++----
 1 file changed, 43 insertions(+), 4 deletions(-)
include/qemu/qemu-plugin.h +43 -4
index d0e9d03adf..50a9957279 100644
@@ -481,17 +481,56 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr);
  */
 const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h);
 
-typedef void
-(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index,
-                             qemu_plugin_meminfo_t info, uint64_t vaddr,
-                             void *userdata);
+/**
+ * typedef qemu_plugin_vcpu_mem_cb_t - memory callback function type
+ * @vcpu_index: the executing vCPU
+ * @info: an opaque handle for further queries about the memory
+ * @vaddr: the virtual address of the transaction
+ * @userdata: any user data attached to the callback
+ */
+typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int vcpu_index,
+                                           qemu_plugin_meminfo_t info,
+                                           uint64_t vaddr,
+                                           void *userdata);
 
+/**
+ * qemu_plugin_register_vcpu_mem_cb() - register memory access callback
+ * @insn: handle for instruction to instrument
+ * @cb: callback of type qemu_plugin_vcpu_mem_cb_t
+ * @flags: (currently unused) callback flags
+ * @rw: monitor reads, writes or both
+ * @userdata: opaque pointer for userdata
+ *
+ * This registers a full callback for every memory access generated by
+ * an instruction. If the instruction doesn't access memory no
+ * callback will be made.
+ *
+ * The callback reports the vCPU the access took place on, the virtual
+ * address of the access and a handle for further queries. The user
+ * can attach some userdata to the callback for additional purposes.
+ *
+ * Other execution threads will continue to execute during the
+ * callback so the plugin is responsible for ensuring it doesn't get
+ * confused by making appropriate use of locking if required.
+ */
 void qemu_plugin_register_vcpu_mem_cb(struct qemu_plugin_insn *insn,
                                       qemu_plugin_vcpu_mem_cb_t cb,
                                       enum qemu_plugin_cb_flags flags,
                                       enum qemu_plugin_mem_rw rw,
                                       void *userdata);
 
+/**
+ * qemu_plugin_register_vcpu_mem_inline() - register an inline op to any memory access
+ * @insn: handle for instruction to instrument
+ * @rw: apply to reads, writes or both
+ * @op: the op, of type qemu_plugin_op
+ * @ptr: pointer memory for the op
+ * @imm: immediate data for @op
+ *
+ * This registers a inline op every memory access generated by the
+ * instruction. This provides for a lightweight but not thread-safe
+ * way of counting the number of operations done.
+ */
 void qemu_plugin_register_vcpu_mem_inline(struct qemu_plugin_insn *insn,
                                           enum qemu_plugin_mem_rw rw,
                                           enum qemu_plugin_op op, void *ptr,
Signature · 1 line
2.39.2
Reviewed-by on v2 6/32
#10 lore raw

Re: [PATCH v2 06/32] include/qemu: add documentation for memory callbacks

Quoted 7 lines · Alex Bennée

Some API documentation was missed, rectify that.

---
  include/qemu/qemu-plugin.h | 47 ++++++++++++++++++++++++++++++++++----
  1 file changed, 43 insertions(+), 4 deletions(-)

r~

Reviewed-by on v2 6/32
#11 lore raw

Re: [PATCH v2 06/32] include/qemu: add documentation for memory callbacks

In reply to Alex Bennée
Quoted 7 lines · Alex Bennée

Some API documentation was missed, rectify that.

---
  include/qemu/qemu-plugin.h | 47 ++++++++++++++++++++++++++++++++++----
  1 file changed, 43 insertions(+), 4 deletions(-)
#12 lore raw

PATCH v2 7/32 tests/tcg: add some help output for running individual tests

In reply to Alex Bennée

So you can do:

cd tests/tcg/aarch64-linux-user
make -f ../Makefile.target help

To see the list of tests. You can then run each one individually.

---
 tests/tcg/Makefile.target | 7 +++++++
 1 file changed, 7 insertions(+)
tests/tcg/Makefile.target +7 -0
index a3b0aaf8af..8318caf924 100644
@@ -201,3 +201,10 @@ clean:
 
 distclean:
 	rm -f config-cc.mak config-target.mak ../config-$(TARGET).mak
+
+.PHONY: help
+help:
+	@echo "TCG tests help $(TARGET_NAME)"
+	@echo "Built with $(CC)"
+	@echo "Available tests:"
+	@$(foreach t,$(RUN_TESTS),echo "  $t";)
Signature · 1 line
2.39.2
Acked-by on v2 7/32
#13 lore raw

Re: [PATCH v2 07/32] tests/tcg: add some help output for running individual tests

Quoted 11 lines · Alex Bennée

So you can do:

cd tests/tcg/aarch64-linux-user
make -f ../Makefile.target help

To see the list of tests. You can then run each one individually.

---
  tests/tcg/Makefile.target | 7 +++++++
  1 file changed, 7 insertions(+)

r~

Reviewed-by on v2 7/32
#14 lore raw

Re: [PATCH v2 07/32] tests/tcg: add some help output for running individual tests

In reply to Alex Bennée
Quoted 17 lines · Alex Bennée

So you can do:

cd tests/tcg/aarch64-linux-user
make -f ../Makefile.target help

To see the list of tests. You can then run each one individually.

---
  tests/tcg/Makefile.target | 7 +++++++
  1 file changed, 7 insertions(+)
tests/tcg/Makefile.target +0 -0
index a3b0aaf8af..8318caf924 100644

tests/tcg/Makefile.target clean: · line 210

Quoted 10 lines
tests/tcg/Makefile.target +7 -0
@@ -201,3 +201,10 @@ clean:
 
  distclean:
  	rm -f config-cc.mak config-target.mak ../config-$(TARGET).mak
+
+.PHONY: help
+help:
+	@echo "TCG tests help $(TARGET_NAME)"
+	@echo "Built with $(CC)"
+	@echo "Available tests:"
+	@$(foreach t,$(RUN_TESTS),echo "  $t";)
#15 lore raw

PATCH v2 8/32 tests/tcg: disable pauth for aarch64 gdb tests

In reply to Alex Bennée

You need a very new gdb to be able to run with pauth support otherwise your likely to hit asserts and aborts. Disable pauth for now until we can properly probe support in gdb.

Message-Id: <[email protected]>

---
 tests/tcg/aarch64/Makefile.target | 2 ++
 1 file changed, 2 insertions(+)
tests/tcg/aarch64/Makefile.target +2 -0
index 9e91a20b0d..8ffde3b0ed 100644
@@ -84,6 +84,8 @@ TESTS += sha512-vector
 ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
+run-gdbstub-%: QEMU_OPTS=-cpu max,pauth=off
+
 run-gdbstub-sysregs: sysregs
 	$(call run-test, $@, $(GDB_SCRIPT) \
 		--gdb $(HAVE_GDB_BIN) \
Signature · 1 line
2.39.2
#16 lore raw

PATCH v2 9/32 include/exec: fix kerneldoc definition

In reply to Alex Bennée

The kerneldoc processor complains about the mismatched variable name. Fix it.

Message-Id: <[email protected]>

---
 include/exec/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/memory.h +1 -1
index 6fa0b071f0..15ade918ba 100644
@@ -1738,7 +1738,7 @@ void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
  *
  * @notifier: the notifier to be notified
  */
-void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *n);
+void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier);
 
 
 /**
Signature · 1 line
2.39.2
Reviewed-by on v2 9/32
#17 lore raw

Re: [PATCH v2 09/32] include/exec: fix kerneldoc definition

Quoted 9 lines · Alex Bennée

The kerneldoc processor complains about the mismatched variable name. Fix it.

Message-Id:<[email protected]>

---
  include/exec/memory.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

#19 lore raw

PATCH v2 10/32 tests/avocado: don't use tags to define drive

In reply to Alex Bennée

We are abusing the avocado tags which are intended to provide test selection metadata to provide parameters to our test. This works OK up until the point you need to have ,'s in the field as this is the tag separator character which is the case for a number of the drive parameters. Fix this by making drive a parameter to the common helper function.

Fixes 267fe57c23 (tests: add tuxrun baseline test to avocado)

Message-Id: <[email protected]>

---
 tests/avocado/tuxrun_baselines.py | 60 +++++++++++++------------------
 1 file changed, 24 insertions(+), 36 deletions(-)
tests/avocado/tuxrun_baselines.py +24 -36
index 30aaefc1d3..c3fb67f5dc 100644
@@ -67,9 +67,6 @@ def setUp(self):
         # The name of the kernel Image file
         self.image = self.get_tag('image', "Image")
 
-        # The block device drive type
-        self.drive = self.get_tag('drive', "virtio-blk-device")
-
         self.root = self.get_tag('root', "vda")
 
         # Occasionally we need extra devices to hook things up
@@ -99,7 +96,7 @@ def fetch_tuxrun_assets(self, dt=None):
 
         return (kernel_image, self.workdir + "/rootfs.ext4", dtb)
 
-    def prepare_run(self, kernel, disk, dtb=None, console_index=0):
+    def prepare_run(self, kernel, disk, drive, dtb=None, console_index=0):
         """
         Setup to run and add the common parameters to the system
         """
@@ -121,10 +118,8 @@ def prepare_run(self, kernel, disk, dtb=None, console_index=0):
         if self.extradev:
             self.vm.add_args('-device', self.extradev)
 
-        # Some machines already define a drive device
-        if self.drive != "none":
-            self.vm.add_args('-device',
-                             f"{self.drive},drive=hd0")
+        self.vm.add_args('-device',
+                         f"{drive},drive=hd0")
 
         # Some machines need an explicit DTB
         if dtb:
@@ -154,7 +149,9 @@ def run_tuxtest_tests(self, haltmsg):
         else:
             self.vm.wait()
 
-    def common_tuxrun(self, dt=None, haltmsg="reboot: System halted",
+    def common_tuxrun(self, dt=None,
+                      drive="virtio-blk-device",
+                      haltmsg="reboot: System halted",
                       console_index=0):
         """
         Common path for LKFT tests. Unless we need to do something
@@ -163,7 +160,7 @@ def common_tuxrun(self, dt=None, haltmsg="reboot: System halted",
         """
         (kernel, disk, dtb) = self.fetch_tuxrun_assets(dt)
 
-        self.prepare_run(kernel, disk, dtb, console_index)
+        self.prepare_run(kernel, disk, drive, dtb, console_index)
         self.vm.launch()
         self.run_tuxtest_tests(haltmsg)
 
@@ -206,11 +203,11 @@ def test_armv5(self):
         :avocado: tags=machine:versatilepb
         :avocado: tags=tuxboot:armv5
         :avocado: tags=image:zImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=console:ttyAMA0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun(dt="versatile-pb.dtb")
+        self.common_tuxrun(drive="virtio-blk-pci",
+                           dt="versatile-pb.dtb")
 
     def test_armv7(self):
         """
@@ -244,10 +241,9 @@ def test_i386(self):
         :avocado: tags=machine:q35
         :avocado: tags=tuxboot:i386
         :avocado: tags=image:bzImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="virtio-blk-pci")
 
     def test_mips32(self):
         """
@@ -257,11 +253,10 @@ def test_mips32(self):
         :avocado: tags=endian:big
         :avocado: tags=tuxboot:mips32
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_mips32el(self):
         """
@@ -270,11 +265,10 @@ def test_mips32el(self):
         :avocado: tags=cpu:mips32r6-generic
         :avocado: tags=tuxboot:mips32el
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     @skip("QEMU currently broken") # regression against stable QEMU
     def test_mips64(self):
@@ -284,11 +278,10 @@ def test_mips64(self):
         :avocado: tags=tuxboot:mips64
         :avocado: tags=endian:big
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_mips64el(self):
         """
@@ -296,11 +289,10 @@ def test_mips64el(self):
         :avocado: tags=machine:malta
         :avocado: tags=tuxboot:mips64el
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_ppc32(self):
         """
@@ -309,10 +301,9 @@ def test_ppc32(self):
         :avocado: tags=cpu:e500mc
         :avocado: tags=tuxboot:ppc32
         :avocado: tags=image:uImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="virtio-blk-pci")
 
     def test_ppc64(self):
         """
@@ -324,10 +315,9 @@ def test_ppc64(self):
         :avocado: tags=tuxboot:ppc64
         :avocado: tags=image:vmlinux
         :avocado: tags=extradev:driver=spapr-vscsi
-        :avocado: tags=drive:scsi-hd
         :avocado: tags=root:sda
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="scsi-hd")
 
     def test_ppc64le(self):
         """
@@ -338,10 +328,9 @@ def test_ppc64le(self):
         :avocado: tags=tuxboot:ppc64le
         :avocado: tags=image:vmlinux
         :avocado: tags=extradev:driver=spapr-vscsi
-        :avocado: tags=drive:scsi-hd
         :avocado: tags=root:sda
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="scsi-hd")
 
     def test_riscv32(self):
         """
@@ -365,10 +354,10 @@ def test_s390(self):
         :avocado: tags=endian:big
         :avocado: tags=tuxboot:s390
         :avocado: tags=image:bzImage
-        :avocado: tags=drive:virtio-blk-ccw
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun(haltmsg="Requesting system halt")
+        self.common_tuxrun(drive="virtio-blk-ccw",
+                           haltmsg="Requesting system halt")
 
     # Note: some segfaults caused by unaligned userspace access
     @skipIf(os.getenv('GITLAB_CI'), 'Skipping unstable test on GitLab')
@@ -380,7 +369,6 @@ def test_sh4(self):
         :avocado: tags=tuxboot:sh4
         :avocado: tags=image:zImage
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=console:ttySC1
         """
         # The test is currently too unstable to do much in userspace
@@ -388,7 +376,9 @@ def test_sh4(self):
         (kernel, disk, dtb) = self.fetch_tuxrun_assets()
 
         # the console comes on the second serial port
-        self.prepare_run(kernel, disk, console_index=1)
+        self.prepare_run(kernel, disk,
+                         "driver=ide-hd,bus=ide.0,unit=0",
+                         console_index=1)
         self.vm.launch()
 
         self.wait_for_console_pattern("Welcome to TuxTest")
@@ -404,10 +394,9 @@ def test_sparc64(self):
         :avocado: tags=tuxboot:sparc64
         :avocado: tags=image:vmlinux
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_x86_64(self):
         """
@@ -417,7 +406,6 @@ def test_x86_64(self):
         :avocado: tags=tuxboot:x86_64
         :avocado: tags=image:bzImage
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
Signature · 1 line
2.39.2
#20 lore raw

PATCH v2 11/32 tcg: Clear plugin_mem_cbs on TB exit

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

Do this in cpu_tb_exec (normal exit) and cpu_loop_exit (exception), adjacent to where we reset can_do_io.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1381

Message-Id: <[email protected]>

---
 accel/tcg/cpu-exec-common.c | 2 ++
 accel/tcg/cpu-exec.c        | 5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)
accel/tcg/cpu-exec-common.c +2 -0
index c7bc8c6efa..176ea57281 100644
@@ -65,6 +65,8 @@ void cpu_loop_exit(CPUState *cpu)
 {
     /* Undo the setting in cpu_tb_exec.  */
     cpu->can_do_io = 1;
+    /* Undo any setting in generated code.  */
+    qemu_plugin_disable_mem_helpers(cpu);
     siglongjmp(cpu->jmp_env, 1);
 }
 
accel/tcg/cpu-exec.c +1 -4
index 56aaf58b9d..c815f2dbfd 100644
@@ -459,6 +459,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit)
     qemu_thread_jit_execute();
     ret = tcg_qemu_tb_exec(env, tb_ptr);
     cpu->can_do_io = 1;
+    qemu_plugin_disable_mem_helpers(cpu);
     /*
      * TODO: Delay swapping back to the read-write region of the TB
      * until we actually need to modify the TB.  The read-only copy,
@@ -526,7 +527,6 @@ static void cpu_exec_exit(CPUState *cpu)
     if (cc->tcg_ops->cpu_exec_exit) {
         cc->tcg_ops->cpu_exec_exit(cpu);
     }
-    QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL);
 }
 
 void cpu_exec_step_atomic(CPUState *cpu)
@@ -580,7 +580,6 @@ void cpu_exec_step_atomic(CPUState *cpu)
             qemu_mutex_unlock_iothread();
         }
         assert_no_pages_locked();
-        qemu_plugin_disable_mem_helpers(cpu);
     }
 
     /*
@@ -1004,7 +1003,6 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc)
 
             cpu_loop_exec_tb(cpu, tb, pc, &last_tb, &tb_exit);
 
-            QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL);
             /* Try to align the host and virtual clocks
                if the guest is in advance */
             align_clocks(sc, cpu);
@@ -1029,7 +1027,6 @@ static int cpu_exec_setjmp(CPUState *cpu, SyncClocks *sc)
         if (qemu_mutex_iothread_locked()) {
             qemu_mutex_unlock_iothread();
         }
-        qemu_plugin_disable_mem_helpers(cpu);
 
         assert_no_pages_locked();
     }
Signature · 1 line
2.39.2
#21 lore raw

PATCH v2 12/32 tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

Now that we call qemu_plugin_disable_mem_helpers in cpu_tb_exec, we don't need to do this in generated code as well.

Message-Id: <[email protected]>

---
 tcg/tcg-op.c | 1 -
 1 file changed, 1 deletion(-)
tcg/tcg-op.c +0 -1
index ddab20a6a6..3136cef81a 100644
@@ -2808,7 +2808,6 @@ void tcg_gen_exit_tb(const TranslationBlock *tb, unsigned idx)
         tcg_debug_assert(idx == TB_EXIT_REQUESTED);
     }
 
-    plugin_gen_disable_mem_helpers();
     tcg_gen_op1i(INDEX_op_exit_tb, val);
 }
 
Signature · 1 line
2.39.2
#22 lore raw

PATCH v2 13/32 include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

This macro is no longer used.

Message-Id: <[email protected]>

---
 include/qemu/plugin.h | 4 ----
 1 file changed, 4 deletions(-)
include/qemu/plugin.h +0 -4
index fb338ba576..e0ebedef84 100644
@@ -59,8 +59,6 @@ get_plugin_meminfo_rw(qemu_plugin_meminfo_t i)
 #ifdef CONFIG_PLUGIN
 extern QemuOptsList qemu_plugin_opts;
 
-#define QEMU_PLUGIN_ASSERT(cond) g_assert(cond)
-
 static inline void qemu_plugin_add_opts(void)
 {
     qemu_add_opts(&qemu_plugin_opts);
@@ -252,8 +250,6 @@ void qemu_plugin_user_postfork(bool is_child);
 
 #else /* !CONFIG_PLUGIN */
 
-#define QEMU_PLUGIN_ASSERT(cond)
-
 static inline void qemu_plugin_add_opts(void)
 { }
 
Signature · 1 line
2.39.2
#23 lore raw

PATCH v2 14/32 *: Add missing includes of qemu/error-report.h

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

This had been pulled in via qemu/plugin.h from hw/core/cpu.h, but that will be removed.

Message-Id: <[email protected]>

[AJB: add various additional cases shown by CI]
---
 accel/accel-softmmu.c          | 2 +-
 block/monitor/block-hmp-cmds.c | 1 +
 dump/dump.c                    | 1 +
 dump/win_dump.c                | 1 +
 gdbstub/gdbstub.c              | 1 +
 hw/arm/collie.c                | 2 ++
 hw/arm/cubieboard.c            | 1 +
 hw/arm/musicpal.c              | 2 ++
 hw/arm/npcm7xx_boards.c        | 2 ++
 hw/arm/nseries.c               | 2 ++
 hw/arm/omap_sx1.c              | 2 ++
 hw/arm/orangepi.c              | 1 +
 hw/arm/palm.c                  | 2 ++
 hw/core/loader.c               | 1 +
 hw/core/machine-smp.c          | 2 ++
 hw/i386/kvm/xen_xenstore.c     | 1 +
 hw/i386/sgx.c                  | 1 +
 hw/intc/apic.c                 | 1 +
 hw/loongarch/acpi-build.c      | 1 +
 hw/loongarch/virt.c            | 2 ++
 hw/m68k/next-cube.c            | 1 +
 hw/m68k/q800.c                 | 1 +
 hw/m68k/virt.c                 | 1 +
 hw/mem/memory-device.c         | 1 +
 hw/mem/sparse-mem.c            | 1 +
 hw/openrisc/boot.c             | 1 +
 hw/ppc/spapr_softmmu.c         | 2 ++
 hw/riscv/opentitan.c           | 1 +
 hw/riscv/shakti_c.c            | 1 +
 hw/riscv/virt-acpi-build.c     | 1 +
 hw/vfio/display.c              | 1 +
 hw/vfio/igd.c                  | 1 +
 hw/vfio/migration.c            | 1 +
 linux-user/elfload.c           | 1 +
 migration/dirtyrate.c          | 1 +
 migration/exec.c               | 1 +
 target/i386/cpu.c              | 1 +
 target/i386/host-cpu.c         | 1 +
 target/i386/sev.c              | 1 +
 target/i386/whpx/whpx-apic.c   | 1 +
 target/mips/cpu.c              | 1 +
 target/s390x/cpu-sysemu.c      | 1 +
 target/s390x/cpu_models.c      | 1 +
 target/s390x/diag.c            | 2 ++
 ui/cocoa.m                     | 1 +
 45 files changed, 55 insertions(+), 1 deletion(-)
accel/accel-softmmu.c +1 -1
index f9cdafb148..9c804ba9e3 100644
@@ -27,7 +27,7 @@
 #include "qemu/accel.h"
 #include "hw/boards.h"
 #include "sysemu/cpus.h"
-
+#include "qemu/error-report.h"
 #include "accel-softmmu.h"
 
 int accel_init_machine(AccelState *accel, MachineState *ms)
block/monitor/block-hmp-cmds.c +1 -0
index 6aa5f1be0c..2846083546 100644
@@ -48,6 +48,7 @@
 #include "qemu/option.h"
 #include "qemu/sockets.h"
 #include "qemu/cutils.h"
+#include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
 #include "monitor/hmp.h"
dump/dump.c +1 -0
index 544d5bce3a..1f1a6edcab 100644
@@ -24,6 +24,7 @@
 #include "qapi/qapi-commands-dump.h"
 #include "qapi/qapi-events-dump.h"
 #include "qapi/qmp/qerror.h"
+#include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "hw/misc/vmcoreinfo.h"
 #include "migration/blocker.h"
dump/win_dump.c +1 -0
index 0152f7330a..b7bfaff379 100644
@@ -11,6 +11,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/dump.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qapi/qmp/qerror.h"
 #include "exec/cpu-defs.h"
 #include "hw/core/cpu.h"
gdbstub/gdbstub.c +1 -0
index d9e9bf9294..2a66371aa5 100644
@@ -27,6 +27,7 @@
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
 #include "qemu/module.h"
+#include "qemu/error-report.h"
 #include "trace.h"
 #include "exec/gdbstub.h"
 #include "gdbstub/syscalls.h"
hw/arm/collie.c +2 -0
index 9edff59370..a0ad1b8dc7 100644
@@ -19,6 +19,8 @@
 #include "exec/address-spaces.h"
 #include "cpu.h"
 #include "qom/object.h"
+#include "qemu/error-report.h"
+
 
 #define RAM_SIZE            (512 * MiB)
 #define FLASH_SIZE          (32 * MiB)
hw/arm/cubieboard.c +1 -0
index 71a7df1508..8c7fa91529 100644
@@ -17,6 +17,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-a10.h"
hw/arm/musicpal.c +2 -0
index 06d9add7c7..c9010b2ffb 100644
@@ -37,6 +37,8 @@
 #include "qemu/cutils.h"
 #include "qom/object.h"
 #include "hw/net/mv88w8618_eth.h"
+#include "qemu/error-report.h"
+
 
 #define MP_MISC_BASE            0x80002000
 #define MP_MISC_SIZE            0x00001000
hw/arm/npcm7xx_boards.c +2 -0
index 9b31207a06..2aef579aac 100644
@@ -30,6 +30,8 @@
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/block-backend.h"
+#include "qemu/error-report.h"
+
 
 #define NPCM7XX_POWER_ON_STRAPS_DEFAULT (           \
         NPCM7XX_PWRON_STRAP_SPI0F18 |               \
hw/arm/nseries.c +2 -0
index c9df063a08..9e49e9e177 100644
@@ -45,6 +45,8 @@
 #include "hw/loader.h"
 #include "hw/sysbus.h"
 #include "qemu/log.h"
+#include "qemu/error-report.h"
+
 
 /* Nokia N8x0 support */
 struct n800_s {
hw/arm/omap_sx1.c +2 -0
index e721292079..4bf1579f8c 100644
@@ -37,6 +37,8 @@
 #include "exec/address-spaces.h"
 #include "cpu.h"
 #include "qemu/cutils.h"
+#include "qemu/error-report.h"
+
 
 /*****************************************************************************/
 /* Siemens SX1 Cellphone V1 */
hw/arm/orangepi.c +1 -0
index 3ace474870..10653361ed 100644
@@ -21,6 +21,7 @@
 #include "qemu/units.h"
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-h3.h"
hw/arm/palm.c +2 -0
index 1457f10c83..17c11ac4ce 100644
@@ -32,6 +32,8 @@
 #include "cpu.h"
 #include "qemu/cutils.h"
 #include "qom/object.h"
+#include "qemu/error-report.h"
+
 
 static uint64_t static_read(void *opaque, hwaddr offset, unsigned size)
 {
hw/core/loader.c +1 -0
index cd53235fed..11be97fe1b 100644
@@ -44,6 +44,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/datadir.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-machine.h"
 #include "qapi/type-helpers.h"
hw/core/machine-smp.c +2 -0
index c3dab007da..89fe0cda42 100644
@@ -20,6 +20,8 @@
 #include "qemu/osdep.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
+
 
 /*
  * Report information of a machine's supported CPU topology hierarchy.
hw/i386/kvm/xen_xenstore.c +1 -0
index 2cadafd56a..900679af8a 100644
@@ -15,6 +15,7 @@
 #include "qemu/module.h"
 #include "qemu/main-loop.h"
 #include "qemu/cutils.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qom/object.h"
 #include "migration/vmstate.h"
hw/i386/sgx.c +1 -0
index db004d17a6..70305547d4 100644
@@ -18,6 +18,7 @@
 #include "monitor/monitor.h"
 #include "monitor/hmp-target.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qapi/qapi-commands-misc-target.h"
 #include "exec/address-spaces.h"
 #include "sysemu/hw_accel.h"
hw/intc/apic.c +1 -0
index 0ff060f721..20b5a94073 100644
@@ -18,6 +18,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/thread.h"
+#include "qemu/error-report.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/i386/apic.h"
 #include "hw/intc/ioapic.h"
hw/loongarch/acpi-build.c +1 -0
index 6cb2472d33..8e3ce07367 100644
@@ -7,6 +7,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qemu/bitmap.h"
 #include "hw/pci/pci.h"
 #include "hw/core/cpu.h"
hw/loongarch/virt.c +2 -0
index 38ef7cc49f..b702c3f51e 100644
@@ -44,6 +44,8 @@
 #include "sysemu/tpm.h"
 #include "sysemu/block-backend.h"
 #include "hw/block/flash.h"
+#include "qemu/error-report.h"
+
 
 static void virt_flash_create(LoongArchMachineState *lams)
 {
hw/m68k/next-cube.c +1 -0
index e0d4a94f9d..ce8ee50b9e 100644
@@ -24,6 +24,7 @@
 #include "hw/block/fdc.h"
 #include "hw/qdev-properties.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "ui/console.h"
 #include "target/m68k/cpu.h"
 #include "migration/vmstate.h"
hw/m68k/q800.c +1 -0
index 9d52ca6613..b35ecafbc7 100644
@@ -45,6 +45,7 @@
 #include "hw/block/swim.h"
 #include "net/net.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 #include "sysemu/runstate.h"
 #include "sysemu/reset.h"
hw/m68k/virt.c +1 -0
index 4cb5beef1a..754b9bdfcc 100644
@@ -23,6 +23,7 @@
 #include "bootinfo.h"
 #include "net/net.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 #include "sysemu/runstate.h"
 #include "sysemu/reset.h"
hw/mem/memory-device.c +1 -0
index d9f8301711..1636db9679 100644
@@ -10,6 +10,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "hw/mem/memory-device.h"
 #include "qapi/error.h"
 #include "hw/boards.h"
hw/mem/sparse-mem.c +1 -0
index 72f038d47d..6e8f4f84fb 100644
@@ -11,6 +11,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
hw/openrisc/boot.c +1 -0
index 007e80cd5a..55475aa6d6 100644
@@ -15,6 +15,7 @@
 #include "sysemu/device_tree.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
+#include "qemu/error-report.h"
 
 #include <libfdt.h>
 
hw/ppc/spapr_softmmu.c +2 -0
index 5170a33369..278666317e 100644
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/memalign.h"
+#include "qemu/error-report.h"
 #include "cpu.h"
 #include "helper_regs.h"
 #include "hw/ppc/spapr.h"
 #include "mmu-hash64.h"
 #include "mmu-book3s-v3.h"
 
+
 static inline bool valid_ptex(PowerPCCPU *cpu, target_ulong ptex)
 {
     /*
hw/riscv/opentitan.c +1 -0
index b06944d382..bc678766e7 100644
@@ -22,6 +22,7 @@
 #include "qemu/cutils.h"
 #include "hw/riscv/opentitan.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/boards.h"
 #include "hw/misc/unimp.h"
 #include "hw/riscv/boot.h"
hw/riscv/shakti_c.c +1 -0
index e43cc9445c..12ea74b032 100644
@@ -20,6 +20,7 @@
 #include "hw/boards.h"
 #include "hw/riscv/shakti_c.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/intc/sifive_plic.h"
 #include "hw/intc/riscv_aclint.h"
 #include "sysemu/sysemu.h"
hw/riscv/virt-acpi-build.c +1 -0
index 82da0a238c..7331248f59 100644
@@ -29,6 +29,7 @@
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/utils.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "sysemu/reset.h"
 #include "migration/vmstate.h"
 #include "hw/riscv/virt.h"
hw/vfio/display.c +1 -0
index 78f4d82c1c..bec864f482 100644
@@ -14,6 +14,7 @@
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
 
+#include "qemu/error-report.h"
 #include "hw/display/edid.h"
 #include "ui/console.h"
 #include "qapi/error.h"
hw/vfio/igd.c +1 -0
index afe3fe7efc..b31ee79c60 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
 #include "hw/nvram/fw_cfg.h"
hw/vfio/migration.c +1 -0
index 1a1a8659c8..6b58dddb88 100644
@@ -11,6 +11,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/cutils.h"
 #include "qemu/units.h"
+#include "qemu/error-report.h"
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
 
linux-user/elfload.c +1 -0
index 150d1d4503..1dbc1f0f9b 100644
@@ -18,6 +18,7 @@
 #include "qemu/units.h"
 #include "qemu/selfmap.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "target_signal.h"
 #include "accel/tcg/debuginfo.h"
 
migration/dirtyrate.c +1 -0
index 575d48c397..180ba38c7a 100644
@@ -11,6 +11,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include <zlib.h>
 #include "qapi/error.h"
 #include "cpu.h"
migration/exec.c +1 -0
index 38604d73a6..2bf882bbe1 100644
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "channel.h"
 #include "exec.h"
 #include "migration.h"
target/i386/cpu.c +1 -0
index cab1e2a957..6576287e5b 100644
@@ -29,6 +29,7 @@
 #include "kvm/kvm_i386.h"
 #include "sev.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qapi/qapi-visit-machine.h"
 #include "qapi/qmp/qerror.h"
 #include "standard-headers/asm-x86/kvm_para.h"
target/i386/host-cpu.c +1 -0
index 10f8aba86e..92ecb7254b 100644
@@ -11,6 +11,7 @@
 #include "cpu.h"
 #include "host-cpu.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 
 /* Note: Only safe for use on x86(-64) hosts */
target/i386/sev.c +1 -0
index 0ec970496e..859e06f6ad 100644
@@ -23,6 +23,7 @@
 #include "qemu/base64.h"
 #include "qemu/module.h"
 #include "qemu/uuid.h"
+#include "qemu/error-report.h"
 #include "crypto/hash.h"
 #include "sysemu/kvm.h"
 #include "sev.h"
target/i386/whpx/whpx-apic.c +1 -0
index c15df35ad6..8710e37567 100644
@@ -11,6 +11,7 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "cpu.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/i386/apic-msidef.h"
target/mips/cpu.c +1 -0
index 543da911e3..01e0fbe10d 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/qemu-print.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "cpu.h"
 #include "internal.h"
target/s390x/cpu-sysemu.c +1 -0
index 948e4bd3e0..97d6c760a8 100644
@@ -21,6 +21,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "cpu.h"
 #include "s390x-internal.h"
target/s390x/cpu_models.c +1 -0
index 065ec6d66c..457b5cb10c 100644
@@ -17,6 +17,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/tcg.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qapi/visitor.h"
 #include "qemu/module.h"
 #include "qemu/hw-version.h"
target/s390x/diag.c +2 -0
index 76b01dcd68..e5f0df19e7 100644
@@ -22,6 +22,8 @@
 #include "hw/s390x/pv.h"
 #include "sysemu/kvm.h"
 #include "kvm/kvm_s390x.h"
+#include "qemu/error-report.h"
+
 
 int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3)
 {
ui/cocoa.m +1 -0
index 985a0f5069..168170a8a6 100644
@@ -46,6 +46,7 @@
 #include "qemu/cutils.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
+#include "qemu/error-report.h"
 #include <Carbon/Carbon.h>
 #include "hw/core/cpu.h"
 
Signature · 1 line
2.39.2
#24 lore raw

PATCH v2 15/32 *: Add missing includes of qemu/plugin.h

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

This had been pulled in from hw/core/cpu.h,
but that will be removed.

Message-Id: <[email protected]>

[AJB: also syscall-trace.h]
---
 include/user/syscall-trace.h | 1 +
 accel/tcg/cpu-exec-common.c  | 1 +
 cpu.c                        | 1 +
 linux-user/exit.c            | 1 +
 linux-user/syscall.c         | 1 +
 5 files changed, 5 insertions(+)
include/user/syscall-trace.h +1 -0
index c5a220da34..90bda7631c 100644
@@ -11,6 +11,7 @@
 #define SYSCALL_TRACE_H
 
 #include "exec/user/abitypes.h"
+#include "qemu/plugin.h"
 #include "trace/trace-root.h"
 
 /*
accel/tcg/cpu-exec-common.c +1 -0
index 176ea57281..e7962c9348 100644
@@ -21,6 +21,7 @@
 #include "sysemu/cpus.h"
 #include "sysemu/tcg.h"
 #include "exec/exec-all.h"
+#include "qemu/plugin.h"
 
 bool tcg_allowed;
 
cpu.c +1 -0
index 567b23af46..849bac062c 100644
@@ -42,6 +42,7 @@
 #include "hw/core/accel-cpu.h"
 #include "trace/trace-root.h"
 #include "qemu/accel.h"
+#include "qemu/plugin.h"
 
 uintptr_t qemu_host_page_size;
 intptr_t qemu_host_page_mask;
linux-user/exit.c +1 -0
index fd49d76f45..3017d28a3c 100644
@@ -21,6 +21,7 @@
 #include "gdbstub/syscalls.h"
 #include "qemu.h"
 #include "user-internals.h"
+#include "qemu/plugin.h"
 #ifdef CONFIG_GPROF
 #include <sys/gmon.h>
 #endif
linux-user/syscall.c +1 -0
index 24cea6fb6a..27871641f4 100644
@@ -22,6 +22,7 @@
 #include "qemu/path.h"
 #include "qemu/memfd.h"
 #include "qemu/queue.h"
+#include "qemu/plugin.h"
 #include "target_mman.h"
 #include <elf.h>
 #include <endian.h>
Signature · 1 line
2.39.2
#25 lore raw

PATCH v2 16/32 include/qemu: Split out plugin-event.h

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

The usage in hw/core/cpu.h only requires QEMU_PLUGIN_EV_MAX.

Message-Id: <[email protected]>

---
 include/hw/core/cpu.h       |  2 +-
 include/qemu/plugin-event.h | 26 ++++++++++++++++++++++++++
 include/qemu/plugin.h       | 17 +----------------
 3 files changed, 28 insertions(+), 17 deletions(-)
 create mode 100644 include/qemu/plugin-event.h
include/hw/core/cpu.h +1 -1
index 75689bff02..821e937020 100644
@@ -30,7 +30,7 @@
 #include "qemu/rcu_queue.h"
 #include "qemu/queue.h"
 #include "qemu/thread.h"
-#include "qemu/plugin.h"
+#include "qemu/plugin-event.h"
 #include "qom/object.h"
 
 typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
include/qemu/plugin-event.h new file +26 -0
new file mode 100644
index 0000000000..7056d8427b
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017, Emilio G. Cota <[email protected]>
+ *
+ * License: GNU GPL, version 2 or later.
+ *   See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_PLUGIN_EVENT_H
+#define QEMU_PLUGIN_EVENT_H
+
+/*
+ * Events that plugins can subscribe to.
+ */
+enum qemu_plugin_event {
+    QEMU_PLUGIN_EV_VCPU_INIT,
+    QEMU_PLUGIN_EV_VCPU_EXIT,
+    QEMU_PLUGIN_EV_VCPU_TB_TRANS,
+    QEMU_PLUGIN_EV_VCPU_IDLE,
+    QEMU_PLUGIN_EV_VCPU_RESUME,
+    QEMU_PLUGIN_EV_VCPU_SYSCALL,
+    QEMU_PLUGIN_EV_VCPU_SYSCALL_RET,
+    QEMU_PLUGIN_EV_FLUSH,
+    QEMU_PLUGIN_EV_ATEXIT,
+    QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */
+};
+
+#endif /* QEMU_PLUGIN_EVENT_H */
include/qemu/plugin.h +1 -16
index e0ebedef84..6bf4bce188 100644
@@ -12,24 +12,9 @@
 #include "qemu/error-report.h"
 #include "qemu/queue.h"
 #include "qemu/option.h"
+#include "qemu/plugin-event.h"
 #include "exec/memopidx.h"
 
-/*
- * Events that plugins can subscribe to.
- */
-enum qemu_plugin_event {
-    QEMU_PLUGIN_EV_VCPU_INIT,
-    QEMU_PLUGIN_EV_VCPU_EXIT,
-    QEMU_PLUGIN_EV_VCPU_TB_TRANS,
-    QEMU_PLUGIN_EV_VCPU_IDLE,
-    QEMU_PLUGIN_EV_VCPU_RESUME,
-    QEMU_PLUGIN_EV_VCPU_SYSCALL,
-    QEMU_PLUGIN_EV_VCPU_SYSCALL_RET,
-    QEMU_PLUGIN_EV_FLUSH,
-    QEMU_PLUGIN_EV_ATEXIT,
-    QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */
-};
-
 /*
  * Option parsing/processing.
  * Note that we can load an arbitrary number of plugins.
Signature · 1 line
2.39.2
#26 lore raw

PATCH v2 17/32 include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers

In reply to Alex Bennée

From: Richard Henderson <[email protected]>

Now that we've broken the include loop with cpu.h, we can bring this inline.

Message-Id: <[email protected]>

---
 include/qemu/plugin.h |  6 +++++-
 plugins/core.c        | 11 -----------
 2 files changed, 5 insertions(+), 12 deletions(-)
include/qemu/plugin.h +5 -1
index 6bf4bce188..bc0781cab8 100644
@@ -14,6 +14,7 @@
 #include "qemu/option.h"
 #include "qemu/plugin-event.h"
 #include "exec/memopidx.h"
+#include "hw/core/cpu.h"
 
 /*
  * Option parsing/processing.
@@ -204,7 +205,10 @@ void qemu_plugin_atexit_cb(void);
 
 void qemu_plugin_add_dyn_cb_arr(GArray *arr);
 
-void qemu_plugin_disable_mem_helpers(CPUState *cpu);
+static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu)
+{
+    cpu->plugin_mem_cbs = NULL;
+}
 
 /**
  * qemu_plugin_user_exit(): clean-up callbacks before calling exit callbacks
plugins/core.c +0 -11
index 04632886b9..9912f2cfdb 100644
@@ -553,17 +553,6 @@ void qemu_plugin_user_postfork(bool is_child)
     }
 }
 
-
-/*
- * Call this function after longjmp'ing to the main loop. It's possible that the
- * last instruction of a TB might have used helpers, and therefore the
- * "disable" instruction will never execute because it ended up as dead code.
- */
-void qemu_plugin_disable_mem_helpers(CPUState *cpu)
-{
-    cpu->plugin_mem_cbs = NULL;
-}
-
 static bool plugin_dyn_cb_arr_cmp(const void *ap, const void *bp)
 {
     return ap == bp;
Signature · 1 line
2.39.2
#27 lore raw

PATCH v2 18/32 iotests: explicitly pass source/build dir to 'check' command

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

The 'check' script has some rather dubious logic whereby it assumes that if invoked as a symlink, then it is running from a separate source tree and build tree, otherwise it assumes the current working directory is a combined source and build tree.

This doesn't work if you want to invoke the 'check' script using its full source tree path while still using a split source and build tree layout. This would be a typical situation with meson if you ask it to find the 'check' script path using files('check').

Rather than trying to make the logic more magical, add support for explicitly passing the dirs using --source-dir and --build-dir. If either is omitted the current logic is maintained.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/check      | 25 +++++++++++++++++++++++--
 tests/qemu-iotests/testenv.py | 13 ++++---------
 2 files changed, 27 insertions(+), 11 deletions(-)
tests/qemu-iotests/check +23 -2
index 9bdda1394e..da7e8a87fe 100755
@@ -26,9 +26,23 @@ from findtests import TestFinder
 from testenv import TestEnv
 from testrunner import TestRunner
 
+def get_default_path(follow_link=False):
+    """
+    Try to automagically figure out the path we are running from.
+    """
+    # called from the build tree?
+    if os.path.islink(sys.argv[0]):
+        if follow_link:
+            return os.path.dirname(os.readlink(sys.argv[0]))
+        else:
+            return os.path.dirname(os.path.abspath(sys.argv[0]))
+    else:  # or source tree?
+        return os.getcwd()
 
 def make_argparser() -> argparse.ArgumentParser:
-    p = argparse.ArgumentParser(description="Test run options")
+    p = argparse.ArgumentParser(
+        description="Test run options",
+        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
 
     p.add_argument('-n', '--dry-run', action='store_true',
                    help='show me, do not run tests')
@@ -113,6 +127,11 @@ def make_argparser() -> argparse.ArgumentParser:
                        'middle of the process.')
     g_sel.add_argument('tests', metavar='TEST_FILES', nargs='*',
                        help='tests to run, or "--" followed by a command')
+    g_sel.add_argument('--build-dir', default=get_default_path(),
+                       help='Path to iotests build directory')
+    g_sel.add_argument('--source-dir',
+                       default=get_default_path(follow_link=True),
+                       help='Path to iotests build directory')
 
     return p
 
@@ -120,7 +139,9 @@ def make_argparser() -> argparse.ArgumentParser:
 if __name__ == '__main__':
     args = make_argparser().parse_args()
 
-    env = TestEnv(imgfmt=args.imgfmt, imgproto=args.imgproto,
+    env = TestEnv(source_dir=args.source_dir,
+                  build_dir=args.build_dir,
+                  imgfmt=args.imgfmt, imgproto=args.imgproto,
                   aiomode=args.aiomode, cachemode=args.cachemode,
                   imgopts=args.imgopts, misalign=args.misalign,
                   debug=args.debug, valgrind=args.valgrind,
tests/qemu-iotests/testenv.py +4 -9
index a864c74b12..aa9d735414 100644
@@ -170,7 +170,8 @@ def root(*names: str) -> str:
             if not isxfile(b):
                 sys.exit('Not executable: ' + b)
 
-    def __init__(self, imgfmt: str, imgproto: str, aiomode: str,
+    def __init__(self, source_dir: str, build_dir: str,
+                 imgfmt: str, imgproto: str, aiomode: str,
                  cachemode: Optional[str] = None,
                  imgopts: Optional[str] = None,
                  misalign: bool = False,
@@ -211,14 +212,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode: str,
         # which are needed to initialize some environment variables. They are
         # used by init_*() functions as well.
 
-        if os.path.islink(sys.argv[0]):
-            # called from the build tree
-            self.source_iotests = os.path.dirname(os.readlink(sys.argv[0]))
-            self.build_iotests = os.path.dirname(os.path.abspath(sys.argv[0]))
-        else:
-            # called from the source tree
-            self.source_iotests = os.getcwd()
-            self.build_iotests = self.source_iotests
+        self.source_iotests = source_dir
+        self.build_iotests = build_dir
 
         self.build_root = os.path.join(self.build_iotests, '..', '..')
 
Signature · 1 line
2.39.2
#28 lore raw

PATCH v2 19/32 iotests: allow test discovery before building

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

The 'check' script can be invoked in "dry run" mode, in which case it merely does test discovery and prints out all their names. Despite only doing test discovery it still validates that the various QEMU binaries can be found. This makes it impossible todo test discovery prior to building QEMU. This is a desirable feature to support, because it will let meson discover tests.

Fortunately the code in the TestEnv constructor is ordered in a way that makes this fairly trivial to achieve. We can just short circuit the constructor after the basic directory paths have been set.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/check      | 3 ++-
 tests/qemu-iotests/testenv.py | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
tests/qemu-iotests/check +2 -1
index da7e8a87fe..bb294ef556 100755
@@ -145,7 +145,8 @@ if __name__ == '__main__':
                   aiomode=args.aiomode, cachemode=args.cachemode,
                   imgopts=args.imgopts, misalign=args.misalign,
                   debug=args.debug, valgrind=args.valgrind,
-                  gdb=args.gdb, qprint=args.print)
+                  gdb=args.gdb, qprint=args.print,
+                  dry_run=args.dry_run)
 
     if len(sys.argv) > 1 and sys.argv[-len(args.tests)-1] == '--':
         if not args.tests:
tests/qemu-iotests/testenv.py +6 -1
index aa9d735414..9a37ad9152 100644
@@ -178,7 +178,8 @@ def __init__(self, source_dir: str, build_dir: str,
                  debug: bool = False,
                  valgrind: bool = False,
                  gdb: bool = False,
-                 qprint: bool = False) -> None:
+                 qprint: bool = False,
+                 dry_run: bool = False) -> None:
         self.imgfmt = imgfmt
         self.imgproto = imgproto
         self.aiomode = aiomode
@@ -218,6 +219,10 @@ def __init__(self, source_dir: str, build_dir: str,
         self.build_root = os.path.join(self.build_iotests, '..', '..')
 
         self.init_directories()
+
+        if dry_run:
+            return
+
         self.init_binaries()
 
         self.malloc_perturb_ = os.getenv('MALLOC_PERTURB_',
Signature · 1 line
2.39.2
#29 lore raw

PATCH v2 20/32 iotests: strip subdir path when listing tests

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

When asking 'check' to list individual tests by invoking it in dry run mode, it prints the paths to the tests relative to the base of the I/O test directory.

When asking 'check' to run an individual test, however, it mandates that only the unqualified test name is given, without any path prefix. This inconsistency makes it harder to ask for a list of tests and then invoke each one.

Thus the test listing code is change to flatten the test names, by printing only the base name, which can be directly invoked.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/check +1 -1
index bb294ef556..f2e9d27dcf 100755
@@ -184,7 +184,7 @@ if __name__ == '__main__':
         sys.exit(str(e))
 
     if args.dry_run:
-        print('\n'.join(tests))
+        print('\n'.join([os.path.basename(t) for t in tests]))
     else:
         with TestRunner(env, tap=args.tap,
                         color=args.color) as tr:
Signature · 1 line
2.39.2
#30 lore raw

PATCH v2 21/32 iotests: print TAP protocol version when reporting tests

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

Recently meson started complaining that TAP test reports don't include the TAP protocol version. While this warning is bogus and has since been removed from Meson, it looks like good practice to include this header going forward. The GLib library test harness has started unconditionally printing the version, so this brings the I/O tests into line.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/testrunner.py | 1 +
 1 file changed, 1 insertion(+)
tests/qemu-iotests/testrunner.py +1 -0
index 5a771da86e..e734800b3d 100644
@@ -391,6 +391,7 @@ def run_tests(self, tests: List[str], jobs: int = 1) -> bool:
         casenotrun = []
 
         if self.tap:
+            print('TAP version 13')
             self.env.print_env('# ')
             print('1..%d' % len(tests))
         else:
Signature · 1 line
2.39.2
#31 lore raw

PATCH v2 22/32 iotests: connect stdin to /dev/null when running tests

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

Currently the tests have their stdin inherited from the test harness, meaning they are connected to a TTY. The QEMU processes spawned by certain tests, however, modify TTY settings and if the test exits abnormally the settings might not be restored.

The python test harness thus has some logic which will capture the initial TTY settings and restore them once all tests are finished.

This does not, however, take into account the possibility of many copies of the 'check' program running in parallel. With parallel execution, a later invokation may save the TTY state that QEMU has already modified, and thus restore bad state leaving the TTY non-functional.

None of the I/O tests shnould actually be interactive requiring user input and so they should not require a TTY at all. To avoid this while TTY save/restore complexity we can connect the test stdin to /dev/null instead.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/testrunner.py | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)
tests/qemu-iotests/testrunner.py +2 -20
index e734800b3d..81519ed6e2 100644
@@ -24,12 +24,10 @@
 import subprocess
 import contextlib
 import json
-import termios
 import shutil
 import sys
 from multiprocessing import Pool
-from contextlib import contextmanager
-from typing import List, Optional, Iterator, Any, Sequence, Dict, \
+from typing import List, Optional, Any, Sequence, Dict, \
         ContextManager
 
 from testenv import TestEnv
@@ -56,22 +54,6 @@ def file_diff(file1: str, file2: str) -> List[str]:
         return res
 
 
-# We want to save current tty settings during test run,
-# since an aborting qemu call may leave things screwed up.
-@contextmanager
-def savetty() -> Iterator[None]:
-    isterm = sys.stdin.isatty()
-    if isterm:
-        fd = sys.stdin.fileno()
-        attr = termios.tcgetattr(fd)
-
-    try:
-        yield
-    finally:
-        if isterm:
-            termios.tcsetattr(fd, termios.TCSADRAIN, attr)
-
-
 class LastElapsedTime(ContextManager['LastElapsedTime']):
     """ Cache for elapsed time for tests, to show it during new test run
 
@@ -169,7 +151,6 @@ def __enter__(self) -> 'TestRunner':
         self._stack = contextlib.ExitStack()
         self._stack.enter_context(self.env)
         self._stack.enter_context(self.last_elapsed)
-        self._stack.enter_context(savetty())
         return self
 
     def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
@@ -294,6 +275,7 @@ def do_run_test(self, test: str, mp: bool) -> TestResult:
         t0 = time.time()
         with f_bad.open('w', encoding="utf-8") as f:
             with subprocess.Popen(args, cwd=str(f_test.parent), env=env,
+                                  stdin=subprocess.DEVNULL,
                                   stdout=f, stderr=subprocess.STDOUT) as proc:
                 try:
                     proc.wait()
Signature · 1 line
2.39.2
#32 lore raw

PATCH v2 23/32 iotests: always use a unique sub-directory per test

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

The current test runner is only safe against parallel execution within a single instance of the 'check' process, and only if -j is given a value greater than 2. This prevents running multiple copies of the 'check' process for different test scenarios.

This change switches the output / socket directories to always include the test name, image format and image protocol. This should allow full parallelism of all distinct test scenarios. eg running both qcow2 and raw tests at the same time, or both file and nbd tests at the same time.

It would be possible to allow for parallelism of the same test scenario by including the pid, but that would potentially let many directories accumulate over time on failures, so is not done.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/testrunner.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
tests/qemu-iotests/testrunner.py +10 -10
index 81519ed6e2..7b322272e9 100644
@@ -228,13 +228,11 @@ def find_reference(self, test: str) -> str:
 
         return f'{test}.out'
 
-    def do_run_test(self, test: str, mp: bool) -> TestResult:
+    def do_run_test(self, test: str) -> TestResult:
         """
         Run one test
 
         :param test: test file path
-        :param mp: if true, we are in a multiprocessing environment, use
-                   personal subdirectories for test run
 
         Note: this method may be called from subprocess, so it does not
         change ``self`` object in any way!
@@ -257,12 +255,14 @@ def do_run_test(self, test: str, mp: bool) -> TestResult:
 
         args = [str(f_test.resolve())]
         env = self.env.prepare_subprocess(args)
-        if mp:
-            # Split test directories, so that tests running in parallel don't
-            # break each other.
-            for d in ['TEST_DIR', 'SOCK_DIR']:
-                env[d] = os.path.join(env[d], f_test.name)
-                Path(env[d]).mkdir(parents=True, exist_ok=True)
+
+        # Split test directories, so that tests running in parallel don't
+        # break each other.
+        for d in ['TEST_DIR', 'SOCK_DIR']:
+            env[d] = os.path.join(
+                env[d],
+                f"{self.env.imgfmt}-{self.env.imgproto}-{f_test.name}")
+            Path(env[d]).mkdir(parents=True, exist_ok=True)
 
         test_dir = env['TEST_DIR']
         f_bad = Path(test_dir, f_test.name + '.out.bad')
@@ -347,7 +347,7 @@ def run_test(self, test: str,
             testname = os.path.basename(test)
             print(f'# running {self.env.imgfmt} {testname}')
 
-        res = self.do_run_test(test, mp)
+        res = self.do_run_test(test)
 
         end = datetime.datetime.now().strftime('%H:%M:%S')
         self.test_print_one_line(test=test,
Signature · 1 line
2.39.2
#33 lore raw

PATCH v2 24/32 iotests: register each I/O test separately with meson

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

Currently meson registers a single test that invokes an entire group of I/O tests, hiding the test granularity from meson. There are various downsides of doing this

* You cannot ask 'meson test' to invoke a single I/O test
* The meson test timeout can't be applied to the individual tests
* Meson only gets a pass/fail for the overall I/O test group not individual tests
* If a CI job gets killed by the GitLab timeout, we don't get visibility into how far through the I/O tests execution got.

This switches meson to perform test discovery by invoking 'check' in dry-run mode. It then registers one meson test case for each I/O test. Parallel execution remains disabled since the I/O tests do not use self contained execution environments and thus conflict with each other.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/meson.build | 35 ++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
tests/qemu-iotests/meson.build +29 -6
index 323a4acb6a..a162f683ef 100644
@@ -32,16 +32,39 @@ foreach k, v : emulators
   endif
 endforeach
 
+qemu_iotests_check_cmd = files('check')
+
 foreach format, speed: qemu_iotests_formats
   if speed == 'quick'
     suites = 'block'
   else
     suites = ['block-' + speed, speed]
   endif
-  test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), format],
-       depends: qemu_iotests_binaries, env: qemu_iotests_env,
-       protocol: 'tap',
-       suite: suites,
-       timeout: 0,
-       is_parallel: false)
+
+  args = ['-tap', '-' + format]
+  if speed == 'quick'
+      args += ['-g', 'auto']
+  endif
+
+  rc = run_command(
+      [qemu_iotests_check_cmd] + args + ['-n'],
+      check: true,
+  )
+
+  foreach item: rc.stdout().strip().split()
+      args = ['-tap', '-' + format, item,
+              '--source-dir', meson.current_source_dir(),
+              '--build-dir', meson.current_build_dir()]
+      # Some individual tests take as long as 45 seconds
+      # Bump the timeout to 3 minutes for some headroom
+      # on slow machines to minimize spurious failures
+      test('io-' + format + '-' + item,
+           qemu_iotests_check_cmd,
+           args: args,
+           depends: qemu_iotests_binaries,
+           env: qemu_iotests_env,
+           protocol: 'tap',
+           timeout: 180,
+           suite: suites)
+  endforeach
 endforeach
Signature · 1 line
2.39.2
#34 lore raw

PATCH v2 25/32 iotests: remove the check-block.sh script

In reply to Alex Bennée

From: Daniel P. Berrangé <[email protected]>

Now that meson directly invokes the individual I/O tests, the check-block.sh wrapper script is no longer required.

Message-Id: <[email protected]>

---
 tests/check-block.sh | 43 -------------------------------------------
 1 file changed, 43 deletions(-)
 delete mode 100755 tests/check-block.sh
tests/check-block.sh deleted +0 -43
deleted file mode 100755
index 5de2c1ba0b..0000000000
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-if [ "$#" -eq 0 ]; then
-    echo "Usage: $0 fmt..." >&2
-    exit 99
-fi
-
-# Honor the SPEED environment variable, just like we do it for "meson test"
-format_list="$@"
-if [ "$SPEED" = "slow" ] || [ "$SPEED" = "thorough" ]; then
-    group=
-else
-    group="-g auto"
-fi
-
-skip() {
-    echo "1..0 #SKIP $*"
-    exit 0
-}
-
-if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
-    skip "No qemu-system binary available ==> Not running the qemu-iotests."
-fi
-
-cd tests/qemu-iotests
-
-# QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests
-export QEMU_CHECK_BLOCK_AUTO=1
-export PYTHONUTF8=1
-# If make was called with -jN we want to call ./check with -j N. Extract the
-# flag from MAKEFLAGS, so that if it absent (or MAKEFLAGS is not defined), JOBS
-# would be an empty line otherwise JOBS is prepared string of flag with value:
-# "-j N"
-# Note, that the following works even if make was called with "-j N" or even
-# "--jobs N", as all these variants becomes simply "-jN" in MAKEFLAGS variable.
-JOBS=$(echo "$MAKEFLAGS" | sed -n 's/\(^\|.* \)-j\([0-9]\+\)\( .*\|$\)/-j \2/p')
-
-ret=0
-for fmt in $format_list ; do
-    ${PYTHON} ./check $JOBS -tap -$fmt $group || ret=1
-done
-
-exit $ret
Signature · 1 line
2.39.2
#35 lore raw

PATCH v2 26/32 contrib/gitdm: Add ASPEED Technology to the domain map

In reply to Alex Bennée

We have a number of contributors from this domain which is a corporate endeavour.

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map | 1 +
 1 file changed, 1 insertion(+)
contrib/gitdm/domain-map +1 -0
index 8913a886c9..65e40fe8e1 100644
@@ -5,6 +5,7 @@
 #
 
 amd.com         AMD
+aspeedtech.com  ASPEED Technology Inc.
 baidu.com       Baidu
 bytedance.com   ByteDance
 cmss.chinamobile.com China Mobile
Signature · 1 line
2.39.2
#36 lore raw

PATCH v2 27/32 contrib/gitdm: Add SYRMIA to the domain map

In reply to Alex Bennée

The company website lists QEMU amongst the things they work on so I assume these are corporate contributions.

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map | 1 +
 1 file changed, 1 insertion(+)
contrib/gitdm/domain-map +1 -0
index 65e40fe8e1..4a988c5b5f 100644
@@ -39,6 +39,7 @@ siemens.com     Siemens
 sifive.com      SiFive
 suse.com        SUSE
 suse.de         SUSE
+syrmia.com      SYRMIA
 ventanamicro.com Ventana Micro Systems
 virtuozzo.com   Virtuozzo
 vrull.eu        VRULL
Signature · 1 line
2.39.2
#37 lore raw

PATCH v2 28/32 contrib/gitdm: add Amazon to the domain map

In reply to Alex Bennée

We have multiple contributors from both .co.uk and .com versions of the address.

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map | 2 ++
 1 file changed, 2 insertions(+)
contrib/gitdm/domain-map +2 -0
index 4a988c5b5f..8dce276a1c 100644
@@ -4,6 +4,8 @@
 # This maps email domains to nice easy to read company names
 #
 
+amazon.com      Amazon
+amazon.co.uk    Amazon
 amd.com         AMD
 aspeedtech.com  ASPEED Technology Inc.
 baidu.com       Baidu
Signature · 1 line
2.39.2
Reviewed-by Paul Durrant on v2 28/32
#38 lore raw

RE: [PATCH v2 28/32] contrib/gitdm: add Amazon to the domain map

Quoted 71 lines

-----Original Message-----
From: Alex Bennée <[email protected]>
Sent: 15 March 2023 17:43
To: [email protected]
Cc: Akihiko Odaki <[email protected]>; Marc-André Lureau <[email protected]>; [email protected]; Riku Voipio <[email protected]>; Igor Mammedov <[email protected]>; Xiao Guangrong <[email protected]>; Thomas Huth <[email protected]>; Wainer dos Santos Moschetta <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Alex Williamson <[email protected]>; Hao Wu <[email protected]>; Cleber Rosa <[email protected]>; Daniel Henrique Barboza <[email protected]>; Jan Kiszka <[email protected]>; Aurelien Jarno <[email protected]>; [email protected]; Marcelo Tosatti <[email protected]>; Eduardo Habkost <[email protected]>; Alexandre Iooss <[email protected]>; Gerd Hoffmann <[email protected]>; Palmer Dabbelt <[email protected]>; Ilya Leoshkevich <[email protected]>; qemu- [email protected]; Juan Quintela <[email protected]>; Cédric Le Goater <[email protected]>; Darren Kenny <[email protected]>; [email protected]; Marcel Apfelbaum <[email protected]>; Peter Maydell <[email protected]>; Richard Henderson <[email protected]>; Stafford Horne <[email protected]>; Weiwei Li <[email protected]>; Sunil V L <[email protected]>; Stefan Hajnoczi <[email protected]>; Thomas Huth <[email protected]>; Vijai Kumar K <[email protected]>; Liu Zhiwei <[email protected]>; David Gibson <[email protected]>; Song Gao <[email protected]>; Paolo Bonzini <[email protected]>; Michael S. Tsirkin <[email protected]>; Niek Linnenbank <[email protected]>; Greg Kurz <[email protected]>; Laurent Vivier <[email protected]>; Qiuhao Li <[email protected]>; Philippe Mathieu-Daudé <[email protected]>; Xiaojuan Yang <[email protected]>; Mahmoud Mandour <[email protected]>; Alexander Bulekov <[email protected]>; Jiaxun Yang <[email protected]>; [email protected]; Yanan Wang <[email protected]>; David Woodhouse <[email protected]>; [email protected]; Strahinja Jankovic <[email protected]>; Bandan Das <[email protected]>; Alistair Francis <[email protected]>; Aleksandar Rikalo <[email protected]>; Tyrone Ting <[email protected]>; Kevin Wolf <[email protected]>; David Hildenbrand <[email protected]>; Beraldo Leal <[email protected]>; Beniamino Galvani <[email protected]>; Paul Durrant <[email protected]>; Bin Meng <[email protected]>; Sunil Muthuswamy <[email protected]>; Hanna Reitz <[email protected]>; Peter Xu <[email protected]>; Alex Bennée <[email protected]>; Graf (AWS), Alexander <[email protected]>; Durrant, Paul <[email protected]>; Woodhouse, David <[email protected]>
Subject: [EXTERNAL] [PATCH v2 28/32] contrib/gitdm: add Amazon to the domain map

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.

We have multiple contributors from both .co.uk and .com versions of the address.

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map | 2 ++
 1 file changed, 2 insertions(+)
contrib/gitdm/domain-map +0 -0
index 4a988c5b5f..8dce276a1c 100644

contrib/gitdm/domain-map line 8

Quoted 5 lines
contrib/gitdm/domain-map +2 -0
@@ -4,6 +4,8 @@
 # This maps email domains to nice easy to read company names
 #
 
+amazon.com      Amazon
+amazon.co.uk    Amazon

You might want 'amazon.de' too but as far as it goes...

Quoted 5 lines
contrib/gitdm/domain-map +0 -1
 amd.com         AMD
 aspeedtech.com  ASPEED Technology Inc.
 baidu.com       Baidu
--

2.39.2

Reviewed-by
#39 lore raw

Re: [PATCH v2 28/32] contrib/gitdm: add Amazon to the domain map

Quoted 74 lines · Paul
Quoted 74 lines

-----Original Message-----
From: Alex Bennée <[email protected]>
Sent: 15 March 2023 17:43
To: [email protected]
Cc: Akihiko Odaki <[email protected]>; Marc-André Lureau <[email protected]>; [email protected]; Riku Voipio <[email protected]>; Igor Mammedov <[email protected]>; Xiao Guangrong <[email protected]>; Thomas Huth <[email protected]>; Wainer dos Santos Moschetta <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Alex Williamson <[email protected]>; Hao Wu <[email protected]>; Cleber Rosa <[email protected]>; Daniel Henrique Barboza <[email protected]>; Jan Kiszka <[email protected]>; Aurelien Jarno <[email protected]>; [email protected]; Marcelo Tosatti <[email protected]>; Eduardo Habkost <[email protected]>; Alexandre Iooss <[email protected]>; Gerd Hoffmann <[email protected]>; Palmer Dabbelt <[email protected]>; Ilya Leoshkevich <[email protected]>; qemu- [email protected]; Juan Quintela <[email protected]>; Cédric Le Goater <[email protected]>; Darren Kenny <[email protected]>; [email protected]; Marcel Apfelbaum <[email protected]>; Peter Maydell <[email protected]>; Richard Henderson <[email protected]>; Stafford Horne <[email protected]>; Weiwei Li <[email protected]>; Sunil V L <[email protected]>; Stefan Hajnoczi <[email protected]>; Thomas Huth <[email protected]>; Vijai Kumar K <[email protected]>; Liu Zhiwei <[email protected]>; David Gibson <[email protected]>; Song Gao <[email protected]>; Paolo Bonzini <[email protected]>; Michael S. Tsirkin <[email protected]>; Niek Linnenbank <[email protected]>; Greg Kurz <[email protected]>; Laurent Vivier <[email protected]>; Qiuhao Li <[email protected]>; Philippe Mathieu-Daudé <[email protected]>; Xiaojuan Yang <[email protected]>; Mahmoud Mandour <[email protected]>; Alexander Bulekov <[email protected]>; Jiaxun Yang <[email protected]>; [email protected]; Yanan Wang <[email protected]>; David Woodhouse <[email protected]>; [email protected]; Strahinja Jankovic <[email protected]>; Bandan Das <[email protected]>; Alistair Francis <[email protected]>; Aleksandar Rikalo <[email protected]>; Tyrone Ting <[email protected]>; Kevin Wolf <[email protected]>; David Hildenbrand <[email protected]>; Beraldo Leal <[email protected]>; Beniamino Galvani <[email protected]>; Paul Durrant <[email protected]>; Bin Meng <[email protected]>; Sunil Muthuswamy <[email protected]>; Hanna Reitz <[email protected]>; Peter Xu <[email protected]>; Alex Bennée <[email protected]>; Graf (AWS), Alexander <[email protected]>; Durrant, Paul <[email protected]>; Woodhouse, David <[email protected]>
Subject: [EXTERNAL] [PATCH v2 28/32] contrib/gitdm: add Amazon to the domain map

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.

We have multiple contributors from both .co.uk and .com versions of the address.

Message-Id: <[email protected]>

---
  contrib/gitdm/domain-map | 2 ++
  1 file changed, 2 insertions(+)
contrib/gitdm/domain-map +0 -0
index 4a988c5b5f..8dce276a1c 100644
@@ -4,6 +4,8 @@
  # This maps email domains to nice easy to read company names
  #
 
Quoted 3 lines

contrib/gitdm/domain-map line 8

Quoted 2 lines
contrib/gitdm/domain-map +2 -0
+amazon.com      Amazon
+amazon.co.uk    Amazon

You might want 'amazon.de' too but as far as it goes...

Yes, please add amazon.de here. Once that's added, feel free to take my

Alex

Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879

#40 lore raw

PATCH v2 29/32 contrib/gitdm: add Alibaba to the domain-map

In reply to Alex Bennée

This replaces the previous attempt to add c-sky.com. Group everything under Alibaba now.

Added as requested by LIU Zhiwei.

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map        | 1 +
 contrib/gitdm/group-map-alibaba | 7 +++++++
 gitdm.config                    | 1 +
 3 files changed, 9 insertions(+)
 create mode 100644 contrib/gitdm/group-map-alibaba
contrib/gitdm/domain-map +1 -0
index 8dce276a1c..0b6c77eee0 100644
@@ -4,6 +4,7 @@
 # This maps email domains to nice easy to read company names
 #
 
+linux.alibaba.com Alibaba
 amazon.com      Amazon
 amazon.co.uk    Amazon
 amd.com         AMD
contrib/gitdm/group-map-alibaba new file +7 -0
new file mode 100644
index 0000000000..0ebbe6b06e
@@ -0,0 +1,7 @@
+#
+# Alibaba contributors including its subsidiaries 
+#
+
+# c-sky.com, now part of T-Head, wholly-owned entity of Alibaba Group
[email protected]
[email protected]
gitdm.config +1 -0
index 907ffde017..df4ba829ca 100644
@@ -31,6 +31,7 @@ EmailMap contrib/gitdm/domain-map
 # identifiable corporate emails. Please keep this list sorted.
 #
 
+GroupMap contrib/gitdm/group-map-alibaba Alibaba
 GroupMap contrib/gitdm/group-map-cadence Cadence Design Systems
 GroupMap contrib/gitdm/group-map-codeweavers CodeWeavers
 GroupMap contrib/gitdm/group-map-facebook Facebook
Signature · 1 line
2.39.2
#41 lore raw

PATCH v2 30/32 contrib/gitdm: add revng to domain map

In reply to Alex Bennée

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map | 1 +
 1 file changed, 1 insertion(+)
contrib/gitdm/domain-map +1 -0
index 0b6c77eee0..fa9cb5430f 100644
@@ -36,6 +36,7 @@ oracle.com      Oracle
 proxmox.com     Proxmox
 quicinc.com     Qualcomm Innovation Center
 redhat.com      Red Hat
+rev.ng          revng
 rt-rk.com       RT-RK
 samsung.com     Samsung
 siemens.com     Siemens
Signature · 1 line
2.39.2
#42 lore raw

Re: [PATCH v2 30/32] contrib/gitdm: add revng to domain map

Quoted 1 line · On Wed, 15 Mar 2023 17:43:29 +0000 Alex Bennée <[email protected]> wrote:

+rev.ng revng

Can we have "rev.ng Labs"?
I suggested this in my previous e-mail too, but maybe it slipped away.

Signature · 2 lines
Alessandro Di Federico
rev.ng Labs
#43 lore raw

PATCH v2 31/32 contrib/gitdm: add more individual contributors

In reply to Alex Bennée

I've only added the names explicitly acked.

Cc Bernhard Beschow <[email protected]>
Cc Amarjargal Gundjalam <[email protected]>
Cc Bin Meng <[email protected]>
Cc Jason A. Donenfeld <[email protected]>
Cc Strahinja Jankovic <[email protected]>

Message-Id: <[email protected]>

---
 contrib/gitdm/group-map-individuals | 1 +
 1 file changed, 1 insertion(+)
contrib/gitdm/group-map-individuals +1 -0
index e2263a5ee3..3264c7383d 100644
@@ -38,3 +38,4 @@ [email protected]
 [email protected]
 [email protected]
 [email protected]
[email protected]
Signature · 1 line
2.39.2
Reviewed-by on v2 31/32
#44 lore raw

Re: [PATCH v2 31/32] contrib/gitdm: add more individual contributors

Quoted 19 lines · Alex Bennée

I've only added the names explicitly acked.

Cc Bernhard Beschow <[email protected]>
Cc Amarjargal Gundjalam <[email protected]>
Cc Bin Meng <[email protected]>
Cc Jason A. Donenfeld <[email protected]>
Cc Strahinja Jankovic <[email protected]>

Message-Id: <[email protected]>

---
  contrib/gitdm/group-map-individuals | 1 +
  1 file changed, 1 insertion(+)
contrib/gitdm/group-map-individuals +0 -0
index e2263a5ee3..3264c7383d 100644

contrib/gitdm/group-map-individuals [email protected] · line 41

Quoted 4 lines
contrib/gitdm/group-map-individuals +1 -0
@@ -38,3 +38,4 @@ [email protected]
  [email protected]
  [email protected]
  [email protected]
[email protected]

FWIW:

#45 lore raw

PATCH v2 32/32 contrib/gitdm: add group map for AMD

In reply to Alex Bennée

AMD recently acquired Xilinx and contributors have been transitioning their emails across.

Cc Vikram Garhwal <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Sai Pavan Boddu <[email protected]>
Cc Tong Ho <[email protected]>

Message-Id: <[email protected]>

---
 contrib/gitdm/domain-map    | 1 -
 contrib/gitdm/group-map-amd | 8 ++++++++
 gitdm.config                | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 contrib/gitdm/group-map-amd
contrib/gitdm/domain-map +0 -1
index fa9cb5430f..f78c69fa54 100644
@@ -49,6 +49,5 @@ virtuozzo.com   Virtuozzo
 vrull.eu        VRULL
 wdc.com         Western Digital
 windriver.com   Wind River
-xilinx.com      Xilinx
 yadro.com       YADRO
 yandex-team.ru  Yandex
contrib/gitdm/group-map-amd new file +8 -0
new file mode 100644
index 0000000000..bda4239a8a
@@ -0,0 +1,8 @@
+# AMD acquired Xilinx and contributors have been slowly updating emails
+
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
gitdm.config +1 -0
index df4ba829ca..9db43ca142 100644
@@ -32,6 +32,7 @@ EmailMap contrib/gitdm/domain-map
 #
 
 GroupMap contrib/gitdm/group-map-alibaba Alibaba
+GroupMap contrib/gitdm/group-map-amd AMD
 GroupMap contrib/gitdm/group-map-cadence Cadence Design Systems
 GroupMap contrib/gitdm/group-map-codeweavers CodeWeavers
 GroupMap contrib/gitdm/group-map-facebook Facebook
Signature · 1 line
2.39.2