From patchwork Thu Jul 2 10:14:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 490573 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 3B1961402B5 for ; Thu, 2 Jul 2015 20:20:08 +1000 (AEST) Received: from localhost ([::1]:35785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAbbC-0007QX-3g for incoming@patchwork.ozlabs.org; Thu, 02 Jul 2015 06:20:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAbW3-0006n9-Ak for qemu-devel@nongnu.org; Thu, 02 Jul 2015 06:14:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAbVz-00048M-4J for qemu-devel@nongnu.org; Thu, 02 Jul 2015 06:14:47 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:56521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAbVy-000489-RC for qemu-devel@nongnu.org; Thu, 02 Jul 2015 06:14:43 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Jul 2015 11:14:40 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 2 Jul 2015 11:14:39 +0100 X-Helo: d06dlp03.portsmouth.uk.ibm.com X-MailFrom: cornelia.huck@de.ibm.com X-RcptTo: qemu-devel@nongnu.org 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 5C0E71B08069 for ; Thu, 2 Jul 2015 11:15:48 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t62AEdHN39649358 for ; Thu, 2 Jul 2015 10:14:39 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t62AEdbZ013152 for ; Thu, 2 Jul 2015 04:14:39 -0600 Received: from gondolin.ibm.com (sig-9-81-25-227.evts.uk.ibm.com [9.81.25.227]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t62AEOX9012493; Thu, 2 Jul 2015 04:14:38 -0600 From: Cornelia Huck To: peter.maydell@linaro.org Date: Thu, 2 Jul 2015 12:14:21 +0200 Message-Id: <1435832062-19112-11-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1435832062-19112-1-git-send-email-cornelia.huck@de.ibm.com> References: <1435832062-19112-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15070210-0021-0000-0000-0000047900AC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.111 Cc: borntraeger@de.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, David Hildenbrand , jfrei@linux.vnet.ibm.com, Cornelia Huck Subject: [Qemu-devel] [PULL v2 for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs 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 Whenever we touch the access control registers, we have to make sure that the values will make it into kvm. Otherwise the change will simply be lost. When synchronizing qemu and kvm, a normal KVM_PUT_RUNTIME_STATE does not take care of these registers. Let's simply trigger a KVM_PUT_FULL_STATE sync, so the values will directly be written to kvm. The performance overhead can be ignored and this is much cleaner than manually writing these registers to kvm via our two supported ways. Reviewed-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by: Cornelia Huck --- target-s390x/gdbstub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c index ddc14a6..31f2049 100644 --- a/target-s390x/gdbstub.c +++ b/target-s390x/gdbstub.c @@ -92,6 +92,7 @@ static int cpu_write_ac_reg(CPUS390XState *env, uint8_t *mem_buf, int n) switch (n) { case S390_A0_REGNUM ... S390_A15_REGNUM: env->aregs[n] = ldl_p(mem_buf); + cpu_synchronize_post_init(ENV_GET_CPU(env)); return 4; default: return 0;