On 20/06/2023 17:40, Richard Henderson wrote:
With the addition of TCG_GUEST_DEFAULT_MO, there's nothing in the cpu emulation preventing this from working. There is some board model work to be done for sparc64, where max_cpus = 1.
I've tried testing this with the Advent Calendar image at https://qemu-advent-calendar.org/2018/download/day11.tar.xz and even without these patches applied I'm seeing hangs with -smp 2. When applied on top of the other "target/sparc: Use tcg_gen_lookup_and_goto_ptr" series I get assert() after a minute or two:
ERROR:../accel/tcg/tcg-accel-ops-mttcg.c:110:mttcg_cpu_thread_fn: assertion failed: (cpu->halted) Bail out! ERROR:../accel/tcg/tcg-accel-ops-mttcg.c:110:mttcg_cpu_thread_fn: assertion failed: (cpu->halted)
It may be wise to try and figure out what's going on with git head first before applying this. In particular /proc/cpuinfo suggests things aren't right with -smp 2:
# cat /proc/cpuinfo cpu : Texas Instruments, Inc. - SuperSparc-(II) fpu : SuperSparc on-chip FPU promlib : Version 3 Revision 2 prom : 2.25 type : sun4m ncpus probed : 2 ncpus active : 1 CPU0Bogo : 213.50 CPU0ClkTck : 0 MMU type : TI Viking/MXCC contexts : 65536 nocache total : 3145728 nocache used : 375552
Richard Henderson (2): target/sparc: Set TCG_GUEST_DEFAULT_MO configs: Enable MTTCG for sparc, sparc64 configs/targets/sparc-softmmu.mak | 1 + configs/targets/sparc64-softmmu.mak | 1 + target/sparc/cpu.h | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+)
ATB, Mark.