Received: from eggs.gnu.org ([2001:4830:134:3::10]:33852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKC9M-00087C-50 for qemu-devel@nongnu.org; Thu, 12 Sep 2013 15:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKC9D-0007fO-4O for qemu-devel@nongnu.org; Thu, 12 Sep 2013 15:01:56 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:57032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKC9C-0007f8-Rc for qemu-devel@nongnu.org; Thu, 12 Sep 2013 15:01:47 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Sep 2013 19:56:23 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6E02A1B08066 for ; Thu, 12 Sep 2013 20:01:42 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8CJ1Tt566453660 for ; Thu, 12 Sep 2013 19:01:29 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8CJ1ewr029806 for ; Thu, 12 Sep 2013 13:01:41 -0600 From: Christian Borntraeger Date: Thu, 12 Sep 2013 21:01:56 +0200 Message-Id: <1379012521-26750-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1379012521-26750-1-git-send-email-borntraeger@de.ibm.com> References: <1379012521-26750-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULLv2 1/6] s390/kvm: Add check for priviledged SCLP handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Christian Borntraeger , Thomas Huth , Alexander Graf , qemu-devel 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 185c8f5..dc1ed56 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -448,6 +448,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