Re: [Qemu-devel] [PATCH 4/8] s390: stop target cpu on sigp initial reset

2012-06-12 Thread Christian Borntraeger
On 12/06/12 11:42, Alexander Graf wrote:
> Jens Freimann wrote:
>> From: Christian Borntraeger 
>>
>> We must not run the target cpu after an initial reset. This makes
>> system_reset more reliable for smp guests.
>>   
> 
> Why?

After an initial reset, the cpu is in a state (PSW=0) that causes program check
loops if the cpu thread starts before the cpu is properly set up, iow we might
burn cpu and have the cpu in a state that it is not supposed to be.

Christian




Re: [Qemu-devel] [PATCH 4/8] s390: stop target cpu on sigp initial reset

2012-06-12 Thread Alexander Graf
Jens Freimann wrote:
> From: Christian Borntraeger 
>
> We must not run the target cpu after an initial reset. This makes
> system_reset more reliable for smp guests.
>   

Why?

Alex

> Signed-off-by: Christian Borntraeger 
> ---
>  target-s390x/kvm.c |1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 93a8431..73cfd1f 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -318,6 +318,7 @@ static int s390_cpu_initial_reset(CPUS390XState *env)
>  {
>  int i;
>  
> +s390_del_running_cpu(env);
>  if (kvm_vcpu_ioctl(env, KVM_S390_INITIAL_RESET, NULL) < 0) {
>  perror("cannot init reset vcpu");
>  }
>