From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON2C-00015n-1R for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VON1z-0005i9-Uv for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:47 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:47675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON1z-0005gM-L1 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:35 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Sep 2013 08:27:34 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id D9E79219005A for ; Tue, 24 Sep 2013 08:27:31 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8O7RJqN10944760 for ; Tue, 24 Sep 2013 07:27:19 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8O7RU4w025898 for ; Tue, 24 Sep 2013 01:27:31 -0600 From: Christian Borntraeger Date: Tue, 24 Sep 2013 09:27:35 +0200 Message-Id: <1380007671-18976-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> References: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 01/17] s390/kvm: Add check for priviledged SCLP handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel , Christian Borntraeger , Thomas Huth , Alexander Graf , Richard Henderson From: Thomas Huth 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 Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) 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]; -- 1.8.3.1