[PATCH v2 00/18] Complete the implementation of -accel

Paolo Bonzini posted 18 patches 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1575903705-12925-1-git-send-email-pbonzini@redhat.com
Maintainers: Richard Henderson <rth@twiddle.net>, David Gibson <david@gibson.dropbear.id.au>, David Hildenbrand <david@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Paul Durrant <paul@xen.org>, Aleksandar Markovic <amarkovic@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Christian Borntraeger <borntraeger@de.ibm.com>, "Daniel P. Berrangé" <berrange@redhat.com>, James Hogan <jhogan@kernel.org>, Marcelo Tosatti <mtosatti@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, Stefano Stabellini <sstabellini@kernel.org>, Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>, Halil Pasic <pasic@linux.ibm.com>
Makefile.objs             |   1 +
accel/Makefile.objs       |   2 +-
accel/accel.c             |  73 +--------------
accel/kvm/kvm-all.c       | 117 ++++++++++++++++++++++--
accel/tcg/tcg-all.c       | 149 +++++++++++++++++++++++++++++-
cpus.c                    |  72 ---------------
hw/core/machine.c         | 141 -----------------------------
hw/ppc/e500.c             |   4 +-
hw/ppc/spapr_irq.c        |  10 +--
hw/xen/xen-common.c       |  16 ++++
include/hw/boards.h       |   7 --
include/qom/object.h      |  13 +++
include/sysemu/accel.h    |   4 +-
include/sysemu/cpus.h     |   2 -
include/sysemu/kvm.h      |   7 +-
memory.c                  |   5 +-
qemu-deprecated.texi      |   6 ++
qemu-options.hx           |  30 ++++---
qom/object.c              |  28 +++++-
target/arm/kvm.c          |   8 +-
target/i386/cpu.c         |   8 +-
target/i386/kvm.c         |   6 +-
target/mips/kvm.c         |   2 +-
target/ppc/kvm.c          |   2 +-
target/s390x/cpu_models.c |   4 +-
target/s390x/kvm.c        |   2 +-
vl.c                      | 225 ++++++++++++++++++++++++++++++++--------------
27 files changed, 532 insertions(+), 412 deletions(-)
[PATCH v2 00/18] Complete the implementation of -accel
Posted by Paolo Bonzini 4 years, 4 months ago
This series completes the implementation of -accel:

- Alternative accelerators can be specified with multiple -accel options,
  and each -accel option will configure the respective accelerator.
  This is implemented in patches 1 to 6, with a small addendum in patch 7.

- Accelerators can now support arbitrary options, which are implemented
  in terms of QOM properties.  This is implemented in patches 8 to 11,
  together with the conversion of the sole existing "-accel" option to QOM.

- Accelerator-related machine options, and legacy options such as -tb-size,
  forward to accelerator objects for backwards compatibility, but they
  do not exist anymore as QOM properties.  This is implemented in patch
  6 for "-machine accel" and patches 12 to 16 for everything else.

Paolo

v1->v2: improve bisectability by moving patch "vl: move icount configuration
        earlier" towards the beginning of the series

        new patch to compile accel/accel.c just once

