Received: from eggs.gnu.org ([2001:4830:134:3::10]:42547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBp2O-00018C-2i for qemu-devel@nongnu.org; Fri, 07 Feb 2014 12:16:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBp2A-0005j9-25 for qemu-devel@nongnu.org; Fri, 07 Feb 2014 12:16:23 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBp29-0005id-PR for qemu-devel@nongnu.org; Fri, 07 Feb 2014 12:16:10 -0500 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Feb 2014 17:16:08 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id D30DD1B08069 for ; Fri, 7 Feb 2014 17:15:39 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s17HFtRs64749756 for ; Fri, 7 Feb 2014 17:15:55 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 s17HG4CP017037 for ; Fri, 7 Feb 2014 10:16:06 -0700 From: Christian Borntraeger Date: Fri, 7 Feb 2014 18:16:15 +0100 Message-Id: <1391793385-46694-7-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1391793385-46694-1-git-send-email-borntraeger@de.ibm.com> References: <1391793385-46694-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [Patch/RFC 06/16] s390x/kvm: Add missing SIGP CPU RESET order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Heinz Graalfs , Thomas Huth , Alexander Graf , Dominik Dingel , Christian Borntraeger , Jens Freimann , Paolo Bonzini , 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 1f89a89..3bcaaa3 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -633,6 +633,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) @@ -672,6 +681,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