diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-06-20 11:22:00 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-20 17:31:15 -0400 |
commit | f9f6bbc6991f2ba21bfaff90f4060f2df766ca20 (patch) | |
tree | fd1b12a5157a323358ec62046c454702dc781c15 /arch/s390/kvm/priv.c | |
parent | 208dd7567df471c7c47aa25b94569afc115de5f5 (diff) |
KVM: s390: Privileged operation check for TPROT
TPROT is a privileged instruction and thus should generate a privileged
operation exception when the problem state bit is not cleared in the PSW.
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/s390/kvm/priv.c')
-rw-r--r-- | arch/s390/kvm/priv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index a21e0146fe2c..04dc4a143964 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -596,6 +596,9 @@ static int handle_tprot(struct kvm_vcpu *vcpu) | |||
596 | 596 | ||
597 | vcpu->stat.instruction_tprot++; | 597 | vcpu->stat.instruction_tprot++; |
598 | 598 | ||
599 | if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) | ||
600 | return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); | ||
601 | |||
599 | kvm_s390_get_base_disp_sse(vcpu, &address1, &address2); | 602 | kvm_s390_get_base_disp_sse(vcpu, &address1, &address2); |
600 | 603 | ||
601 | /* we only handle the Linux memory detection case: | 604 | /* we only handle the Linux memory detection case: |