From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIcof-0000hb-UJ for qemu-devel@nongnu.org; Wed, 26 Feb 2014 06:38:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIcoW-0001ta-W2 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 06:38:21 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:54692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIcoW-0001t9-MZ for qemu-devel@nongnu.org; Wed, 26 Feb 2014 06:38:12 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Feb 2014 11:38:10 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id AF1F12190046 for ; Wed, 26 Feb 2014 11:38:05 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1QBbv041638790 for ; Wed, 26 Feb 2014 11:37:57 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1QBc7es020211 for ; Wed, 26 Feb 2014 04:38:08 -0700 From: Christian Borntraeger Date: Wed, 26 Feb 2014 12:38:26 +0100 Message-Id: <1393414708-37739-4-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1393414708-37739-1-git-send-email-borntraeger@de.ibm.com> References: <1393414708-37739-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 3/5] s390x/kvm: Add missing SIGP CPU RESET order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Peter Maydell , Thomas Huth , Alexander Graf , Christian Borntraeger , Jens Freimann , Anthony Liguori , Cornelia Huck , Richard Henderson From: Thomas Huth The SIGP order CPU RESET was still missing in the list of our supported handler. This patch now adds a simple implementation, by using the cpu_reset() function that is already available in target-s390x/cpu.c. Signed-off-by: Thomas Huth Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 75e8822..20c711f 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -635,6 +635,15 @@ static void sigp_initial_cpu_reset(void *arg) scc->initial_cpu_reset(cpu); } +static void sigp_cpu_reset(void *arg) +{ + CPUState *cpu = arg; + S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); + + cpu_synchronize_state(cpu); + scc->cpu_reset(cpu); +} + #define SIGP_ORDER_MASK 0x000000ff static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) @@ -674,6 +683,10 @@ static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) run_on_cpu(CPU(target_cpu), sigp_initial_cpu_reset, CPU(target_cpu)); cc = 0; break; + case SIGP_CPU_RESET: + run_on_cpu(CPU(target_cpu), sigp_cpu_reset, CPU(target_cpu)); + cc = 0; + break; default: DPRINTF("KVM: unknown SIGP: 0x%x\n", order_code); *statusreg &= 0xffffffff00000000UL; -- 1.8.4.2