mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
s390x/sclp: Add missing checks to SCLP handler
If the 51 most significant bits of the SCCB address are zero or equal to the prefix, we should throw an specification exception, too. Also moved the check for privileged mode to sclp_service_call() to have all program checks in one place now. 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:
parent
a0fa2cb8cc
commit
6e25280216
4 changed files with 10 additions and 9 deletions
|
@ -445,14 +445,10 @@ static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run,
|
|||
int r = 0;
|
||||
|
||||
cpu_synchronize_state(CPU(cpu));
|
||||
if (env->psw.mask & PSW_MASK_PSTATE) {
|
||||
enter_pgmcheck(cpu, PGM_PRIVILEGED);
|
||||
return 0;
|
||||
}
|
||||
sccb = env->regs[ipbh0 & 0xf];
|
||||
code = env->regs[(ipbh0 & 0xf0) >> 4];
|
||||
|
||||
r = sclp_service_call(sccb, code);
|
||||
r = sclp_service_call(env, sccb, code);
|
||||
if (r < 0) {
|
||||
enter_pgmcheck(cpu, -r);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue