From patchwork Mon Sep 18 21:26:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 76316 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9864384DD13 for ; Mon, 18 Sep 2023 21:28:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9864384DD13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695072511; bh=Yb5ensiN01lD7sAN2N/BoeKgXi2M4/s2lqBTT1PAIoE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GROxgV3CDkm1RcHZ5EC+2wM8B6Pg82Wx9sOZBhBlBouFYIaQCi7tTRa0nhQobUKAb oE12yg/qTNL7wWIHG6XJwnLkwuUZcg4sFkewp6Ti4WYoAw7Uu78SrZW+Cy/Tw1lTSa gPUQvcyEarVtXtBxJ+0a5RxJyAwC9LLwItJpAEHI= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2075.outbound.protection.outlook.com [40.107.7.75]) by sourceware.org (Postfix) with ESMTPS id 81549385772F for ; Mon, 18 Sep 2023 21:27:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 81549385772F Received: from AS4P195CA0042.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:65a::16) by AS4PR08MB7406.eurprd08.prod.outlook.com (2603:10a6:20b:4e1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Mon, 18 Sep 2023 21:27:14 +0000 Received: from AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:65a:cafe::b8) by AS4P195CA0042.outlook.office365.com (2603:10a6:20b:65a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27 via Frontend Transport; Mon, 18 Sep 2023 21:27:14 +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 AM7EUR03FT005.mail.protection.outlook.com (100.127.140.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.16 via Frontend Transport; Mon, 18 Sep 2023 21:27:14 +0000 Received: ("Tessian outbound 5c548696a0e7:v175"); Mon, 18 Sep 2023 21:27:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d42b118a96658b0d X-CR-MTA-TID: 64aa7808 Received: from b426b9289374.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F4FCFDF3-C21E-4545-8682-DD5B6508FC4D.1; Mon, 18 Sep 2023 21:27:07 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b426b9289374.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Sep 2023 21:27:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jnRjXS6SQ3vkv40RFlaR7V4HJgUHC9k3Z1lzfkcI7xWKifGj8yyiPVyUPyivoAKItVNQsG8pgf/38tMe473dd+F+wP/lIuBW6diUf6TKksAxSzMB7QXcNCpV0GpSqMmKTq8f2Zguw/6x0/QqmIboqlnxXlBqyMPeHEXaWiDZsLE1NOKXADAhZFGuSXoykwevcWFogHaoRr8llDRXD8MsC1m5TPp7FgmhewTHBLH/MM0hUrnUY1RqqEDzKidH+xGG16VGmirqvtNbvWR+XNkriEG1CIHP9aQVXLhsYLycYQUezzSZPZEGOVU2qxmtKwJudxs/fPeow1JsLpjbSnHLqw== 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=Yb5ensiN01lD7sAN2N/BoeKgXi2M4/s2lqBTT1PAIoE=; b=CZ3DU0grOf8ViwG45u85EYFiNs9aUiHuc5MZJGhQetBuLF00p7stBhtZBHYs00qCCqlZqOFx6eP8CwjSwMCph7h9Oa9ovklprC3xmfPK3lrYmMfMw3PP74OJDNHrshPa3lMjN0VKo/4D1eBhXo94XWL66qrjTh1lR6BB0NsH3eJljnXKFCYIR3cBEUy0YsqidowUum0c6GMo1wlxXGu5EdoA+Xla50F1fmPtgT4Za4f7xBITdGpaPuX1Hzgqre+Ujx6cgvUMePQvNoepeU2zfb5TyziLtLUBhucugoUBU6lw4zIDw8czC8o/D2iepp68jYpQtz387JuPHcVKFnl+cg== 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 Received: from AM6P193CA0112.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::17) by AS2PR08MB9595.eurprd08.prod.outlook.com (2603:10a6:20b:609::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Mon, 18 Sep 2023 21:27:05 +0000 Received: from AM7EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::c3) by AM6P193CA0112.outlook.office365.com (2603:10a6:209:85::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27 via Frontend Transport; Mon, 18 Sep 2023 21:27:05 +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 AM7EUR03FT009.mail.protection.outlook.com (100.127.140.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6813.16 via Frontend Transport; Mon, 18 Sep 2023 21:27:05 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 18 Sep 2023 21:27:04 +0000 Received: from e129171.arm.com (10.57.64.238) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Mon, 18 Sep 2023 21:27:04 +0000 To: Subject: [PATCH v7 08/18] [gdbserver/aarch64] sme: Add support for SME Date: Mon, 18 Sep 2023 22:26:41 +0100 Message-ID: <20230918212651.660141-9-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230918212651.660141-1-luis.machado@arm.com> References: <20230918212651.660141-1-luis.machado@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT009:EE_|AS2PR08MB9595:EE_|AM7EUR03FT005:EE_|AS4PR08MB7406:EE_ X-MS-Office365-Filtering-Correlation-Id: 10aa3525-259a-48aa-1d17-08dbb88e06f1 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: /E0r+r32KXxvI1sZctuLDYf/gRQBHpN6DrBSZaEm76nDXFFBVcZw+gsakxTZ1AuR8lcmxgt+wCqdREk5zA3GfqbODy0oHFCDlVjBvV2O+Bomi7ipjSDMXxdP9Hheza2r11C2UfRDCd7ru/QufV4mgwtopaR/xbJkqRFV4J2pmZYwM9K1SGPu7EKwxFYc32tzS2BzTTj1FYZ2Ip9q/mRfqfYABx3QuF9hj9TFcgsQ79b1ZC9/iO1GcTN3n1OmsfjNZBVHWkOnUQQuUd6m6UNk4qfrgF8rEAealLbJwgSTeWLYu1Iv0dknjWUV2pc9IuqDkg0CflSaQb3IKGZmv3w9SNgolKvNKBXhql0ADMBpP43rzgUIBPaY0FWrXEulN3r12eH1VulqoYFybhilR43HQrerVclTDsZUcC+/podEjera4dsjSqiHOdxPSfwlALQW3Z+ByYTxNnwgfewl5QHmfeZV9+A3gwfj4mKKOU1AIv0n/0JV0yVP/6+rpqIyxkpOFIRTgrTxxm5qEo/w3LJmw9q/Nq/aZrSmLkbUPdLfYKD1gt3ZkKBn38H03Z45JGBFag/SVhPVsb8/C591gh0QkfErTdu2zlng/FX6ZPyFtLsc+7LuUzuUJyWFYjdlfwRj4MvMroqG46P+5GliDVMqapkfYXAb4T8BZCPSqdacLxr3XhW6Wm7kRFvAAr+FtAWM6DJrkoyy+vfm5ot0PlwOtIqVobtmWMXbMtegqXOOnZEFJ2VZOFVSH9Uyj7YXMETuXJcgN/7YPMQKKKV5Uoap8A== 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:(13230031)(4636009)(346002)(39860400002)(376002)(136003)(396003)(1800799009)(451199024)(186009)(82310400011)(36840700001)(46966006)(40470700004)(40460700003)(7696005)(66899024)(6666004)(83380400001)(82740400003)(81166007)(86362001)(356005)(36860700001)(47076005)(2616005)(36756003)(336012)(40480700001)(1076003)(26005)(54906003)(70586007)(6916009)(70206006)(41300700001)(316002)(2906002)(44832011)(5660300002)(4326008)(8676002)(8936002)(426003)(478600001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9595 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d2e6e92d-967b-4f85-fbdd-08dbb88e0187 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jJNi/YvizKhn+ivo2GvukPuGBfb4kXW8n2Ze94IQaHgB6HDianCUAI89TRwjK8TOAYqkyPjkcFBTWPgrYMsu/ZNiu9G6bOoLYbAx8tt/05UPZ9nRqFHJnZLJ1xgXwZuLH7kFhXbUTcp3rfpK+VIQkEz8IcKfoQjhytpCUi053HF1VrGySyDvQ4kn3EohTW9GnOyxAKLpA95dExMt5b7E4+tmdpDudCE1DukYRT7Nu4W7gcPxflq18874UOzpKGt3cxqx9DpfFCxfj6wM8s6yavud8EulYRszmn3Vm8Lo9kkAr7i8+k++BtR/kpjfvZ+WL0KhG47Knhq8W8OPTJWx+3eLOP+Fk4YVTB8CMLAMVJaJTf4E5Yl+LfL62cIqhHnWV520BX9b9hQe7DWUBMMQvSHyt4tpcr9tLJ1gy6sydq3MrZSdpILXm/SRdR1YeWVOquTVk0Uy52iiABq8lKxoU3nYhHbJooGhb+VGO7J+85nr2s4LQUfLqZqIeCCvTA+bbA/2yYGjMY8+/oorPHyg0SzY8Rfnb9Mg+unYcXQwHgDilFJqHowFdhBIg/2nPKcOTxFNKQNJlHUlSYc2cJahFGG8yEypEKiarP5Yv7rHIV5X1F4Ue3Oq+ZkAajVOV4oGQcQiHHmq4fJ6g7nsO0Wz1nuaF5xAowKg/BGKzcfEGML/Qi5TtNY6WysV34sLLl9aOqLzxjslcq30VG06igLe3WdKfLVBnLAphiWwRBf9rMfcfzx6ATvdjB3bWQ6Kwqr8 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:(13230031)(4636009)(376002)(39860400002)(346002)(396003)(136003)(451199024)(82310400011)(1800799009)(186009)(36840700001)(46966006)(40470700004)(66899024)(6666004)(7696005)(478600001)(40460700003)(82740400003)(86362001)(40480700001)(36756003)(36860700001)(81166007)(1076003)(107886003)(26005)(2616005)(2906002)(426003)(336012)(47076005)(83380400001)(5660300002)(4326008)(316002)(8936002)(8676002)(41300700001)(54906003)(6916009)(44832011)(70206006)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 21:27:14.3607 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10aa3525-259a-48aa-1d17-08dbb88e06f1 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: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7406 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, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Luis Machado via Gdb-patches From: Luis Machado Reply-To: Luis Machado Cc: thiago.bauermann@linaro.org Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" v5: - Used find_regno instead of find_regno_no_throw. It would be a fatal error to not find the registers in these particular functions. --- 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 Reviewed-by: Thiago Jung Bauermann --- gdbserver/linux-aarch64-low.cc | 60 ++++++++++++++++++++++++++++++++ gdbserver/linux-aarch64-tdesc.cc | 7 ++++ gdbserver/server.h | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc index 7c633c212f3..e887e39b1c2 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,52 @@ 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); + + int za_regnum = find_regno (regcache->tdesc, "za"); + int svg_regnum = find_regno (regcache->tdesc, "svg"); + int svcr_regnum = find_regno (regcache->tdesc, "svcr"); + + /* 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); + + int za_regnum = find_regno (regcache->tdesc, "za"); + int svg_regnum = find_regno (regcache->tdesc, "svg"); + int svcr_regnum = find_regno (regcache->tdesc, "svcr"); + + /* 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 +819,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 +891,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 +929,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)