diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-06-20 17:22:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-20 23:31:59 +0200 |
commit | 93e1750f5ee8417e015bcb0bf2c37bf07b5ff647 (patch) | |
tree | a2743482703df5d2a4e29b31bf74ae119328d8cf /arch | |
parent | 5087dfa6c8b9f7893819f315eb24201ff5c07142 (diff) | |
download | op-kernel-dev-93e1750f5ee8417e015bcb0bf2c37bf07b5ff647.zip op-kernel-dev-93e1750f5ee8417e015bcb0bf2c37bf07b5ff647.tar.gz |
KVM: s390: Check for PSTATE when handling DIAGNOSE
DIAGNOSE is a privileged instruction and thus we must make sure that we are
in supervisor mode before taking any other actions.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kvm/diag.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 1c01a99..3074475 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c @@ -132,6 +132,9 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) { int code = (vcpu->arch.sie_block->ipb & 0xfff0000) >> 16; + if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) + return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); + trace_kvm_s390_handle_diag(vcpu, code); switch (code) { case 0x10: |