From patchwork Sun Aug 25 14:52:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 822361 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp1172703wrh; Sun, 25 Aug 2024 07:53:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWs4KYa4Gm+iviVhBFAjohXFCDXzJtvzjWBO8e0e3WBIYjizZIbk7tAgRKb8pcN52EznnxTEQ==@linaro.org X-Google-Smtp-Source: AGHT+IH0SMxYHQI5mI2gxSrxsu6S70ciL4/1bnU9BNs/oaDkH/6YfW1/mcRCaLgMsKJBQlGAsVJf X-Received: by 2002:a05:690c:6ac8:b0:6bd:5245:5e24 with SMTP id 00721157ae682-6c625b4539bmr91270427b3.21.1724597617925; Sun, 25 Aug 2024 07:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724597617; cv=none; d=google.com; s=arc-20160816; b=nbEecJUpEroNu2DpZqOuVzdUfG5M1/xSyWqbJGEZjISJGirqrLiXDgS8lJCiXpCsJi 7WPbU3EmFIcPPllEv5qKfd/YvsCg6QxS4DF14RVqmsqAg4FAkXJR3XN8vqcntPziu/EK YfbHD/DhlTMMuzx2I6U8N+rp/xxav4YPtH3PkweBZ/ZvRlZUUAXoZJVMysgjmQJH3z4P rMfNicAAMsCYA1ww5S+7f+uiEc8uJnvP+TAtTO+AfVWhTk7DrTGROOGcvCWWqE+vDxNb 0RJQilkif1aJwDIeLPzwN6OH0grLwnCcv39pgNcLYp3ewmdZqyMOVa4x5VcwBbAd2/+F Up6w== 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=LA4jeEZSXIyNF/wBhldtI2p7w4RNntmuoAerN03i6Nk=; fh=b5q3cJgcc12gnKfUWQQbBLXKRqia4x4Q8oLG+cCF/wU=; b=Ji7yNana0eoF9KJMGOz7b9nSK1BOIDmL0Iiwwvi/RMu4N40xNKKX4h2xHkEg76er2k u+jWdDmT6+uI5zSN/JKn6C/IW+VwRUDe4lO+2YmOG3uZ3QNtg/FBDmdSNZB7IuRRXXov kKq8CMwrU39E8fQmDeV1zIj9ferouBn/+3DuokMXsi8THlzTwIJ4AwugTEJONKRcTlqG t25yT3Zlao3O6OZqOBNwBKB+I0WMma7NLhzblZ5kZjSNYQyc1LpMjyJ/JSi3QlBsSlOo 6UxGh4yhdKpfevCTAYXgPOpuxZPCMExeC8CbfpFOuY62iIvLiznXs2pwztJi4yzkT8el ubcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=toJfdckT; 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-7a67f328da0si866877585a.27.2024.08.25.07.53.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Aug 2024 07:53:37 -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=toJfdckT; 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 1siEbx-0002gY-Tg; Sun, 25 Aug 2024 10:52:57 -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 1siEbv-0002Z4-V2 for qemu-devel@nongnu.org; Sun, 25 Aug 2024 10:52:56 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siEbu-0005vM-C8 for qemu-devel@nongnu.org; Sun, 25 Aug 2024 10:52:55 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-6e7b121be30so2212597a12.1 for ; Sun, 25 Aug 2024 07:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724597572; x=1725202372; 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=LA4jeEZSXIyNF/wBhldtI2p7w4RNntmuoAerN03i6Nk=; b=toJfdckTZl6sGd76DeZygEuSvr8KO0NtJ0JNwlmSVhKBXYmlYdmj9BEy4bifimtET4 4X+RRSuz+/spgQ/w7g9si7bC/Xn5d9vE3k2/Otr+cFhGvSqertZofw9EF4KwUIy2AZbv nqUuOd/ebaTO3enOPXHPtqI34LPcp199VHrodGVWgIO2W9DCnplLPxgNjVWbLKXXmhUM zLLbALOi0vkdYyEfzA5Vu22pifnEwNhm+cYVLM8YJ0iZLltF5+gI2Uze3PmeuLDv6Bvg 4F+nt6a6MntxovGGoep7pNiwsefVCMI9ejs0zZ+v11GkOBgOKeCfi1OoMWqSCH980zpE +Hag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724597572; x=1725202372; 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=LA4jeEZSXIyNF/wBhldtI2p7w4RNntmuoAerN03i6Nk=; b=GOiYK9OEKu9c6JT3o4ojEDIWi3Doqpyj7kJMPlpI3ezAxBO4/KsLhwf4xbmHujBGNG DzBm2nciAgvUM+2DC5cGm9gwgTaWepD/1sBzqq+Qh84YJ0gbbs8OzfHAUg+uG2JwElP6 9xo1usA4fANRRjJeNkE7J9vupG2IE5T8OEV8GS8s7iswLxp76NUTec3n9e4t/H/689xv 1NwDeuz2Ym5ds8y9nKAoSP1TASW0LC4IuUmdfzlq9AAfM2zyP9Bs0uFwi7YKoF6r7hOx yT9BRaxnP1riQhn/iZTHJs+0k4O9rgfJDLd2A1Eq+beI98Go0nDJADJsbKljbNJAaQAf juyA== X-Gm-Message-State: AOJu0YyaVNLWnEx9vRTGlxdVHl+pD/SqiHvulzi0oMvIW59SqZwaUVto t+G7PHcdl6Zsani/7kRD9cVqX/gT4xh56JP+1scXlta1y+m724Mi39HygkX+/oPBlO7bOMbttkN /ZMk= X-Received: by 2002:a17:903:22cd:b0:202:d86:f7e6 with SMTP id d9443c01a7336-2039e53a078mr92747995ad.54.1724597572165; Sun, 25 Aug 2024 07:52:52 -0700 (PDT) Received: from amd.. ([2804:7f0:b400:bb79:3e7c:3fff:fe7a:e83b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-203b0e164b8sm24698805ad.236.2024.08.25.07.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 07:52:51 -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 v3 2/4] gdbstub: Add support for MTE in system mode Date: Sun, 25 Aug 2024 14:52:06 +0000 Message-Id: <20240825145208.46774-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240825145208.46774-1-gustavo.romero@linaro.org> References: <20240825145208.46774-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=gustavo.romero@linaro.org; helo=mail-pg1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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 85a19c14c7..9462d3f560 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 }