s390x/sclp: Fixed setting of condition code register

In the SCLP handler function, the condition code register must
only be set if no exception occured.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
Thomas Huth 2014-01-14 12:13:32 +01:00 committed by Christian Borntraeger
parent 6e25280216
commit e8803d93df

View file

@ -451,8 +451,9 @@ static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run,
r = sclp_service_call(env, sccb, code);
if (r < 0) {
enter_pgmcheck(cpu, -r);
} else {
setcc(cpu, r);
}
setcc(cpu, r);
return 0;
}