From patchwork Mon Jul 22 16:07:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 813724 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1940922wro; Mon, 22 Jul 2024 09:08:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUTOyWJccMHnF29lgttRqXUb28h5+/+HTdOkBCuR6zY9UwSYPFOw1X2xk2LYt4L3HkZJN5Zg9jJiM/2qfliRZgX X-Google-Smtp-Source: AGHT+IHk8x6RQHj1RiVnb1v6+pY09WBtdKySBKC8pFpZ9CWcIQGDGuX0lWIPcsaLZkp2MfZ7+UXj X-Received: by 2002:a05:620a:b1c:b0:798:db85:c9ae with SMTP id af79cd13be357-7a193981fe4mr1788744685a.28.1721664512020; Mon, 22 Jul 2024 09:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721664512; cv=none; d=google.com; s=arc-20160816; b=aXm2iT2sHq5cOZS8OWacLEoAL8mooObyYQDtALqxn3bty6chR+bOC0abAuezTgMdMr T9rKIEBoNh/aXDwvPdqR1F/Ed3Qti8dzz+ElyH3j1oFS2N9daTN9aQUutWMyjAiI+cYn OngtU+NHzwE1qmWLzo/HUUatoB5H/RZdE32OFssfIEiZT1QbaU4qBxgSJRGqVOaVIuys BqlMLbvhHF5bh5kRcWCroBUIhVeSfzsusT4rLAlY7eVg6DRGL8cwhbVyig/zk3cwCXXG aZDxhYz4AUbKEfA9UqB3UJSGV/E/shp6MdAx5rP11UpjvAYyieH0ewHtbiX7OWBz8ERY +cyg== 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=Y1ZIker/Na8GmtNzPBdUPRkmdrALyxwwToEGtVfZGu8=; fh=fQSRkfw+DkTHa5KQssXieneufL+rl3wPoA2jkVIsZpk=; b=IU/Rggw5A/I1oFpdOgIHOCGw+l+1ohVAkDfo9yXt4mEFGGEmU77Y4lDrxqX5ygas31 b2y4tqVwUvMj9bH6i0BHHGGR2geOBMjmQl4xjcjQCaetGXZ7N0SJUVBvfMW9XxVrYsEW y7yyQ3HpwJULHnxPIr88E4g3mOdfv3GlzCr0L3L9PbMjN/Dr1BGd1q4yKQxyt7lVvMP+ 89gmQVKDQ82NakpJbRwAnaq9fC/A29QQzI9GnSCMLmrz4XLY+cM4fHimdaMzoBI0vUvo gRU+1NidzxVEFnx9ZZuhvNclv33TBXp+hbb8nEpAd4rQ8/eG47QOADVLYwlvcdf+PHuV U/VA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ooyFylc/"; 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-7a199067236si829144285a.453.2024.07.22.09.08.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 09:08:32 -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="ooyFylc/"; 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 1sVvZf-0004n6-5b; Mon, 22 Jul 2024 12:07:46 -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 1sVvZY-0004cY-LW for qemu-devel@nongnu.org; Mon, 22 Jul 2024 12:07:37 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVvZW-0007dw-0X for qemu-devel@nongnu.org; Mon, 22 Jul 2024 12:07:36 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1fd69e44596so19208445ad.1 for ; Mon, 22 Jul 2024 09:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721664451; x=1722269251; 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=Y1ZIker/Na8GmtNzPBdUPRkmdrALyxwwToEGtVfZGu8=; b=ooyFylc/qaquLHgSfvm+j2hTCjcPza5Jmm9RNweq0LTlfGoS3nsecYNoDVaEp63h9Y RputhuP9kYCCt4EODZCQo/7P3oNDx/9Mjcutg9+yl7R7LRURHgHan/BmPnx5B+Ynn/T+ HplyAR84yy6+CYiHEIWASou9cUv/GVJrso9j/N8cD9pQK+u2cG2HQw8Y+B1cW+m6Ac4r II+VcT5zSdInXt0j2SgV2xCd87csIRPVLj/JG/3sna1Ho1Ihe1cEqJ0gSTYVwk3HTBmT XJU/rt+jwNNwX9+8+eQnKpfYh4yt3Y/ISBYoisCE5AkgxIEtL9Tp6MKTzlRHzRpmbUqQ 8wlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721664451; x=1722269251; 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=Y1ZIker/Na8GmtNzPBdUPRkmdrALyxwwToEGtVfZGu8=; b=lzc5cMaSXa9XFq+xR6tz1npgz0lVArIqJcSdOMDiVG8+wtyDpjWkXOKFbSafArUr+3 yZA82yPGldBcLgjxTLJcGT9JnGRFf+VHqdbzmwY3r9599TCfhXvM1au1rIzGdppl7gAT bB4eZFkPJY1XcUWQXwdaqWnOVSG31TXzuPpetgacC+l9n+A4K6xUCEzUVKOFItKwyt8W uoiKRPrfp0UpYKXg8mw/NFycuC+yx18PDKCbaQllqmBpQIHe5pQaXQTOJFuSJfWivb2g t6ZYXgsY1K+MVJqkDhOgoavrSsP11r3uisJTQAINIOAe32ANF/TLp2mv59APVOwzPnTM scTQ== X-Gm-Message-State: AOJu0Yx+UJjnsjy30vyppisf9vacSsjJs7GDC2mk20kOquJV9mM9SQm4 1cwx4BeqrpaRakI8pbOgbl5EXlbiFdls+j4svTZIobb4SPDwOlWVIzV0H5txAMz42p/bUiM7wMO J X-Received: by 2002:a17:902:e746:b0:1fd:6f24:efad with SMTP id d9443c01a7336-1fd6f24f2e6mr154949855ad.26.1721664450656; Mon, 22 Jul 2024 09:07:30 -0700 (PDT) Received: from amd.. ([2804:7f0:b402:9243:3e7c:3fff:fe7a:e83b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f2ac8eesm56533165ad.118.2024.07.22.09.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 09:07:30 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, philmd@linaro.org, alex.bennee@linaro.org, richard.henderson@linaro.org Cc: peter.maydell@linaro.org, gustavo.romero@linaro.org Subject: [PATCH 2/4] gdbstub: Add support for MTE in system mode Date: Mon, 22 Jul 2024 16:07:07 +0000 Message-Id: <20240722160709.1677430-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240722160709.1677430-1-gustavo.romero@linaro.org> References: <20240722160709.1677430-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x62e.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 d59272fdbb..fd5a9d0609 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -426,6 +426,7 @@ int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) return 1; } +#endif /* CONFIG_USER_ONLY */ static void handle_q_memtag(GArray *params, void *user_ctx) { @@ -596,12 +597,10 @@ static GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { .need_cpu_context = true }, }; -#endif /* CONFIG_USER_ONLY */ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, GArray *qtable, GArray *stable) { -#ifdef CONFIG_USER_ONLY /* MTE */ if (cpu_isar_feature(aa64_mte, cpu)) { g_string_append(qsupported, ";memory-tagging+"); @@ -611,5 +610,4 @@ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, g_array_append_val(stable, cmd_handler_table[QMemTags]); } -#endif }