diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-07-29 15:49:16 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-09-20 12:46:52 +0200 |
commit | 3ac85fb66626ea91641f5fb9ad9069aab94754f5 (patch) | |
tree | 82dd7ac05875c9f1aef6ca38f36d3936184747d5 /target-s390x | |
parent | 6c2679fc19560699679200fb42ab4659bcbe7f79 (diff) | |
download | qemu-3ac85fb66626ea91641f5fb9ad9069aab94754f5.zip qemu-3ac85fb66626ea91641f5fb9ad9069aab94754f5.tar.gz qemu-3ac85fb66626ea91641f5fb9ad9069aab94754f5.tar.bz2 |
s390/kvm: Add check for priviledged SCLP handler
The SCLP instruction is priviledged, so we should make sure that
we generate an exception when it is called from the problem state.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target-s390x')
-rw-r--r-- | target-s390x/kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 4923e0a..0bc317e 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -439,6 +439,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]; |