Re: [PATCH v2 03/10] m68k: reset vcpu after it's created

2025-02-25 Thread Philippe Mathieu-Daudé

On 7/2/25 17:20, Igor Mammedov wrote:

Reseting vcpu before its thread is created, caused various issues in the past
for other targets. It doesn't cause issues for m68k at the moment but
to be consistent with the rest of targets, move reset during realize time
after qemu_init_vcpu().

That basically prevents reset being run when when vCPU is in incositent state


(typo)


(i.e. accelerator hasn't initialized vCPU yet).

Signed-off-by: Igor Mammedov 


Cc: [email protected]
Reviewed-by: Philippe Mathieu-Daudé 


---
CC: Laurent Vivier 
---
  target/m68k/cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)





Re: [PATCH v2 03/10] m68k: reset vcpu after it's created

2025-02-25 Thread Alex Bennée
Igor Mammedov  writes:

> Reseting vcpu before its thread is created, caused various issues in the past
> for other targets. It doesn't cause issues for m68k at the moment but
> to be consistent with the rest of targets, move reset during realize time
> after qemu_init_vcpu().
>
> That basically prevents reset being run when when vCPU is in incositent state
> (i.e. accelerator hasn't initialized vCPU yet).
>
> Signed-off-by: Igor Mammedov 

Reviewed-by: Alex Bennée 

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



[PATCH v2 03/10] m68k: reset vcpu after it's created

2025-02-07 Thread Igor Mammedov
Reseting vcpu before its thread is created, caused various issues in the past
for other targets. It doesn't cause issues for m68k at the moment but
to be consistent with the rest of targets, move reset during realize time
after qemu_init_vcpu().

That basically prevents reset being run when when vCPU is in incositent state
(i.e. accelerator hasn't initialized vCPU yet).

Signed-off-by: Igor Mammedov 
---
CC: Laurent Vivier 
---
 target/m68k/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 41dfdf5804..3fd2663fb0 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -334,8 +334,8 @@ static void m68k_cpu_realizefn(DeviceState *dev, Error 
**errp)
 
 m68k_cpu_init_gdb(cpu);
 
-cpu_reset(cs);
 qemu_init_vcpu(cs);
+cpu_reset(cs);
 
 mcc->parent_realize(dev, errp);
 }
-- 
2.43.0