From patchwork Thu Oct 9 13:35:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 398035 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 3A71C1400BB for ; Fri, 10 Oct 2014 00:37:17 +1100 (EST) Received: from localhost ([::1]:42582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcDu7-0004Js-8t for incoming@patchwork.ozlabs.org; Thu, 09 Oct 2014 09:37:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcDtL-00033F-PJ for qemu-devel@nongnu.org; Thu, 09 Oct 2014 09:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcDtD-0005fF-Rl for qemu-devel@nongnu.org; Thu, 09 Oct 2014 09:36:27 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:40934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcDtD-0005f6-It for qemu-devel@nongnu.org; Thu, 09 Oct 2014 09:36:19 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Oct 2014 14:36:18 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Oct 2014 14:36:16 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 504D317D804E for ; Thu, 9 Oct 2014 14:38:29 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s99DaFQD9306384 for ; Thu, 9 Oct 2014 13:36:15 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s99DaC1K009112 for ; Thu, 9 Oct 2014 07:36:14 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-210.boeblingen.de.ibm.com [9.152.224.210]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s99Da4Au008595; Thu, 9 Oct 2014 07:36:11 -0600 From: Cornelia Huck To: peter.maydell@linaro.org Date: Thu, 9 Oct 2014 15:35:59 +0200 Message-Id: <1412861761-22047-7-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1412861761-22047-1-git-send-email-cornelia.huck@de.ibm.com> References: <1412861761-22047-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14100913-0041-0000-0000-0000019D8DD5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.106 Cc: borntraeger@de.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, David Hildenbrand , jfrei@linux.vnet.ibm.com, Cornelia Huck , Andreas Faerber Subject: [Qemu-devel] [PULL 6/8] s390x/kvm: synchronize the cpu state after SIGP (INITIAL) CPU RESET 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 We need to synchronize registers after a reset has been performed. The current code does that in qemu_system_reset(), load_normal_reset() and modified_clear_reset() for all vcpus. After SIGP (INITIAL) CPU RESET, this needs to be done for the targeted vcpu as well, so let's call cpu_synchronize_post_reset() in the respective handlers. Signed-off-by: David Hildenbrand Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck CC: Andreas Faerber Tested-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- target-s390x/kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index e4c4c8d..5b10a25 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -952,6 +952,7 @@ static void sigp_initial_cpu_reset(void *arg) cpu_synchronize_state(cpu); scc->initial_cpu_reset(cpu); + cpu_synchronize_post_reset(cpu); } static void sigp_cpu_reset(void *arg) @@ -961,6 +962,7 @@ static void sigp_cpu_reset(void *arg) cpu_synchronize_state(cpu); scc->cpu_reset(cpu); + cpu_synchronize_post_reset(cpu); } #define SIGP_ORDER_MASK 0x000000ff