From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOiBk-0006cM-Kd for qemu-devel@nongnu.org; Tue, 02 Sep 2014 03:07:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOiBb-0006E1-Ji for qemu-devel@nongnu.org; Tue, 02 Sep 2014 03:07:36 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:39048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOiBb-0006Dr-An for qemu-devel@nongnu.org; Tue, 02 Sep 2014 03:07:27 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Sep 2014 08:07:25 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id C6A37219005F for ; Tue, 2 Sep 2014 08:07:05 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8277O0546596348 for ; Tue, 2 Sep 2014 07:07:24 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8277Nw4031789 for ; Tue, 2 Sep 2014 01:07:24 -0600 Message-ID: <54056CAA.2000201@de.ibm.com> Date: Tue, 02 Sep 2014 09:07:22 +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> In-Reply-To: <5404F5A5.6020102@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 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. Christian