From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPnxj-0007zV-Fn for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:29:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPnxa-0005d9-2d for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:29:39 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPnxZ-0005cw-PA for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:29:30 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Sep 2014 08:29:29 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2813F219005E for ; Fri, 5 Sep 2014 08:29:07 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s857TQD534930744 for ; Fri, 5 Sep 2014 07:29:26 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s857TPmb000480 for ; Fri, 5 Sep 2014 01:29:26 -0600 Message-ID: <54096654.20704@de.ibm.com> Date: Fri, 05 Sep 2014 09:29:24 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1409320338-63098-1-git-send-email-jfrei@linux.vnet.ibm.com> <1409320338-63098-2-git-send-email-jfrei@linux.vnet.ibm.com> <5404F5A5.6020102@suse.de> <54056CAA.2000201@de.ibm.com> <5406DEEE.6080705@suse.de> In-Reply-To: <5406DEEE.6080705@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] s390x/gdb: don't touch the cc if tcg is not enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Jens Freimann , Cornelia Huck Cc: David Hildenbrand , qemu-devel@nongnu.org On 03/09/14 11:27, Alexander Graf wrote: > > > On 02.09.14 09:07, Christian Borntraeger wrote: >> On 02/09/14 00:39, Alexander Graf wrote: >>> >>> >>> On 29.08.14 15:52, Jens Freimann wrote: >>>> From: David Hildenbrand >>>> >>>> When reading/writing the psw mask, the condition code may only be touched if >>>> running on tcg. >>> >>> Why? Shouldn't we be able to set CC from gdb as well? >>> >> >> You can. What this patch does (and the patch description is a bit vague here) is to not modify the PSW it gets from KVM when passing it to gdb: >> The qemu core gets the PSW from KVM. Without this patch, we use cc_op to calculate the current CC of the PSW (No idea of TCG, I guess its evaluated lazy - at least this is how valgrind works). This is wrong for the KVM case, as cc_op does not contain any useful data for the KVM case. With this patch we simply pass the psw from KVM to gdb and back. >> >> The symptom was that the cc was always shown as zero. > > Ah, I see. I agree with the patch, but the patch description does not > actually describe what the patch does. Please rework it. The patch was already pulled...Well the description is misleaded but with some interpretion still correct ;-). But your point is well taken. We will try to make sure that all patch description are descriptive and not ambiguous. Your question is a good indication that this was not the case in this patch. Christian > I also wouldn't mind if instead of hard coding this logic in the > gdbstub, we'd extract it as helper functions to read and write the > PSW.MASK in cpu.h.