Paolo Bonzini (18):
  memory: do not look at current_machine->accel
  vl: move icount configuration earlier
  tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c
  vl: extract accelerator option processing to a separate function
  vl: merge -accel processing into configure_accelerators
  accel: compile accel/accel.c just once
  vl: introduce object_parse_property_opt
  vl: configure accelerators from -accel options
  vl: warn for unavailable accelerators, clarify messages
  qom: introduce object_register_sugar_prop
  qom: add object_new_with_class
  accel: pass object to accel_init_machine
  tcg: convert "-accel threads" to a QOM property
  tcg: add "-accel tcg,tb-size" and deprecate "-tb-size"
  xen: convert "-machine igd-passthru" to an accelerator property
  kvm: convert "-machine kvm_shadow_mem" to an accelerator property
  kvm: introduce kvm_kernel_irqchip_* functions
  kvm: convert "-machine kernel_irqchip" to an accelerator property

 Makefile.objs             |   1 +
 accel/Makefile.objs       |   2 +-
 accel/accel.c             |  73 +--------------
 accel/kvm/kvm-all.c       | 117 ++++++++++++++++++++++--
 accel/tcg/tcg-all.c       | 149 +++++++++++++++++++++++++++++-
 cpus.c                    |  72 ---------------
 hw/core/machine.c         | 141 -----------------------------
 hw/ppc/e500.c             |   4 +-
 hw/ppc/spapr_irq.c        |  10 +--
 hw/xen/xen-common.c       |  16 ++++
 include/hw/boards.h       |   7 --
 include/qom/object.h      |  13 +++
 include/sysemu/accel.h    |   4 +-
 include/sysemu/cpus.h     |   2 -
 include/sysemu/kvm.h      |   7 +-
 memory.c                  |   5 +-
 qemu-deprecated.texi      |   6 ++
 qemu-options.hx           |  30 ++++---
 qom/object.c              |  28 +++++-
 target/arm/kvm.c          |   8 +-
 target/i386/cpu.c         |   8 +-
 target/i386/kvm.c         |   6 +-
 target/mips/kvm.c         |   2 +-
 target/ppc/kvm.c          |   2 +-
 target/s390x/cpu_models.c |   4 +-
 target/s390x/kvm.c        |   2 +-
 vl.c                      | 225 ++++++++++++++++++++++++++++++++--------------
 27 files changed, 532 insertions(+), 412 deletions(-)

-- 
1.8.3.1


Re: [PATCH v2 00/18] Complete the implementation of -accel
Posted by no-reply@patchew.org 4 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/1575903705-12925-1-git-send-email-pbonzini@redhat.com/



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      migration/fd.o
  CC      migration/exec.o
/tmp/qemu-test/src/hw/xen/xen-common.c: In function 'xen_get_igd_gfx_passthru':
/tmp/qemu-test/src/hw/xen/xen-common.c:129:12: error: 'has_igd_gfx_passthru' undeclared (first use in this function)
     return has_igd_gfx_passthru;
            ^
/tmp/qemu-test/src/hw/xen/xen-common.c:129:12: note: each undeclared identifier is reported only once for each function it appears in
/tmp/qemu-test/src/hw/xen/xen-common.c: In function 'xen_set_igd_gfx_passthru':
/tmp/qemu-test/src/hw/xen/xen-common.c:134:5: error: 'has_igd_gfx_passthru' undeclared (first use in this function)
     has_igd_gfx_passthru = value;
     ^
/tmp/qemu-test/src/hw/xen/xen-common.c: In function 'xen_accel_class_init':
/tmp/qemu-test/src/hw/xen/xen-common.c:193:10: error: 'error_abort' undeclared (first use in this function)
         &error_abort);
          ^
make: *** [hw/xen/xen-common.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 662, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=4ff14485a3e34faa8e0fe7af9be44271', '-u', '1003', '--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/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-vvzmvig_/src/docker-src.2019-12-09-17.39.39.16043:/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=4ff14485a3e34faa8e0fe7af9be44271
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-vvzmvig_/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    2m51.895s
user    0m7.919s


The full log is available at
http://patchew.org/logs/1575903705-12925-1-git-send-email-pbonzini@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v2 00/18] Complete the implementation of -accel
Posted by no-reply@patchew.org 4 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/1575903705-12925-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH v2 00/18] Complete the implementation of -accel
Type: series
Message-id: 1575903705-12925-1-git-send-email-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
fabb8b3 kvm: convert "-machine kernel_irqchip" to an accelerator property
6a1dbee kvm: introduce kvm_kernel_irqchip_* functions
800c958 kvm: convert "-machine kvm_shadow_mem" to an accelerator property
d72d3ea xen: convert "-machine igd-passthru" to an accelerator property
24067b2 tcg: add "-accel tcg, tb-size" and deprecate "-tb-size"
8b42a7e tcg: convert "-accel threads" to a QOM property
3ebd51d accel: pass object to accel_init_machine
4351594 qom: add object_new_with_class
314fb80 qom: introduce object_register_sugar_prop
0995654 vl: warn for unavailable accelerators, clarify messages
5c7b904 vl: configure accelerators from -accel options
6a4da93 vl: introduce object_parse_property_opt
a4b9880 accel: compile accel/accel.c just once
62cdc79 vl: merge -accel processing into configure_accelerators
6246357 vl: extract accelerator option processing to a separate function
63877b9 tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c
1bd01e6 vl: move icount configuration earlier
86d414d memory: do not look at current_machine->accel

