[PATCH 0/8] hw/cpu: Slightly sanitize CPU API

Philippe Mathieu-Daudé posted 8 patches 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260811183410.22428-1-philmd@oss.qualcomm.com
Maintainers: "Philippe Mathieu-Daudé" <philmd@mailo.com>, Zhao Liu <zhao1.liu@intel.com>, Richard Henderson <richard.henderson@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Brian Cain <brian.cain@oss.qualcomm.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Helge Deller <deller@gmx.de>, Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Song Gao <17746591750@163.com>, Bibo Mao <maobibo@loongson.cn>, Xianglai Li <lixianglai@loongson.cn>, Laurent Vivier <laurent@vivier.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <arikalo@gmail.com>, Stafford Horne <shorne@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>, Glenn Miles <milesg@linux.ibm.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>, Yoshinori Sato <yoshinori.sato@nifty.com>, Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, Max Filippov <jcmvbkbc@gmail.com>
hw/core/cpu-internal.h     | 23 +++++++++++++++++++++++
include/hw/core/cpu.h      | 15 ++++++---------
hw/core/cpu-common.c       | 32 +++++++-------------------------
hw/core/cpu-system.c       | 29 ++++++++++++++++++++++++++++-
hw/core/cpu-user.c         |  8 +++++++-
target/alpha/cpu.c         |  2 +-
target/arm/cpu.c           |  2 +-
target/avr/cpu.c           |  2 +-
target/hexagon/cpu.c       |  2 +-
target/hppa/cpu.c          |  2 +-
target/i386/cpu.c          | 10 +++++-----
target/i386/kvm/kvm-cpu.c  |  4 ++--
target/loongarch/cpu.c     |  2 +-
target/m68k/cpu.c          |  2 +-
target/microblaze/cpu.c    |  2 +-
target/mips/cpu.c          |  2 +-
target/or1k/cpu.c          |  2 +-
target/ppc/cpu_init.c      |  4 ++--
target/riscv/cpu.c         |  2 +-
target/riscv/kvm/kvm-cpu.c |  2 +-
target/riscv/tcg/tcg-cpu.c |  2 +-
target/rx/cpu.c            |  2 +-
target/s390x/cpu.c         |  2 +-
target/sh4/cpu.c           |  2 +-
target/sparc/cpu.c         |  2 +-
target/tricore/cpu.c       |  2 +-
target/xtensa/cpu.c        |  2 +-
27 files changed, 99 insertions(+), 64 deletions(-)
create mode 100644 hw/core/cpu-internal.h
[PATCH 0/8] hw/cpu: Slightly sanitize CPU API
Posted by Philippe Mathieu-Daudé 2 weeks ago
API cleanups, mostly removing system-specific code out of
cpu-common.c. Code churn renaming functions, in the hope
to make things a bit simpler to understand.

Small patch set extracted from a series clarifying CPU /
accel synchronization, itself a preliminary work to introduce
split acceleration, eventually.

