From patchwork Fri Jan 4 19:56:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabiano Rosas X-Patchwork-Id: 10748809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14F2C14E2 for ; Fri, 4 Jan 2019 19:59:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04E5C28617 for ; Fri, 4 Jan 2019 19:59:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECF452862D; Fri, 4 Jan 2019 19:59:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF75F28617 for ; Fri, 4 Jan 2019 19:59:57 +0000 (UTC) Received: from localhost ([127.0.0.1]:38543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfVdM-0004YF-Vx for patchwork-qemu-devel@patchwork.kernel.org; Fri, 04 Jan 2019 14:59:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfVak-0000jm-2V for qemu-devel@nongnu.org; Fri, 04 Jan 2019 14:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfVaf-0000cQ-Tg for qemu-devel@nongnu.org; Fri, 04 Jan 2019 14:57:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfVad-0000Y7-O5 for qemu-devel@nongnu.org; Fri, 04 Jan 2019 14:57:09 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x04JshKa115300 for ; Fri, 4 Jan 2019 14:57:04 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ptds40n8p-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 04 Jan 2019 14:57:04 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Jan 2019 19:57:03 -0000 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 4 Jan 2019 19:57:00 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x04Jux9D24838354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 4 Jan 2019 19:56:59 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29263AE079; Fri, 4 Jan 2019 19:56:59 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 426A4AE05F; Fri, 4 Jan 2019 19:56:58 +0000 (GMT) Received: from farosas.linux.ibm.com.ibmmodules.com (unknown [9.80.232.60]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 4 Jan 2019 19:56:58 +0000 (GMT) From: Fabiano Rosas To: qemu-devel@nongnu.org Date: Fri, 4 Jan 2019 17:56:51 -0200 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 19010419-0072-0000-0000-000003E4AD6B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010345; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000272; SDB=6.01141747; UDB=6.00594252; IPR=6.00921976; MB=3.00024980; MTD=3.00000008; XFM=3.00000015; UTC=2019-01-04 19:57:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19010419-0073-0000-0000-00004AAF581D Message-Id: <20190104195654.19976-1-farosas@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-04_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=796 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901040169 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 0/3] ppc/gdbstub: Expose SPRs to GDB 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: qemu-ppc@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series implements the reading and writing of Special Purpose Registers in PPC's gdbstub. * How it works generally [1]: GDB asks for the target.xml file which contains the target description along with the list of available feature XMLs. GDB then asks for each of the XML files in sequence. The XML files contain a list of registers descriptions: When the user tries to access a register, GDB looks for the register name in the XML file and sends QEMU the index of the register. This index is sequential across all feature files. The index provided by GDB must be converted by QEMU to match QEMU's internal representation. A set of callbacks are implemented to read/write the register. * In this series: The first patch implements the dynamic generation of the power-spr.xml file. Making it dynamically facilitates converting the GDB index to an index useful for addressing the env->spr array. The second patch implements the gdb_{get,set}_spr_reg callbacks along with the convertion from GDB index to QEMU index. The third patch enables the functionality. 1- https://sourceware.org/gdb/current/onlinedocs/gdb/Target-Descriptions.html Fabiano Rosas (3): target/ppc: Add SPRs XML generation code for gdbstub target/ppc: Add GDB callbacks for SPRs target/ppc: Enable reporting of SPRs to GDB target/ppc/cpu.h | 7 ++++ target/ppc/gdbstub.c | 45 +++++++++++++++++++++++++ target/ppc/translate_init.inc.c | 59 +++++++++++++++++++++++++++++++-- 3 files changed, 109 insertions(+), 2 deletions(-) --- 2.17.1