+ Mukesh, Shrikant, Srikar
On 07/07/26 7:19 pm, Amit Machhiwal wrote:
The file name suggests it only contains hotplug code, but the majority of its
content is not on the hotplug path: spapr_init_cpus() and spapr_set_vsmt_mode()
are called only from spapr_machine_init() at boot; spapr_dt_cpu() /
spapr_dt_cpus() are driven by boot-time FDT construction and CAS;
spapr_cpu_exec_enter/exit() are TCG dispatch callbacks; and
spapr_get/set_vcpu_id(), spapr_find_cpu() are general CPU infrastructure used
across the subsystem.
I think it'd be better to refactor cpu related functions not specific to hotplug
in a separate file with a more accurate name as spapr_cpu.c / spapr_cpu.h if you
want to also keep the spapr_cpu_hotplug.{c,h}.
While we are at it, we may also want to consider cpu related files in
target/ppc:
qemu % wc -l target/ppc/cpu*
7803 target/ppc/cpu_init.c
91 target/ppc/cpu_init.h
931 target/ppc/cpu-models.c
482 target/ppc/cpu-models.h
33 target/ppc/cpu-param.h
61 target/ppc/cpu-qom.h
256 target/ppc/cpu.c
3137 target/ppc/cpu.h
12794 total
regards,
Harsh
Thanks,
Amit