From patchwork Thu Aug 8 05:15:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 817706 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp702705wrt; Wed, 7 Aug 2024 22:16:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUuPh4kvQyjuq3VelCd0syw9IQfzwTMG/XmHHugnMVwwWgAyAgacCkcmaPqkshYeEY0C7asSa94xRcmRrr6BGP X-Google-Smtp-Source: AGHT+IGv6SkFJD74/m4FE2Ls95Fwh6aOfaK1zyatvqKCq751fEgYKjqXFkgzW/lieP9zDbqaUn9P X-Received: by 2002:a05:690c:d96:b0:61b:3304:b702 with SMTP id 00721157ae682-69bf7357559mr8147457b3.5.1723094207348; Wed, 07 Aug 2024 22:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723094207; cv=none; d=google.com; s=arc-20160816; b=kUPL7rRIyRteqKjhM0alJ+ug9gxw6WCaxPhW4TQTuPz7BpFmMt0oWRNh5o7bObwG28 5rnjidEw9F87F+AYkM97RB5FzuHxezfwtppFFZu1Xr1ea9HTFZMhGav3vFtWhCOkZ3AB +OPL+7e4G659AfehBWg1MoJJcPxp3Wlc/Na8xZYWIAceNHWMq9VxNV8vnev8s9/WbMl2 PdEfgxM6tTQyyS+116GTBXN2FL41scAH6D9lKpKidbGgEsWwsGD0ZzAyj1EtGNq12yl/ mUWZlR6lRHnm5bbDI4LBhc7LTCH9a5pXA2UK2vg+wLjMo21VQAoOdDL/4PYdQISH0Iuo Uhkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vDvV5wCpIRgzAO2ubNmWFuQnSMmzynNkCt87fmBWnrM=; fh=b5q3cJgcc12gnKfUWQQbBLXKRqia4x4Q8oLG+cCF/wU=; b=zBCDuQanq0y3Ol8r54kZBt3rQHCogiCVKAp/Y4MjjMC/The3n4TKsimrYEq6FC5hGj BglwDiyjTWLDsBQmkeDkhCvxNTENaJ/XXVd8SNp0sGMlK+KqjklAWFSCeJcuXmH21jAy RCRDjAg8WFD5b2M7xYYZBKIRn05p4rqm139V9l/FsnYRyOcxoU0Xlirooy0si7yGIWKC 3t5Y5VXe+rxIqxtfPx5zaEzaU2qNlVDPmSWP+BmGpdtxHmoTmgYPEzH9Lc/bXRkEVKMd vgI7EhSrPbV3etASsccH8TKOMj1MnAs8RxN8aW0QIpUgI2UYlJgyBsUvmwTbBpXPS6+Q QxwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HN78YkVv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a3788434fbsi335173885a.561.2024.08.07.22.16.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 22:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HN78YkVv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbvVO-0007aX-QJ; Thu, 08 Aug 2024 01:16:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbvVH-00074e-C8 for qemu-devel@nongnu.org; Thu, 08 Aug 2024 01:16:00 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbvVF-0002kY-Mz for qemu-devel@nongnu.org; Thu, 08 Aug 2024 01:15:59 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-70d28023accso561323b3a.0 for ; Wed, 07 Aug 2024 22:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723094156; x=1723698956; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vDvV5wCpIRgzAO2ubNmWFuQnSMmzynNkCt87fmBWnrM=; b=HN78YkVvRsf6ku9N38bcMkoSloqLZiyjywaiOaP6X+kd18WXERiN3KsGqrqAIMBhyJ sIjYSuP2DlIJXfDVL10vnFaMulmzyZRYdc4dkkhGwPUkugkMmcnqBLv5QDMf0U1qrTTd QbZs2ov7bXvxwCR04Io0v8atYbgFibfzvaYlIC06QdVzwVV8TSc+tps6Xrj30J4rgwH+ +J3K2uFd1tq5heDeDbGDx/SSGdHGAPNWao2RuLszXX+3MOY2zBlgcNmkrmfueeBVhInw Js0aKoKSyZDoC1SmHBc77ms1ZKG9J02dbw+OShhPGECsqkfVZsFeZecXw4Fn8tYnN8k/ 54Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723094156; x=1723698956; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vDvV5wCpIRgzAO2ubNmWFuQnSMmzynNkCt87fmBWnrM=; b=qPj6a7OxWq8Xd0L3h5tf5444YhXtrhAwcGhctdwjc8vieeQaejGGEl4IF33plClu2j aHDAPe+vdT0LqNpWf5CWqZhn/B6adn+mFYbvrYjjoZo9UW2y7ahdqoG+wOdRmv0I6/ih 38GwTX5sn5fl2ikqJKrfqgJk+2pVuozhHHhTmLrswBLYDZ83JsLXMqmZ+adKRDuUxwWz 78IZkrNtR5WzuFyfGO0wfHK1t4iU7aHn47dYACRgK3FzoeKQTLodKYkIhIz9jr5djfWz Q4sohU9tSZjQ5DOhj347ObVFde397nCdTuA3z79PwUJkOOwECTxn8sscg+r7D37zbgZv KATw== X-Gm-Message-State: AOJu0YwawkxrUQo25nwItq/5f2MV96W1aU+B33Ax6pF+ZlpPflN9RwQ7 LDVpvkdlF3fv/usvxudIxYlQQzm5g/Zqb1cjLjKpW4OKSWYX2ShozHUlXTjH3mW4hjfrsNePIuI 3 X-Received: by 2002:a05:6a00:22c2:b0:70b:1d77:730a with SMTP id d2e1a72fcca58-710cae75777mr1117034b3a.28.1723094155849; Wed, 07 Aug 2024 22:15:55 -0700 (PDT) Received: from amd.. ([2804:7f0:b403:720f:3e7c:3fff:fe7a:e83b]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710cb22a455sm373484b3a.71.2024.08.07.22.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 22:15:55 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, richard.henderson@linaro.org Cc: philmd@linaro.org, peter.maydell@linaro.org, gustavo.romero@linaro.org Subject: [PATCH v2 2/4] gdbstub: Add support for MTE in system mode Date: Thu, 8 Aug 2024 05:15:29 +0000 Message-Id: <20240808051531.3183498-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240808051531.3183498-1-gustavo.romero@linaro.org> References: <20240808051531.3183498-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This commit makes handle_q_memtag, handle_q_isaddresstagged, and handle_Q_memtag stubs build for system mode, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system mode. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson --- target/arm/gdbstub64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 26d242dd63..0f42855763 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -430,6 +430,7 @@ int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) return 0; #endif } +#endif /* CONFIG_USER_ONLY */ static void handle_q_memtag(GArray *params, void *user_ctx) { @@ -600,12 +601,10 @@ static const GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { .need_cpu_context = true }, }; -#endif /* CONFIG_USER_ONLY */ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, GPtrArray *qtable, GPtrArray *stable) { -#ifdef CONFIG_USER_ONLY /* MTE */ if (cpu_isar_feature(aa64_mte, cpu)) { g_string_append(qsupported, ";memory-tagging+"); @@ -614,5 +613,4 @@ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, g_ptr_array_add(qtable, (gpointer) &cmd_handler_table[qIsAddressTagged]); g_ptr_array_add(stable, (gpointer) &cmd_handler_table[QMemTags]); } -#endif }