[RFC PATCH 00/19] accel: Preparatory cleanups for split-accel

Philippe Mathieu-Daudé posted 19 patches 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250606164418.98655-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Peter Maydell <peter.maydell@linaro.org>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
There is a newer version of this series
accel/accel-internal.h            |  2 ++
accel/tcg/tcg-accel-ops-mttcg.h   |  3 +-
accel/tcg/tcg-accel-ops.h         |  1 +
include/qemu/accel.h              |  8 ++++-
include/system/accel-ops.h        |  5 +++-
include/system/cpus.h             |  5 ++--
include/system/hvf_int.h          |  1 +
accel/accel-common.c              | 49 +++++++++++++++++++++++++++++--
accel/accel-system.c              |  5 ++--
accel/dummy-cpus.c                | 10 ++-----
accel/hvf/hvf-accel-ops.c         | 25 +++-------------
accel/kvm/kvm-accel-ops.c         | 12 +-------
accel/kvm/kvm-all.c               |  6 ++--
accel/qtest/qtest.c               |  5 ++--
accel/tcg/tcg-accel-ops-mttcg.c   | 17 +----------
accel/tcg/tcg-accel-ops-rr.c      |  3 +-
accel/tcg/tcg-accel-ops.c         | 14 +++++++--
accel/tcg/tcg-all.c               |  4 +--
accel/xen/xen-all.c               |  3 +-
bsd-user/main.c                   |  2 +-
hw/arm/virt.c                     |  2 +-
linux-user/main.c                 |  2 +-
system/cpus.c                     |  9 ++++--
target/i386/nvmm/nvmm-accel-ops.c | 12 +-------
target/i386/nvmm/nvmm-all.c       |  2 +-
target/i386/whpx/whpx-accel-ops.c | 12 +-------
target/i386/whpx/whpx-all.c       |  2 +-
27 files changed, 110 insertions(+), 111 deletions(-)
[RFC PATCH 00/19] accel: Preparatory cleanups for split-accel
Posted by Philippe Mathieu-Daudé 5 months, 1 week ago
Few changes needed before being able to add the
split acceleration. Mostly adapting few prototypes
so callees have all necessary information.

Philippe Mathieu-Daudé (19):
  hw/arm/virt: Only require TCG || QTest to use virtualization extension
  system/cpus: Only kick running vCPUs
  accel: Keep reference to AccelOpsClass in AccelClass
  accel: Propagate AccelState to AccelClass::init_machine()
  accel/kvm: Prefer local AccelState over global MachineState::accel
  accel/hvf: Fix TYPE_HVF_ACCEL instance size
  accel/hvf: Re-use QOM allocated state
  accel/tcg: Prefer local AccelState over global current_accel()
  accel: Factor accel_cpu_realize() out
  accel/dummy: Factor dummy_thread_precreate() out
  accel/dummy: Factor tcg_vcpu_thread_precreate() out
  accel: Factor accel_create_vcpu_thread() out
  accel: Introduce AccelOpsClass::cpu_thread_routine handler
  accel/dummy: Convert to AccelOpsClass::cpu_thread_routine
  accel/tcg: Convert to AccelOpsClass::cpu_thread_routine
  accel/hvf: Convert to AccelOpsClass::cpu_thread_routine
  accel/kvm: Convert to AccelOpsClass::cpu_thread_routine
  accel/nvmm: Convert to AccelOpsClass::cpu_thread_routine
  accel/whpx: Convert to AccelOpsClass::cpu_thread_routine

 accel/accel-internal.h            |  2 ++
 accel/tcg/tcg-accel-ops-mttcg.h   |  3 +-
 accel/tcg/tcg-accel-ops.h         |  1 +
 include/qemu/accel.h              |  8 ++++-
 include/system/accel-ops.h        |  5 +++-
 include/system/cpus.h             |  5 ++--
 include/system/hvf_int.h          |  1 +
 accel/accel-common.c              | 49 +++++++++++++++++++++++++++++--
 accel/accel-system.c              |  5 ++--
 accel/dummy-cpus.c                | 10 ++-----
 accel/hvf/hvf-accel-ops.c         | 25 +++-------------
 accel/kvm/kvm-accel-ops.c         | 12 +-------
 accel/kvm/kvm-all.c               |  6 ++--
 accel/qtest/qtest.c               |  5 ++--
 accel/tcg/tcg-accel-ops-mttcg.c   | 17 +----------
 accel/tcg/tcg-accel-ops-rr.c      |  3 +-
 accel/tcg/tcg-accel-ops.c         | 14 +++++++--
 accel/tcg/tcg-all.c               |  4 +--
 accel/xen/xen-all.c               |  3 +-
 bsd-user/main.c                   |  2 +-
 hw/arm/virt.c                     |  2 +-
 linux-user/main.c                 |  2 +-
 system/cpus.c                     |  9 ++++--
 target/i386/nvmm/nvmm-accel-ops.c | 12 +-------
 target/i386/nvmm/nvmm-all.c       |  2 +-
 target/i386/whpx/whpx-accel-ops.c | 12 +-------
 target/i386/whpx/whpx-all.c       |  2 +-
 27 files changed, 110 insertions(+), 111 deletions(-)

-- 
2.49.0


Re: [RFC PATCH 00/19] accel: Preparatory cleanups for split-accel
Posted by Alex Bennée 5 months, 1 week ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Few changes needed before being able to add the
> split acceleration. Mostly adapting few prototypes
> so callees have all necessary information.

make check-tcg failed:

  ➜  make check-tcg
  /home/alex/lsrc/qemu.git/builds/arm.all/pyvenv/bin/meson introspect --targets --tests --benchmarks | /home/alex/lsrc/qemu.git/builds/arm.all/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest
    BUILD   aarch64-softmmu guest-tests
  tests/tcg/aarch64-softmmu: -march=armv8.3-a detected
  tests/tcg/aarch64-softmmu: -march=armv8.5-a+memtag detected
    RUN     aarch64-softmmu guest-tests
    TEST    feat-xs on aarch64
  qemu-system-aarch64: ../../system/cpus.c:685: cpus_register_accel: Assertion `ops->create_vcpu_thread != NULL' failed.
  Aborted
  make[1]: *** [Makefile:195: run-feat-xs] Error 134
  make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:56: run-tcg-tests-aarch64-softmmu] Error 2

<snip>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro