Received: from eggs.gnu.org ([2001:4830:134:3::10]:51921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJJmi-0002V3-OW for qemu-devel@nongnu.org; Fri, 28 Feb 2014 04:31:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJJmS-0004m6-UX for qemu-devel@nongnu.org; Fri, 28 Feb 2014 04:31:12 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:56506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJJmS-0004lg-L0 for qemu-devel@nongnu.org; Fri, 28 Feb 2014 04:30:56 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Feb 2014 09:30:55 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id B3E9F17D8059 for ; Fri, 28 Feb 2014 09:31:27 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1S9UfGl66912420 for ; Fri, 28 Feb 2014 09:30:41 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1S9UqpL032531 for ; Fri, 28 Feb 2014 02:30:53 -0700 From: Christian Borntraeger Date: Fri, 28 Feb 2014 10:31:04 +0100 Message-Id: <1393579866-43465-21-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1393579866-43465-1-git-send-email-borntraeger@de.ibm.com> References: <1393579866-43465-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 20/22] s390x/kvm: Add missing SIGP CPU RESET order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Anthony Liguori , Peter Maydell Cc: Thomas Huth , Alexander Graf , Christian Borntraeger , Jens Freimann , 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