KVM: s390: Privileged operation check for TPROT
authorThomas Huth <thuth@linux.vnet.ibm.com>
Thu, 20 Jun 2013 15:22:00 +0000 (17:22 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Jun 2013 21:31:15 +0000 (23:31 +0200)
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>
arch/s390/kvm/priv.c

index a21e0146fe2ce5edec54853a1181d30082cf47fa..04dc4a1439647c237b54ac4f991753646d204fb6 100644 (file)
@@ -596,6 +596,9 @@ static int handle_tprot(struct kvm_vcpu *vcpu)
 
        vcpu->stat.instruction_tprot++;
 
+       if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
+               return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
+
        kvm_s390_get_base_disp_sse(vcpu, &address1, &address2);
 
        /* we only handle the Linux memory detection case:
This page took 0.029422 seconds and 5 git commands to generate.