From nobody Mon Feb 9 19:54:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500029277657372.2829249619599; Fri, 14 Jul 2017 03:47:57 -0700 (PDT) Received: from localhost ([::1]:36905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVy8Z-0000u2-6k for importer@patchew.org; Fri, 14 Jul 2017 06:47:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVy2M-0003OA-36 for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVy2I-0003SA-Q6 for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:41:30 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42609) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVy2I-0003RK-HA for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:41:26 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6EAcoLu005617 for ; Fri, 14 Jul 2017 06:41:25 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2bpda17mab-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 14 Jul 2017 06:41:25 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jul 2017 11:41:22 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 14 Jul 2017 11:41:20 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6EAfKbk20578544; Fri, 14 Jul 2017 10:41:20 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2339A11C734; Fri, 14 Jul 2017 11:38:45 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1205011C733; Fri, 14 Jul 2017 11:38:45 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 14 Jul 2017 11:38:45 +0100 (BST) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id B8D3E20F69C; Fri, 14 Jul 2017 12:41:19 +0200 (CEST) From: Christian Borntraeger To: Peter Maydell Date: Fri, 14 Jul 2017 12:41:06 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500028867-134709-1-git-send-email-borntraeger@de.ibm.com> References: <1500028867-134709-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17071410-0016-0000-0000-000004D728E0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071410-0017-0000-0000-0000280B8AB1 Message-Id: <1500028867-134709-40-git-send-email-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-13_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707140175 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL 39/40] s390x/arch_dump: also dump guarded storage control block X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Cornelia Huck , qemu-devel , Alexander Graf , Christian Borntraeger , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Write the new note section of type 30b (guarded storage control block). Signed-off-by: Christian Borntraeger --- include/elf.h | 1 + target/s390x/arch_dump.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/elf.h b/include/elf.h index 0dbd3e9..cd51434 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1476,6 +1476,7 @@ typedef struct elf64_shdr { #define NT_TASKSTRUCT 4 #define NT_AUXV 6 #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/= common.h */ +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers = */ #define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31 */ #define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 (low= er half) */ #define NT_S390_PREFIX 0x305 /* s390 prefix register */ diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 105ae9a..96c9fb9 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -57,6 +57,12 @@ struct S390xElfVregsHiStruct { =20 typedef struct S390xElfVregsHiStruct S390xElfVregsHi; =20 +struct S390xElfGSCBStruct { + uint64_t gsregs[4]; +} QEMU_PACKED; + +typedef struct S390xElfGSCBStruct S390xElfGSCB; + typedef struct noteStruct { Elf64_Nhdr hdr; char name[8]; @@ -65,6 +71,7 @@ typedef struct noteStruct { S390xElfFpregset fpregset; S390xElfVregsLo vregslo; S390xElfVregsHi vregshi; + S390xElfGSCB gscb; uint32_t prefix; uint64_t timer; uint64_t todcmp; @@ -126,6 +133,16 @@ static void s390x_write_elf64_vregshi(Note *note, S390= CPU *cpu, int id) } } =20 +static void s390x_write_elf64_gscb(Note *note, S390CPU *cpu, int id) +{ + int i; + + note->hdr.n_type =3D cpu_to_be32(NT_S390_GS_CB); + for (i =3D 0; i < 4; i++) { + note->contents.gscb.gsregs[i] =3D cpu_to_be64(cpu->env.gscb[i]); + } +} + static void s390x_write_elf64_timer(Note *note, S390CPU *cpu, int id) { note->hdr.n_type =3D cpu_to_be32(NT_S390_TIMER); @@ -181,6 +198,7 @@ static const NoteFuncDesc note_linux[] =3D { {sizeof(((Note *)0)->contents.todpreg), s390x_write_elf64_todpreg}, {sizeof(((Note *)0)->contents.vregslo), s390x_write_elf64_vregslo}, {sizeof(((Note *)0)->contents.vregshi), s390x_write_elf64_vregshi}, + {sizeof(((Note *)0)->contents.gscb), s390x_write_elf64_gscb}, { 0, NULL} }; =20 --=20 2.7.4