=== OUTPUT BEGIN ===
1/18 Checking commit 86d414d86513 (memory: do not look at current_machine->accel)
2/18 Checking commit 1bd01e62ccaf (vl: move icount configuration earlier)
3/18 Checking commit 63877b94ad15 (tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c)
4/18 Checking commit 62463579c28f (vl: extract accelerator option processing to a separate function)
5/18 Checking commit 62cdc7986f89 (vl: merge -accel processing into configure_accelerators)
6/18 Checking commit a4b98800e6a2 (accel: compile accel/accel.c just once)
7/18 Checking commit 6a4da93b15b0 (vl: introduce object_parse_property_opt)
8/18 Checking commit 5c7b904bf344 (vl: configure accelerators from -accel options)
WARNING: line over 80 characters
#206: FILE: vl.c:2909:
+            error_report("The -accel and \"-machine accel=\" options are incompatible");

WARNING: line over 80 characters
#214: FILE: vl.c:2915:
+                           do_configure_accelerator, &init_failed, &error_fatal)) {

total: 0 errors, 2 warnings, 196 lines checked

Patch 8/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/18 Checking commit 099565450487 (vl: warn for unavailable accelerators, clarify messages)
10/18 Checking commit 314fb80d9a2c (qom: introduce object_register_sugar_prop)
WARNING: line over 80 characters
#24: FILE: include/qom/object.h:682:
+void object_register_sugar_prop(const char *driver, const char *prop, const char *value);

WARNING: line over 80 characters
#48: FILE: qom/object.c:428:
+void object_register_sugar_prop(const char *driver, const char *prop, const char *value)

total: 0 errors, 2 warnings, 61 lines checked

Patch 10/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/18 Checking commit 4351594192c0 (qom: add object_new_with_class)
WARNING: line over 80 characters
#142: FILE: vl.c:3992:
+    current_machine = MACHINE(object_new_with_class(OBJECT_CLASS(machine_class)));

total: 0 errors, 1 warnings, 96 lines checked

Patch 11/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
12/18 Checking commit 3ebd51dc3893 (accel: pass object to accel_init_machine)
13/18 Checking commit 8b42a7e25f3f (tcg: convert "-accel threads" to a QOM property)
14/18 Checking commit 24067b2d77d6 (tcg: add "-accel tcg, tb-size" and deprecate "-tb-size")
ERROR: line over 90 characters
#189: FILE: vl.c:3750:
+                warn_report("The -tb-size option is deprecated, use -accel tcg,tb-size instead");

WARNING: line over 80 characters
#190: FILE: vl.c:3751:
+                object_register_sugar_prop(ACCEL_CLASS_NAME("tcg"), "tb-size", optarg);

total: 1 errors, 1 warnings, 148 lines checked

Patch 14/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

15/18 Checking commit d72d3ea5e7e4 (xen: convert "-machine igd-passthru" to an accelerator property)
16/18 Checking commit 800c95819ba7 (kvm: convert "-machine kvm_shadow_mem" to an accelerator property)
WARNING: line over 80 characters
#228: FILE: target/i386/kvm.c:2166:
+    shadow_mem = object_property_get_int(OBJECT(s), "kvm-shadow-mem", &error_abort);

total: 0 errors, 1 warnings, 197 lines checked

Patch 16/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/18 Checking commit 6a1dbee7f610 (kvm: introduce kvm_kernel_irqchip_* functions)
18/18 Checking commit fabb8b30a711 (kvm: convert "-machine kernel_irqchip" to an accelerator property)
WARNING: Block comments use a leading /* on a separate line
#85: FILE: accel/kvm/kvm-all.c:3007:
+            /* The value was checked in visit_type_OnOffSplit() above. If

total: 0 errors, 1 warnings, 241 lines checked

Patch 18/18 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1575903705-12925-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com