From patchwork Tue Feb 24 13:15:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Freimann X-Patchwork-Id: 442966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A6C8A140159 for ; Wed, 25 Feb 2015 00:19:37 +1100 (AEDT) Received: from localhost ([::1]:49277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQFOh-0008U6-P4 for incoming@patchwork.ozlabs.org; Tue, 24 Feb 2015 08:19:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQFL1-0001Up-VJ for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQFKu-0002Ln-DR for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:47 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:33768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQFKu-0002LP-3w for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:40 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Feb 2015 13:15:38 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 24 Feb 2015 13:15:35 -0000 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 498771B0807A for ; Tue, 24 Feb 2015 13:15:50 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1ODFZwT9830834 for ; Tue, 24 Feb 2015 13:15:35 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1ODFYdg006075 for ; Tue, 24 Feb 2015 06:15:34 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1ODFY0c006063; Tue, 24 Feb 2015 06:15:34 -0700 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 1122) id 67B79122445C; Tue, 24 Feb 2015 14:15:34 +0100 (CET) From: Jens Freimann To: Christian Borntraeger , Alexander Graf , Cornelia Huck Date: Tue, 24 Feb 2015 14:15:24 +0100 Message-Id: <1424783731-43426-4-git-send-email-jfrei@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424783731-43426-1-git-send-email-jfrei@linux.vnet.ibm.com> References: <1424783731-43426-1-git-send-email-jfrei@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022413-0017-0000-0000-00000323D29D X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.110 Cc: David Hildenbrand , Jens Freimann , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 03/10] s390x/kvm: pass the SIGP instruction parameter to the SIGP handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: David Hildenbrand The parameter of the SIGP instruction will be neded in the future. Let's read it out and store it in the struct sigp_info, so it can be passed to the sigp handlers. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Jens Freimann Signed-off-by: David Hildenbrand --- target-s390x/kvm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index ec17ac8..1f4a4b1 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -1100,6 +1100,7 @@ static int handle_diag(S390CPU *cpu, struct kvm_run *run, uint32_t ipb) typedef struct SigpInfo { S390CPU *cpu; + uint64_t param; int cc; uint64_t *status_reg; } SigpInfo; @@ -1161,10 +1162,11 @@ static void sigp_cpu_reset(void *arg) } static int handle_sigp_single_dst(S390CPU *dst_cpu, uint8_t order, - uint64_t *status_reg) + uint64_t param, uint64_t *status_reg) { SigpInfo si = { .cpu = dst_cpu, + .param = param, .status_reg = status_reg, }; @@ -1205,6 +1207,7 @@ static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) int ret; uint8_t order; uint64_t *status_reg; + uint64_t param; S390CPU *dst_cpu = NULL; cpu_synchronize_state(CPU(cpu)); @@ -1212,6 +1215,7 @@ static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) /* get order code */ order = decode_basedisp_rs(env, run->s390_sieic.ipb) & SIGP_ORDER_MASK; status_reg = &env->regs[r1]; + param = (r1 % 2) ? env->regs[r1] : env->regs[r1 + 1]; switch (order) { case SIGP_SET_ARCH: @@ -1222,7 +1226,7 @@ static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) default: /* all other sigp orders target a single vcpu */ dst_cpu = s390_cpu_addr2state(env->regs[r3]); - ret = handle_sigp_single_dst(dst_cpu, order, status_reg); + ret = handle_sigp_single_dst(dst_cpu, order, param, status_reg); } if (ret >= 0) {