From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2070.outbound.protection.outlook.com [40.107.105.70]) by sourceware.org (Postfix) with ESMTPS id 5F2163870C32 for ; Fri, 30 Jun 2023 13:46:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F2163870C32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DfJSdfDLK6oc3AAiHbSMOHCtui2bBxTmYzbDKlYhn34=; b=9zKA/71MCM9VmQvkrjrbvOd6KSrpR6wshf205Ysj5aRIdkOl/F//Me0d/mAafeh9vVWOhNAx+0550ljiCcOtV5dokm/loievoE8uPi8nANPJ3LP3OmFxHanx/kWqvfAuFDe+Tp4XGRSW12D3Lr3E6coZ+u3QbQKOQSA1JOgmDgM= Received: from AM6P193CA0056.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::33) by DB8PR08MB5450.eurprd08.prod.outlook.com (2603:10a6:10:116::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 13:46:44 +0000 Received: from AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::eb) by AM6P193CA0056.outlook.office365.com (2603:10a6:209:8e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 13:46:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT023.mail.protection.outlook.com (100.127.140.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 13:46:43 +0000 Received: ("Tessian outbound 7c913606c6e6:v142"); Fri, 30 Jun 2023 13:46:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7b62cb2052a4cee5 X-CR-MTA-TID: 64aa7808 Received: from 2f6f632d9634.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 18CD12A8-2865-4817-A17E-53A96424572C.1; Fri, 30 Jun 2023 13:46:36 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2f6f632d9634.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 30 Jun 2023 13:46:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mHRObYqVJ/YXFkgQfqeZMwsFK+5duEN2sOcRxX4gX5W2qVqNzREoBnmS2IuurSeDrO1jW0NaUor8qlMVZ0Oe1zC0apBj5BENiP8HED8a10F+blj5eNlyaa/bNKsxl8fXls7aIc1I1pm5hQlOdSpUvLmctZBW62MTck2hme+w8djwxXCWPfD9sqNNJ00qBqRIFX7GS5j9hgULE8uQ5bcQg28nDMMsJBUJkn8qYnSBTpheHRbrcWRfn9e6aDbSh1RbM18GiekVSUjADPsWHp8tnYxCeFYwUUqXB7Eryy+dqEj4K3IqwckR+L1yqbkDU+hoyaOeoIGhakMJ3t/zvB5O9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DfJSdfDLK6oc3AAiHbSMOHCtui2bBxTmYzbDKlYhn34=; b=GfPqUkGmR+UrSMXHMoHY3/kOr4n5Ho4K+I8p3g/kV+nK0I0yTTgux/W5ff95wa1DMmqCtSf7gI48E6mRosmU+a3YPQ8W9TA4fCeyqtnUvrsLQJIbqDPIcDOgsFzgN6NiMo/W+ecQV9fu2105S9z66oiCvUNPwEMCC1E00VzNVRl7DuIsgbKLl5kCWI1l8TiUtKMC1m8ZiM9KombVuHStbJt7G5Tr9OxkoYOnk0Y7O/2nXTFhBIxxCTMH+8q/kDGiWdgI5wdf/reTaF0Y3yS1C3AMF1WIzVCrTQwt+6KdP2heZKbevuu6fYca2b4YBFVHKzJ5DgGMqPw3XSloNaAg/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DfJSdfDLK6oc3AAiHbSMOHCtui2bBxTmYzbDKlYhn34=; b=9zKA/71MCM9VmQvkrjrbvOd6KSrpR6wshf205Ysj5aRIdkOl/F//Me0d/mAafeh9vVWOhNAx+0550ljiCcOtV5dokm/loievoE8uPi8nANPJ3LP3OmFxHanx/kWqvfAuFDe+Tp4XGRSW12D3Lr3E6coZ+u3QbQKOQSA1JOgmDgM= Received: from AS9PR04CA0123.eurprd04.prod.outlook.com (2603:10a6:20b:531::20) by GV2PR08MB9950.eurprd08.prod.outlook.com (2603:10a6:150:b9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 13:46:34 +0000 Received: from AM7EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:531:cafe::3a) by AS9PR04CA0123.outlook.office365.com (2603:10a6:20b:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 13:46:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT014.mail.protection.outlook.com (100.127.140.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 13:46:33 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 30 Jun 2023 13:46:32 +0000 Received: from e129171.arm.com (10.57.27.17) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 30 Jun 2023 13:46:32 +0000 From: Luis Machado To: Subject: [PATCH v3 07/16] [gdbserver/aarch64] sme: Add support for SME Date: Fri, 30 Jun 2023 14:46:07 +0100 Message-ID: <20230630134616.1238105-8-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230630134616.1238105-1-luis.machado@arm.com> References: <20230630134616.1238105-1-luis.machado@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT014:EE_|GV2PR08MB9950:EE_|AM7EUR03FT023:EE_|DB8PR08MB5450:EE_ X-MS-Office365-Filtering-Correlation-Id: 4396a5bb-d93d-44d5-2ae9-08db797070dc x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1w7UKsl8Vy6GrMYICWuZwr8GYNSLzRFZx5GrRziJJtntw2AyFm1GKfMOUQ2kE8ausVyYQCtpbaq7l7hcAl7A7bYwCMsftSXPpmn7oph2mfKJIOGoNvbr6yRfYWPBuE5B7SdfifKJkrefFUd+d4m32YPp0MLEYzWX6OQ1Z5GfSdAR/6rbasjvWqAIrC9pB9Qh8ataf+vDfMWEM6NBYL/SNDN846+u2CR1ePd9hMVET9cFTohkZZ3AQy7lkpoPLoI25SMh9iH0l2ExX5RHDZlGBrbm1SLGS3EKcrmo5LLDZXNa32ElkL8BTUe0O8Fq4/ljL1T0m9o91NX8E8cmEtrS2WR3NrBeYN0pZeBq+tjdMyBKZeZWdPMTh24r5AH+cwBt7oMH5YjlSVJzfjyA6zxcSQCQoeMwRO1hWuWrdz82MbifnNwLkxFYEZPV4k3QecFfv+Np8t/bykn/3rQVvwMBh9ABWndp+CI/47uLGs03XNYiMe8BRe51s5SZlKwsjn1N7cqG2++LJuCpKYDDQnNylER4RYL0I/PQOUAubNBSMjXgtnhN44XFPeoeuXRnrmQZN/jhUX8nxWrZ0AWU1Dgl823N3yJkR2gtQKbcrs1zR1qSlkxCOB8WsOX7EZlelJ3646zEz3jx+nJVOCLhU7Ifl2uZmMqEKv66tC6w5bVrAPu7NCEZGCWf6o4AjTjzS57oQjOW3NNMrz96aAwGaYjUfsik9BPFegb0Fady8n6n9rqDKUraM/Y5eWy3xfFqV5pJ3YkGoWlt/q+5ZVL34FssXA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(39860400002)(346002)(136003)(376002)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(41300700001)(7696005)(82310400005)(82740400003)(6666004)(2616005)(356005)(81166007)(83380400001)(336012)(1076003)(26005)(186003)(47076005)(36860700001)(40480700001)(86362001)(426003)(478600001)(316002)(2906002)(36756003)(6916009)(70586007)(70206006)(5660300002)(44832011)(8936002)(8676002)(66899021)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9950 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c5e5d80c-0afb-4677-371a-08db79706aec X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VEtVYkNhGD6Au6MJ2efv5mhAPPIF6RtlDUq6KOrLFfgRpem0SLLUUlV7Z8tUj6QkJhCdMMKezHUKvrOYw34UXvWwz0+/LCYgAiqqw2K0Vqw5scoU40rIlUfXM4RhYOLAmNZpKohD2BQaD+eDds0OKYYiNXQxVyQhSFnS5+txd9OgK27rwycL9iam53xZYZ9/dO99Y+2vEdQFNn2GQVZcLKTHXLP2ZfT4JBNtnehNMTzEH8zsr4bwonyPZIvgYv42z491OXoB/I9rB3MhycWN0YEjnePyd64DrRH8yrllDMG82UMIeFj3w9qj6IwAr251aCzJCPbSWaMDw9noIQa9cQQmHqqSXMXz78P3V5U3t+Fl9hkgGLv0DYAkuzuS0uEdtTRx6QF4LHadpqM/ZQmMKQBbFsZu05iKbCSGmuKBScqziSWAt8WCQWU6HMfywBS52938P8JtlH52aqc1tD2tj+s7bK7l4XFxIont7amYyEyb8aO97zUx2TSea5a7245e/vBs0ZWmF8f5E+zpj1izynh/QcyVP6IQynn5XslRewUV7k4MvQ2o7s1oAUzSPB/c5Ay24jovO8TD2PMxz/EuatdHyAM/JUCBQksnD5h6n0WOM+3u8XbUcOMCiWzqWgvyH89kyXQ9IQK19dOfsPAYKphywNKanEjKCAMP+ZDs5hZr18gefpVOMlRKR1O4cNp5+YkL8gYuxGwS3gaRVvbM5j1a1kuIAx3U+k27+RGItr4g2r8S+l31ixjdvd1wtu2N X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(136003)(39860400002)(346002)(451199021)(46966006)(36840700001)(40470700004)(86362001)(8936002)(8676002)(5660300002)(82310400005)(26005)(1076003)(44832011)(7696005)(478600001)(6916009)(70206006)(70586007)(41300700001)(316002)(6666004)(66899021)(186003)(2616005)(2906002)(47076005)(40460700003)(83380400001)(336012)(426003)(36860700001)(40480700001)(36756003)(82740400003)(81166007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 13:46:43.9051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4396a5bb-d93d-44d5-2ae9-08db797070dc X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5450 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Enable SME support in gdbserver by adjusting the usual fields. There is not much to this patch because the code is either in gdb or it is shared between gdbserver and gdb. One exception is the bump to gdbserver's PBUFSIZ from 18432 to 131104. Since the ZA register can be quite big (256 * 256 bytes), the g/G remote packet will also become quite big >From gdbserver/tdesc.cc:init_target_desc, I estimated the new size should be at least (2 * 256 * 256 + 32), which yields 131104. It is also unlikely we will find a process starting up with SVL set to 256. Ideally we'd adjust the packet size dynamically based on what we need, but for now this should do. Please note we have the same limitation for SME that we have for SVE, and that is the fact gdbserver cannot communicate vector length changes to gdb via the remote protocol. Thiago is working on this improvement, which hopefully will be able to be adapted to SME in an easy way. Co-Authored-By: Ezra Sitorus --- gdbserver/linux-aarch64-low.cc | 74 ++++++++++++++++++++++++++++++++ gdbserver/linux-aarch64-tdesc.cc | 7 +++ gdbserver/server.h | 2 +- 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc index 7c633c212f3..95688480c3d 100644 --- a/gdbserver/linux-aarch64-low.cc +++ b/gdbserver/linux-aarch64-low.cc @@ -41,6 +41,7 @@ #include "gdb_proc_service.h" #include "arch/aarch64.h" #include "arch/aarch64-mte-linux.h" +#include "arch/aarch64-scalable-linux.h" #include "linux-aarch32-tdesc.h" #include "linux-aarch64-tdesc.h" #include "nat/aarch64-mte-linux-ptrace.h" @@ -750,6 +751,66 @@ aarch64_sve_regs_copy_from_regcache (struct regcache *regcache, void *buf) memcpy (buf, sve_state.data (), sve_state.size ()); } +/* Wrapper for aarch64_za_regs_copy_to_reg_buf, to help copying NT_ARM_ZA + state from the thread (BUF) to the register cache. */ + +static void +aarch64_za_regs_copy_to_regcache (struct regcache *regcache, + ATTRIBUTE_UNUSED const void *buf) +{ + /* BUF is unused here since we collect the data straight from a ptrace + request, therefore bypassing gdbserver's own call to ptrace. */ + int tid = lwpid_of (current_thread); + + gdb::optional za_regnum + = find_regno_no_throw (regcache->tdesc, "za"); + gdb::optional svg_regnum + = find_regno_no_throw (regcache->tdesc, "svg"); + gdb::optional svcr_regnum + = find_regno_no_throw (regcache->tdesc, "svcr"); + + gdb_assert (za_regnum.has_value ()); + gdb_assert (svg_regnum.has_value ()); + gdb_assert (svcr_regnum.has_value ()); + + /* Update the register cache. aarch64_za_regs_copy_to_reg_buf handles + fetching the NT_ARM_ZA state from thread TID. */ + aarch64_za_regs_copy_to_reg_buf (tid, regcache, *za_regnum, *svg_regnum, + *svcr_regnum); +} + +/* Wrapper for aarch64_za_regs_copy_from_reg_buf, to help copying NT_ARM_ZA + state from the register cache to the thread (BUF). */ + +static void +aarch64_za_regs_copy_from_regcache (struct regcache *regcache, void *buf) +{ + int tid = lwpid_of (current_thread); + + gdb::optional za_regnum + = find_regno_no_throw (regcache->tdesc, "za"); + gdb::optional svg_regnum + = find_regno_no_throw (regcache->tdesc, "svg"); + gdb::optional svcr_regnum + = find_regno_no_throw (regcache->tdesc, "svcr"); + + gdb_assert (za_regnum.has_value ()); + gdb_assert (svg_regnum.has_value ()); + gdb_assert (svcr_regnum.has_value ()); + + /* Update the thread NT_ARM_ZA state. aarch64_za_regs_copy_from_reg_buf + handles writing the ZA state back to thread TID. */ + aarch64_za_regs_copy_from_reg_buf (tid, regcache, *za_regnum, *svg_regnum, + *svcr_regnum); + + /* We need to return the expected data in BUF, so copy whatever the kernel + already has to BUF. */ + + /* Obtain a dump of ZA from ptrace. */ + gdb::byte_vector za_state = aarch64_fetch_za_regset (tid); + memcpy (buf, za_state.data (), za_state.size ()); +} + /* Array containing all the possible register sets for AArch64/Linux. During architecture setup, these will be checked against the HWCAP/HWCAP2 bits for validity and enabled/disabled accordingly. @@ -772,6 +833,11 @@ static struct regset_info aarch64_regsets[] = 0, EXTENDED_REGS, aarch64_sve_regs_copy_from_regcache, aarch64_sve_regs_copy_to_regcache }, + /* Scalable Matrix Extension (SME) ZA register. */ + { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_ZA, + 0, EXTENDED_REGS, + aarch64_za_regs_copy_from_regcache, aarch64_za_regs_copy_to_regcache + }, /* PAC registers. */ { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_PAC_MASK, 0, OPTIONAL_REGS, @@ -839,6 +905,10 @@ aarch64_adjust_register_sets (const struct aarch64_features &features) if (features.tls > 0) regset->size = AARCH64_TLS_REGISTER_SIZE * features.tls; break; + case NT_ARM_ZA: + if (features.svq > 0) + regset->size = ZA_PT_SIZE (features.svq); + break; default: gdb_assert_not_reached ("Unknown register set found."); } @@ -873,6 +943,10 @@ aarch64_target::low_arch_setup () features.mte = linux_get_hwcap2 (pid, 8) & HWCAP2_MTE; features.tls = aarch64_tls_register_count (tid); + /* Scalable Matrix Extension feature and size check. */ + if (linux_get_hwcap2 (pid, 8) & HWCAP2_SME) + features.svq = aarch64_za_get_svq (tid); + current_process ()->tdesc = aarch64_linux_read_description (features); /* Adjust the register sets we should use for this particular set of diff --git a/gdbserver/linux-aarch64-tdesc.cc b/gdbserver/linux-aarch64-tdesc.cc index 3c60e1a4db0..b6b622ba4f2 100644 --- a/gdbserver/linux-aarch64-tdesc.cc +++ b/gdbserver/linux-aarch64-tdesc.cc @@ -41,6 +41,11 @@ aarch64_linux_read_description (const aarch64_features &features) error (_("VQ is %" PRIu64 ", maximum supported value is %d"), features.vq, AARCH64_MAX_SVE_VQ); + if (features.svq > AARCH64_MAX_SVE_VQ) + error (_("Streaming svq is %" PRIu8 ", maximum supported value is %d"), + features.svq, + AARCH64_MAX_SVE_VQ); + struct target_desc *tdesc = tdesc_aarch64_map[features]; if (tdesc == NULL) @@ -56,6 +61,8 @@ aarch64_linux_read_description (const aarch64_features &features) if (features.vq > 0) expedited_registers.push_back ("vg"); + if (features.svq > 0) + expedited_registers.push_back ("svg"); expedited_registers.push_back (nullptr); diff --git a/gdbserver/server.h b/gdbserver/server.h index fde7dfe7060..306d75d4e9b 100644 --- a/gdbserver/server.h +++ b/gdbserver/server.h @@ -104,7 +104,7 @@ extern int in_queued_stop_replies (ptid_t ptid); /* Buffer sizes for transferring memory, registers, etc. Set to a constant value to accommodate multiple register formats. This value must be at least as large as the largest register set supported by gdbserver. */ -#define PBUFSIZ 18432 +#define PBUFSIZ 131104 /* Definition for an unknown syscall, used basically in error-cases. */ #define UNKNOWN_SYSCALL (-1) -- 2.25.1