From patchwork Tue Sep 10 14:07:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 827003 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp325136wrc; Tue, 10 Sep 2024 07:08:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVl0w5aQ5Ix/BrHpz9C+DAOr4eqOy6sq/F96rCU/adqg2M109ItM1KTTX7dxy3v2ajuABXqpw==@linaro.org X-Google-Smtp-Source: AGHT+IGhrKy3yZU7+e8bFEiA0VovS1q/cA8o6XRcI4sURSY4/M3R3xYjGlLdqAmnXNgSpxDoeC6W X-Received: by 2002:a05:6902:1b8d:b0:e16:69b5:ef62 with SMTP id 3f1490d57ef6-e1d34875c13mr13652061276.5.1725977294530; Tue, 10 Sep 2024 07:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725977294; cv=none; d=google.com; s=arc-20240605; b=I6P76HPtvV5YHm6B+ue85G/Jvboh/FZx6Qu9beQlM28VLuDTSoJUnucXmhYutbLkIV 4wVl+0uSBnN0xpJ1OQBoKwt0NGSEajlGa0z/KZ+6P9a6h9YTQq6dXr6qcGmIM4HWgCQe wIiYhduiuJwg0H/gwZpx6m7i6G2WpFYjd+utWjP000lfUcEN2CS573WJYdhPsQUtRBVd wRgaO46DyW1baLLRos3Be3xvqAAbL+je/PeJWd4obUXwVH2Amc5rC5lYGI+Stzn2R4+K P3IhfSSPXF/47J47IMkKVjXyZ4F8xW0YvNSwTe02mqJdiNUcfGYDechbnYrTg6JEzUKJ gVPQ== 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=fSOOKTU4/ntvh1NQhQ1KOTaJwtvBojTKzDVk3v/UKCo=; fh=PhBQM8pmScIWHtkB7lnBtYO8zFHd76cVam1qPCuCqeM=; b=c5Uv4U3rOV9Mlur7RtlV/kxNlV4TnZodBUbbOsg/u4SQQ+Y8NYtF0ptPEZ65n5sqRU Fao4LaZBvKEa+3gUdHLP8mxdXaAdKMpfq0lHsWdKwtbEF/xzjdQY6KZg/kMeYLTTlbsc LzxaGRw8KSRRd1Aak0JlHEy1a10VekgQ8TeQ8BCRuJxyaJXjsIgGTCFZeTGr4DDw0fYs +BYivb9h/GywCKDik9V+i2LvUF9d25m77AQqAvQAvHSiyNtdqxoh2Y8DQS8u/7cG9H8h cfmL856WYykZ8NLV3A7sFgyroeHpygEjCzJsYQkZtKMdC/y0WaOqjaKu87CPlr7M/Qi/ sjaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RoGl4P+d; 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 3f1490d57ef6-e1d7bbca60csi1058631276.480.2024.09.10.07.08.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 07:08:14 -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=RoGl4P+d; 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 1so1X0-0007jX-Pg; Tue, 10 Sep 2024 10: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 1so1Wx-0007UH-A8 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 10:07:43 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so1Ws-0006UB-OO for qemu-devel@nongnu.org; Tue, 10 Sep 2024 10:07:43 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a80eab3945eso535983166b.1 for ; Tue, 10 Sep 2024 07:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725977257; x=1726582057; 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=fSOOKTU4/ntvh1NQhQ1KOTaJwtvBojTKzDVk3v/UKCo=; b=RoGl4P+dlREizikCWeXw5BgoFVw3qhiumZ+le+OHwkUS0J7XDufSPnLsiab8zriiCf f7+USNYn+4YQlCfq5LmHWOZGdj1fua60GpQqoOkEN8ysoORHd9MW+9IRj7bERoCLAn5W 7sJSBBCcrsO27O4+qalN2VxAdXNYDJOLbqT+ul38h/ZgM2PMcfO8ub+qaPwf1YNu9po0 j+ccBByHA3zL/OQi9eRoZbgEB/kaQaauE8LDsu9rCMAbobZEfBYrxHnoCuGG0sjVeeaC f0B3hOSAVVKahG7EMg53672A3xpeQwsG9RQCMHU4jbRCbN9WLwSWVJRdndXbiq6ufDdO lTJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725977257; x=1726582057; 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=fSOOKTU4/ntvh1NQhQ1KOTaJwtvBojTKzDVk3v/UKCo=; b=iuRSHlYgi8TkpUhereM4lS7zjlaL6PQQZ8dO7RCW4u080G60L9cioBq9o9NPRkX3ZH gULrYJvfnuL8lQ3N7QkQGFVA9kacQpoyOLjZX9YE6J039SVpUH+V88zofae+q7XPzyLt /Dr6LDkTF9Xpv9GRQ6Qzuxn1x3n4vJPVIeZwS/2hwZ/CyEkRmJ8sU2tWnBETHASZ1tkz ddq8Pb3Xr5Uax2sWkaKUEZYAhkxgYWyYC8YqGqhRhKLb4osXSD4lnZ+dkKU8V7ubUhHZ icBjkFBSRmpT/AL4hDsVXvAcp/trN8LeS1w7I+F67YG93ZjVKQod8l48XstEUhc5BOQ7 qfFg== X-Gm-Message-State: AOJu0YxKIl+G1tVibZiYCN+wM/9HlNJqx8CCYvmMJmSbKoHwvsMgHk0N rmMybVinWLUgzDTnJHAJQCLbMBmURMRcfYLfS40V9J7aXwB2mP2L0Tknbn0uaYs= X-Received: by 2002:a17:907:3da4:b0:a8d:6073:2c13 with SMTP id a640c23a62f3a-a8ffab8f2d5mr80695566b.33.1725977257023; Tue, 10 Sep 2024 07:07:37 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d547e5sm487267866b.201.2024.09.10.07.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 07:07:36 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 38F8B5FA08; Tue, 10 Sep 2024 15:07:34 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Zhao Liu , Marcel Apfelbaum , Beraldo Leal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Yanan Wang , Peter Maydell , Mahmoud Mandour , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, Jiaxun Yang , Paolo Bonzini , Richard Henderson , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH 06/26] gdbstub: Add support for MTE in system mode Date: Tue, 10 Sep 2024 15:07:13 +0100 Message-Id: <20240910140733.4007719-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910140733.4007719-1-alex.bennee@linaro.org> References: <20240910140733.4007719-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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 From: Gustavo Romero 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 Message-Id: <20240906143316.657436-3-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- 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 }