From patchwork Fri Sep 6 14:33:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 825992 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp836823wrb; Fri, 6 Sep 2024 07:34:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHToFB1dH0JTZ0j5hQIoLh3QdF4n6k/L2+z56ZdTl0kU/puCrccwMX29WlhmXoGM2KaH1GlA==@linaro.org X-Google-Smtp-Source: AGHT+IGzofhB2/o0EB9D2ItTvvZ8PIA9RbZMCcEAWLnfS/oUqDeHIH7EXanx4C67YHqfVnZ27SHn X-Received: by 2002:ac8:5852:0:b0:457:cab4:6e4a with SMTP id d75a77b69052e-4580c757587mr38001031cf.37.1725633296285; Fri, 06 Sep 2024 07:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725633296; cv=none; d=google.com; s=arc-20240605; b=GpkTIiCwL7SxRaa0NTn9lHZ4wGA0wqKH7ng3FUsvY67jTwHqGtihBH9kb6zJmL5vai LXeNl5EaSZffieJYInvTy0im2iWi/BJ/oGribpnO9gZXcb+sLutE0eSDUv+8fD3oWknz kCfv3Q7yUsiXrm6B6FB8yToZghA2i8Jm22RNxo7HMOQaQu7ypKrciNooGaGoHAWv7VqG pY0+6G+4UhOwEtTqe6qJbKmd6T65UPuRQ+i4Oo+hiHlYf8YEvYr3tGVejs7eG5u4ubMu tVvUV5JZbfwGntHXwsvTA3KX4ht92fvIjtdecL8ck7TSf4XDm8WXGSRetphsPwl3bv9X v6ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=xaIvNRilfR6Nz+fW3b1xuwYZ22NkX4J/LvEgnShJQ0w=; fh=fQSRkfw+DkTHa5KQssXieneufL+rl3wPoA2jkVIsZpk=; b=UgXEWoH0N+TgtaxdxNCQtWW+DPkHcvBdrBIcCM6TSBq9i6WvVMqLp45W8VUUgHGrri lx/HRcZZZd/ytUiFHX0iD6oiK6kZV4wXbobeNjsYm1H+QfF/igkVyBlA1Y4wu4Of786z PqqLM6YjtCM9Rr18S+ucDDodjt93CY3ZPgRXwKy0wHkM3KQnvpHHSVgoVNIQAFICggDt ro57deuRNfmgrvnFbwNhHRE+TyAFe1d3IKEBmZopvToRkysvmsUkYa8ifxvKpdTdK9fu 7VU6DjWUMhbJPoLvjWVe10U73g6puTEMO6lJnaxq9T8boMBhFzoreURxafgtimc6dsZ2 7Ipg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XHbCVZN9; 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 d75a77b69052e-45809c85e3asi30601211cf.297.2024.09.06.07.34.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2024 07:34:56 -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=XHbCVZN9; 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 1sma28-0000c1-6C; Fri, 06 Sep 2024 10:33:56 -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 1sma26-0000Vi-J3 for qemu-devel@nongnu.org; Fri, 06 Sep 2024 10:33:54 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sma24-00073V-Vh for qemu-devel@nongnu.org; Fri, 06 Sep 2024 10:33:54 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2053a0bd0a6so22441405ad.3 for ; Fri, 06 Sep 2024 07:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725633231; x=1726238031; 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=xaIvNRilfR6Nz+fW3b1xuwYZ22NkX4J/LvEgnShJQ0w=; b=XHbCVZN96Ur5212rHy3NarShsxyuaVNeerWw1zNlWrGY/WahIOfUkHncn7TW4wCwuq fJU86KNtP0T8XfcjLUy/SdMoOEelihQ66jl/PjBBcihhS1hCoGFGac0qTfc/WxoOP26f AyhLTcb//r/pQXSgQPQucsxj7d9GRM+2eETpdqVQeAC6vgE0pQEoL5TlytsdN1yyFLym 6/QonXWeI796Zx9qgsGyAMew1mA6uj9xWEHX3Tqyv1RuzzRhXy3pHHNI9C2c7Fm3LUz3 QCj8XPQFc3hkKvnhTzYmjPV2D48NbBd/iyhZXkuVV8mJrMctloTBYp7DSxvG1SX7H+fP Hohw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725633231; x=1726238031; 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=xaIvNRilfR6Nz+fW3b1xuwYZ22NkX4J/LvEgnShJQ0w=; b=lj2mE1XBn5LGkk0Geob3Hm65P27Uo1SEdAAxYOgr2zJtZF34/NcLusQSZCyiQoPISJ JgmYKgRSIOzJH5yEc+x1jXkt/cYBt0/hshnfcBvM8fzxvZX5prkHJkupq6/SE5vGmg9Z aHXZDVRDxhynKLHXrgw5whpp6HYKUOYfltYhGO5JPNvknxZE4m38ar8ScQaTTiO7Baem NQg76bwWTVAmLDiulIXRbfgkA9EEPdszV7kPunYTBJ/NxHQ9+NMMMhPJ2r/zKK+tqcba XZW8ViwG1GriWf5ZwpzA46+T6V01hZrG8ujN9RHqO6Cu73hX5YbvIegBZsUJ/YOdtx7s 7XzQ== X-Gm-Message-State: AOJu0YwyUcEclJqNKI8z/MVm6VKDl9tP7AF4Im6kVT9dMtO1dF8Xpf0X A7GFjOT7MTrle8ndqXb7zX33o+OiXHozq4fbqk7FU9Wkcak+tQU9hxXgs/Hj5UOniYIAwcZs0uA n X-Received: by 2002:a17:903:606:b0:206:98c8:4a71 with SMTP id d9443c01a7336-206f05f688cmr24194605ad.38.1725633231314; Fri, 06 Sep 2024 07:33:51 -0700 (PDT) Received: from amd.. ([2804:7f0:b401:42a1:3e7c:3fff:fe7a:e83b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-206ae913cf1sm43844425ad.28.2024.09.06.07.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 07:33:50 -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 v4 2/5] gdbstub: Add support for MTE in system mode Date: Fri, 6 Sep 2024 14:33:13 +0000 Message-Id: <20240906143316.657436-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906143316.657436-1-gustavo.romero@linaro.org> References: <20240906143316.657436-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x636.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. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/620 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 }