On 5/29/26 3:49 PM, Philippe Mathieu-Daudé wrote:
> accel_cpu_common_realize() first calls accel_cpu->cpu_realize
> then ops->cpu_realize.
>
> Rather than having one handler for each host architecture, use a
> single host-specific method (prefixed with kvm_arch_* like other
> similar KVM methods). Register it once as AccelOpsClass
> cpu_realize handler. Add stubs for when a host lacks such method.
>
> PPC's ACCEL_CPU_NAME("kvm") TypeInfo is now empty, remove it.
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> Reviewed-by: Richard Henderson <[email protected]>
> Reviewed-by: Pierrick Bouvier <[email protected]>
> ---
> include/system/kvm.h | 2 ++
> accel/kvm/kvm-accel-ops.c | 1 +
> target/arm/kvm.c | 5 +++++
> target/i386/kvm/kvm-cpu.c | 3 +--
> target/loongarch/kvm/kvm.c | 5 +++++
> target/ppc/kvm.c | 23 +----------------------
> target/riscv/kvm/kvm-cpu.c | 10 +---------
> target/s390x/kvm/kvm.c | 5 +++++
> 8 files changed, 21 insertions(+), 33 deletions(-)
For the s390x changes:
Reviewed-by: Matthew Rosato <[email protected]>