On Sun, 23 Mar 2025, Richard Henderson wrote:
On 3/23/25 15:13, BALATON Zoltan wrote:
On Sun, 23 Mar 2025, Philippe Mathieu-Daudé wrote:
On 23/3/25 20:07, Richard Henderson wrote:
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 28fbbb8d3c1..ed79cc1a6b7 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7490,6 +7490,7 @@ static const TCGCPUOps ppc_tcg_ops = {
.translate_code = ppc_translate_code,
.restore_state_to_opc = ppc_restore_state_to_opc,
+ .mttcg_supported = TARGET_LONG_BITS == 64,
.guest_default_memory_order = 0,
Similarly. I'd be surprised if ppc32 can't use mttcg, really.
Per Cédric on IRC our ppc32 implementations are single core,
so never tested for mttcg.
We're just trying to implement more CPUs for G4 mac99 and tested it with
-smp 2 and it seems to generally work but we need to implement more of the
Mac hardware for this but we could already run Mac OS X with two CPUs and
mttcg and Linux too if we add a delay on boot when second CPU is started
(it may need implementing timebase control as done on the G4 Mac to avoid
that but if it gets past that it seems to work). So please leave this
enabled. Not tested does not mean it does not work so only disable if
there's a known problem.
MTTCG is not enabled for qemu-system-ppc right now.
I could use -smp 2 with qemu-system-ppc after this:
https://lists.nongnu.org/archive/html/qemu-ppc/2025-02/msg00377.html
It complains about not tested for the board but works nevertheless. I
don't remember if I've enabled mttcg or not so maybe it only ran with
single thread which was enough for testing but others did test mttcg:
https://lists.nongnu.org/archive/html/qemu-ppc/2025-02/msg00455.html
although could be that with qemu-system-ppc64 which also includes 32 bit
machines. But then it should work the same with qemu-system-ppc so it
could be enabled there as well.
Phil's patch does not current change behaviour.
Then what does the line do at all? In any case we may want to enable mttcg
in qemu-system-ppc in the future so maybe there's no need to restrict it
here.
Regards,
BALATON Zoltan