From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: [PATCH 2/7] KVM: s390: Privileged operation check for TPROT Date: Thu, 20 Jun 2013 17:22:00 +0200 Message-ID: <1371741725-53624-3-git-send-email-cornelia.huck@de.ibm.com> References: <1371741725-53624-1-git-send-email-cornelia.huck@de.ibm.com> Return-path: In-Reply-To: <1371741725-53624-1-git-send-email-cornelia.huck@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-Archive: List-Post: To: Gleb Natapov , Paolo Bonzini Cc: Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , KVM , linux-s390 , Thomas Huth List-ID: From: Thomas Huth 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 Acked-by: Cornelia Huck Signed-off-by: Cornelia Huck --- arch/s390/kvm/priv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index a21e014..04dc4a1 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) 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: -- 1.8.2.2