Re: [RFC v6 0/4] QEMU cpus.c refactoring
Patchew URL: https://patchew.org/QEMU/20200618190401.4895-1-cfont...@suse.de/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export ARCH=x86_64 make docker-image-fedora V=1 NETWORK=1 time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 === TEST SCRIPT END === CC backends/rng-builtin.o CC backends/rng-random.o CC backends/tpm.o /tmp/qemu-test/src/dma-helpers.c:154:20: error: use of undeclared identifier 'use_icount' if (mem && use_icount && dbs->dir == DMA_DIRECTION_FROM_DEVICE) { ^ 1 error generated. make: *** [/tmp/qemu-test/src/rules.mak:69: dma-helpers.o] Error 1 make: *** Waiting for unfinished jobs Traceback (most recent call last): File "./tests/docker/docker.py", line 669, in --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=ee200de2b1c042c6a61d565997d83f7d', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-yi6rts79/src/docker-src.2020-06-18-15.16.58.31304:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=ee200de2b1c042c6a61d565997d83f7d make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-yi6rts79/src' make: *** [docker-run-test-debug@fedora] Error 2 real3m49.171s user0m8.544s The full log is available at http://patchew.org/logs/20200618190401.4895-1-cfont...@suse.de/testing.asan/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
Re: [RFC v6 0/4] QEMU cpus.c refactoring
Patchew URL: https://patchew.org/QEMU/20200618190401.4895-1-cfont...@suse.de/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-centos7 V=1 NETWORK=1 time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === CC audio/spiceaudio.o CC audio/wavcapture.o /tmp/qemu-test/src/dma-helpers.c: In function 'dma_blk_cb': /tmp/qemu-test/src/dma-helpers.c:154:20: error: 'use_icount' undeclared (first use in this function) if (mem && use_icount && dbs->dir == DMA_DIRECTION_FROM_DEVICE) { ^ /tmp/qemu-test/src/dma-helpers.c:154:20: note: each undeclared identifier is reported only once for each function it appears in make: *** [dma-helpers.o] Error 1 make: *** Waiting for unfinished jobs Traceback (most recent call last): File "./tests/docker/docker.py", line 669, in --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=a051d518277a4c87b0693e58cfd4408b', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-k2f41z2d/src/docker-src.2020-06-18-15.14.16.19744:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=a051d518277a4c87b0693e58cfd4408b make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-k2f41z2d/src' make: *** [docker-run-test-quick@centos7] Error 2 real2m27.787s user0m8.701s The full log is available at http://patchew.org/logs/20200618190401.4895-1-cfont...@suse.de/testing.docker-quick@centos7/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
Re: [RFC v6 0/4] QEMU cpus.c refactoring
Patchew URL: https://patchew.org/QEMU/20200618190401.4895-1-cfont...@suse.de/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #! /bin/bash export ARCH=x86_64 make docker-image-fedora V=1 NETWORK=1 time make docker-test-mingw@fedora J=14 NETWORK=1 === TEST SCRIPT END === CC backends/rng-builtin.o CC backends/hostmem.o /tmp/qemu-test/src/dma-helpers.c: In function 'dma_blk_cb': /tmp/qemu-test/src/dma-helpers.c:154:20: error: 'use_icount' undeclared (first use in this function) 154 | if (mem && use_icount && dbs->dir == DMA_DIRECTION_FROM_DEVICE) { |^~ /tmp/qemu-test/src/dma-helpers.c:154:20: note: each undeclared identifier is reported only once for each function it appears in make: *** [/tmp/qemu-test/src/rules.mak:69: dma-helpers.o] Error 1 make: *** Waiting for unfinished jobs Traceback (most recent call last): File "./tests/docker/docker.py", line 669, in --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=552161979fa24612938148f7958fb4a8', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-469ygt4n/src/docker-src.2020-06-18-15.12.41.17535:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=552161979fa24612938148f7958fb4a8 make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-469ygt4n/src' make: *** [docker-run-test-mingw@fedora] Error 2 real3m18.463s user0m8.153s The full log is available at http://patchew.org/logs/20200618190401.4895-1-cfont...@suse.de/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-de...@redhat.com
[RFC v6 0/4] QEMU cpus.c refactoring
Motivation and higher level steps: https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg04628.html MAIN OPEN POINTS: * confirmation on hvf state (Roman) * naming of "cpus.c" and functions, more cpus_ prefix use? (Roman) * should we accept the addional clunkyness and overhead for each call of the kick and CPU sync state for all archs/accels of putting CpusAccel inside AccelClass? I would tend towards no here, but welcome further opinions or data if any. (Roman) * should we reorder patches or moves inside patches to avoid code going from cpus.c to softmmu/cpus.c and then again to softmmu/somethingelse.c ? (Philippe) * some questions about headers in include/softmmu (Philippe) v5 -> v6: * rebased changes on top of Emilio G. Cota changes to cpus.c "cpu: convert queued work to a QSIMPLEQ" * keep a pointer in cpus.c instead of a copy of CpusAccel (Alex) v4 -> v5: rebase on latest master * rebased changes on top of roman series to remove one of the extra states for hvf. (Is the result now functional for HVF?) * rebased changes on top of icount changes and fixes to icount_configure and the new shift vmstate. (Markus) v3 -> v4: * overall: added copyright headers to all files that were missing them (used copyright and license of the module the stuff was extracted from). For the new interface files, added SUSE LLC. * 1/4 (move softmmu only files from root): MAINTAINERS: moved softmmu/cpus.c to its final location (from patch 2) * 2/4 (cpu-throttle): MAINTAINERS (to patch 1), copyright Fabrice Bellard and license from cpus.c * 3/4 (cpu-timers, icount): - MAINTAINERS: add cpu-timers.c and icount.c to Paolo - break very long lines (patchew) - add copyright SUSE LLC, GPLv2 to cpu-timers.h - add copyright Fabrice Bellard and license from cpus.c to timers-state.h as it is lifted from cpus.c - vl.c: in configure_accelerators bail out if icount_enabled() and !tcg_enabled() as qtest does not enable icount anymore. * 4/4 (accel stuff to accel): - add copyright SUSE LLC to files that mostly only consist of the new interface. Add whatever copyright was in the accelerator code if instead they mostly consist of accelerator code. - change a comment to mention the result of the AccelClass experiment - moved qtest accelerator into accel/qtest/ , make it like the others. - rename xxx-cpus-interface to xxx-cpus (remove "interface" from names) - rename accel_int to cpus_accel - rename CpusAccel functions from cpu_synchronize_* to synchronize_* v2 -> v3: * turned into a 4 patch series, adding a first patch moving softmmu code currently in top_srcdir to softmmu/ * cpu-throttle: moved to softmmu/ * cpu-timers, icount: - moved to softmmu/ - fixed assumption of qtest_enabled() => icount_enabled() causing the failure of check-qtest-arm goal, in test-arm-mptimer.c Fix is in hw/core/ptimer.c, where the artificial timeout rate limit should not be applied under qtest_enabled(), in a similar way to how it is not applied for icount_enabled(). * CpuAccelInterface: no change. v1 -> v2: * 1/3 (cpu-throttle): provide a description in the commit message * 2/3 (cpu-timers, icount): in this v2 separate icount from cpu-timers, as icount is actually TCG-specific. Only build it under CONFIG_TCG. To do this, qtest had to be detached from icount. To this end, a trivial global counter for qtest has been introduced. * 3/3 (CpuAccelInterface): provided a description. This is point 8) in that plan. The idea is to extract the unrelated parts in cpus, and register interfaces from each single accelerator to the main cpus module (cpus.c). While doing this RFC, I noticed some assumptions about Windows being either TCG or HAX (not considering WHPX) that might need to be revisited. I added a comment there. The thing builds successfully based on Linux cross-compilations for windows/hax, windows/whpx, and I got a good build on Darwin/hvf. Tests run successully for tcg and kvm configurations, but did not test on windows or darwin. Welcome your feedback and help on this, Claudio Claudio Fontana (4): softmmu: move softmmu only files from root cpu-throttle: new module, extracted from cpus.c cpu-timers, icount: new modules cpus: extract out accel-specific code to each accel MAINTAINERS | 14 +- Makefile.target |7 +- accel/kvm/Makefile.objs |2 + accel/kvm/kvm-all.c | 15 +- accel/kvm/kvm-cpus-interface.c | 94 ++ accel/kvm/kvm-cpus-interface.h |8 + accel/qtest.c| 88 +- accel/stubs/kvm-stub.c |3 +- accel/tcg/Makefile.objs |1 + accel/tcg/cpu-exec.c | 43 +- accel/tcg/tcg-all.c | 19 +-