Philippe Mathieu-Daudé (8):
  hw/cpu: Correct CPU_GET_CLASS() comment
  hw/cpu: Include missing 'qemu/accel.h' header
  hw/cpu: Move internal declarations to new 'cpu-internal.h' header
  hw/cpu: Rename cpu_common_realizefn() -> cpu_exec_realize()
  hw/cpu: Rename cpu_exec_realizefn() -> cpu_common_realize()
  hw/cpu: Rename cpu_exec_unrealizefn() -> cpu_common_unrealize()
  hw/cpu: Extract cpu_exec_realize() out of cpu_common_realizefn()
  hw/cpu: Move system-specific cpu_exec_realize() to cpu-system.c

 hw/core/cpu-internal.h     | 23 +++++++++++++++++++++++
 include/hw/core/cpu.h      | 15 ++++++---------
 hw/core/cpu-common.c       | 32 +++++++-------------------------
 hw/core/cpu-system.c       | 29 ++++++++++++++++++++++++++++-
 hw/core/cpu-user.c         |  8 +++++++-
 target/alpha/cpu.c         |  2 +-
 target/arm/cpu.c           |  2 +-
 target/avr/cpu.c           |  2 +-
 target/hexagon/cpu.c       |  2 +-
 target/hppa/cpu.c          |  2 +-
 target/i386/cpu.c          | 10 +++++-----
 target/i386/kvm/kvm-cpu.c  |  4 ++--
 target/loongarch/cpu.c     |  2 +-
 target/m68k/cpu.c          |  2 +-
 target/microblaze/cpu.c    |  2 +-
 target/mips/cpu.c          |  2 +-
 target/or1k/cpu.c          |  2 +-
 target/ppc/cpu_init.c      |  4 ++--
 target/riscv/cpu.c         |  2 +-
 target/riscv/kvm/kvm-cpu.c |  2 +-
 target/riscv/tcg/tcg-cpu.c |  2 +-
 target/rx/cpu.c            |  2 +-
 target/s390x/cpu.c         |  2 +-
 target/sh4/cpu.c           |  2 +-
 target/sparc/cpu.c         |  2 +-
 target/tricore/cpu.c       |  2 +-
 target/xtensa/cpu.c        |  2 +-
 27 files changed, 99 insertions(+), 64 deletions(-)
 create mode 100644 hw/core/cpu-internal.h

-- 
2.53.0


Re: [PATCH 0/8] hw/cpu: Slightly sanitize CPU API
Posted by Philippe Mathieu-Daudé 1 week, 3 days ago
On 11/8/26 20:34, Philippe Mathieu-Daudé wrote:
> API cleanups, mostly removing system-specific code out of
> cpu-common.c. Code churn renaming functions, in the hope
> to make things a bit simpler to understand.
> 
> Small patch set extracted from a series clarifying CPU /
> accel synchronization, itself a preliminary work to introduce
> split acceleration, eventually.
> 
> Philippe Mathieu-Daudé (8):
>    hw/cpu: Correct CPU_GET_CLASS() comment
>    hw/cpu: Include missing 'qemu/accel.h' header
>    hw/cpu: Move internal declarations to new 'cpu-internal.h' header
>    hw/cpu: Rename cpu_common_realizefn() -> cpu_exec_realize()
>    hw/cpu: Rename cpu_exec_realizefn() -> cpu_common_realize()
>    hw/cpu: Rename cpu_exec_unrealizefn() -> cpu_common_unrealize()
>    hw/cpu: Extract cpu_exec_realize() out of cpu_common_realizefn()
>    hw/cpu: Move system-specific cpu_exec_realize() to cpu-system.c

Series queued.

Re: [PATCH 0/8] hw/cpu: Slightly sanitize CPU API
Posted by Richard Henderson 2 weeks ago
On 8/11/26 11:34, Philippe Mathieu-Daudé wrote:
> API cleanups, mostly removing system-specific code out of
> cpu-common.c. Code churn renaming functions, in the hope
> to make things a bit simpler to understand.
> 
> Small patch set extracted from a series clarifying CPU /
> accel synchronization, itself a preliminary work to introduce
> split acceleration, eventually.
> 
> Philippe Mathieu-Daudé (8):
>    hw/cpu: Correct CPU_GET_CLASS() comment
>    hw/cpu: Include missing 'qemu/accel.h' header
>    hw/cpu: Move internal declarations to new 'cpu-internal.h' header
>    hw/cpu: Rename cpu_common_realizefn() -> cpu_exec_realize()
>    hw/cpu: Rename cpu_exec_realizefn() -> cpu_common_realize()
>    hw/cpu: Rename cpu_exec_unrealizefn() -> cpu_common_unrealize()
>    hw/cpu: Extract cpu_exec_realize() out of cpu_common_realizefn()
>    hw/cpu: Move system-specific cpu_exec_realize() to cpu-system.c

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~