From patchwork Tue Nov 7 14:23:35 2023 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: 741887 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1646771wrr; Tue, 7 Nov 2023 06:24:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiMeL1Yk0TrGNe2tt6aWiRN2E4RAg5noleToHjXcUA1ZFLBjyhDA1fsaowJTjIp3ZghJ6W X-Received: by 2002:adf:e40c:0:b0:32d:9850:9e01 with SMTP id g12-20020adfe40c000000b0032d98509e01mr23513432wrm.61.1699367058096; Tue, 07 Nov 2023 06:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699367058; cv=none; d=google.com; s=arc-20160816; b=WMNT+kROh7B7lc4KhcZHsUlwcUpcJEJLa6wnYb7mSQX0m0gHMNOzEx98HmF4cF2GjS sRXCd5nQFggpdX46Tlx5Pr8g8mN75vhcR3K9pSJcNkpmHm+3ItbTbVz5fXUmIat/kgsx dQfSzPrCW0vS5vRhCFGi8ZuhONfkQ2k/WQ/GzT1xutQpzpkO+oVdb+if8prhO07k0WqH lUF7P7NiasgEBSw/x8PcSikoRIhYlR/aweelcSPtuLn6KXHlmpJQzR7IfI9gghe0TrRo tLUqCvk2xLzmwglFFnzQAIbsc9MRzjgo+y/sBxPgGDbFLCWQtG87HPd+z1Yd7hTNth19 kU+w== 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=jKa4ph+IbACrmLp/l7KUj2enSm3dMfUXc05KWX4jlJA=; fh=LkLRa2TvX96vEhUMtmPTVSftmtuj5rc3ChuwgSxkkQw=; b=tQiL32vq3bx4RiUBkx2uib098/nQ5vZfriOEBYQ25j6hkKM8QI6xGcN5hWmXg0pLPo 21frN7YM5iTgTLzD50l0X2FKrxglCsdPGzHVqMxVSMXo+Mkm0CNZsxdLvyfxCj0tjIuk mrAWRe4yjjD5c+EG33YL4Bn+TZ+pF5mLqX1mWOqF2bcssURLAV2Vfa0WddcxajKc9i0d oPIiyE6zO+5Dd9vTKUOnArHdr99KthKgMX40KjRSNIq9TW03fZMaL9NPI83rsWSq/TGS UdsF7O+y7GFNVgAuXqaRrbLDTqlEbRHeT9XuA69UByLG2aWQB3Q6IDAh7ZOWMshVa6UE VcRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KevyJCli; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id do9-20020a0560000c4900b0032f92fc368bsi1740532wrb.622.2023.11.07.06.24.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2023 06:24:18 -0800 (PST) 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=KevyJCli; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Mzx-0004Ed-Px; Tue, 07 Nov 2023 09:24:12 -0500 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 1r0Mzs-0004Cr-SJ for qemu-devel@nongnu.org; Tue, 07 Nov 2023 09:24:04 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0Mzp-0007YF-Gj for qemu-devel@nongnu.org; Tue, 07 Nov 2023 09:24:04 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32deb2809daso3403279f8f.3 for ; Tue, 07 Nov 2023 06:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699367038; x=1699971838; 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=jKa4ph+IbACrmLp/l7KUj2enSm3dMfUXc05KWX4jlJA=; b=KevyJCliE4PnLVzDXFLJ/yNUU6KBLmNzK19OACMFRlH1hWCXzMBIZdZxUZxu8fcEbl a4e2frxF/7gUBVI4AL13aQnJ3SRdFfyhcll7Br9XqsOvHTMkSZPNmTMyTegWch4I1ve8 6MBTSXvVw4kwsXwu2cRttjrD2s57FqPN0w7G1pegNq9+LMjO1aPX+Wl/lOjbY10KE5t9 +ELsJ/RzkQeJrIOa0WyZreMuqzgQ6jSUafXyMKd1IiCYbeupfdxT57D8mS/Sokb+Tfzm f9va9TClpL5D1SJoQVL2Ik56FPvAUGhQB6qDOMlrsxAo3jAZOLB3v00UhX48DRrnbAHu 5w8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699367038; x=1699971838; 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=jKa4ph+IbACrmLp/l7KUj2enSm3dMfUXc05KWX4jlJA=; b=OZDWAh9lH4B59vDG/XTTsgndryAhO9FMTAkdiWBSm12aZHW08feT4sFJNDCIe2582V 3fnj7beab7M0RyxisFk5gCWpJ21ULwm5Elx1xbOqPILZFWp5nd+u0TNiyZSRqm7Vfv4C K8w/UWjwBm90rvICdtdJDzVbWOOrXtx2YGN77XoaJ5ujzdfWLlDslxjMZDqgqKR+zXx6 OV7tArWeHdelG67NinVl42/0YYj2+bLi/gxmWvuZ4K6A+rjwm16lPc+BsY7XoFjhrWFu 2ETz2sRc4wexJ/xRnCNCaf/k1wO7W9HUu6j3I6+Wim3sZWiz0tTx49eAdOcu5Ba7EYTb eVzw== X-Gm-Message-State: AOJu0YyftLqFR3xkOhIb9f3KjIU5mtxjKUGI22FgBjfJ3AwK3bpcyoiA LIEjhmjvVjArTcBAP4W8OwymaA== X-Received: by 2002:a5d:47c7:0:b0:32f:932b:e02f with SMTP id o7-20020a5d47c7000000b0032f932be02fmr19117539wrc.55.1699367038435; Tue, 07 Nov 2023 06:23:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h6-20020adfe986000000b003200c918c81sm2457299wrm.112.2023.11.07.06.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 06:23:55 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F344365759; Tue, 7 Nov 2023 14:23:54 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 04/23] target/arm: hide all versions of DBGD[RS]AR from gdbstub Date: Tue, 7 Nov 2023 14:23:35 +0000 Message-Id: <20231107142354.3151266-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107142354.3151266-1-alex.bennee@linaro.org> References: <20231107142354.3151266-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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=unavailable 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 avoids two duplicates being presented to gdbstub. As the registers are RAZ anyway it is unlikely their value would be of use to someone using gdbstub anyway. Acked-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20231106185112.2755262-5-alex.bennee@linaro.org> diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 79a3659c0c..cbfba532f5 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -937,14 +937,14 @@ static const ARMCPRegInfo debug_cp_reginfo[] = { */ { .name = "DBGDRAR", .cp = 14, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0, .access = PL0_R, .accessfn = access_tdra, - .type = ARM_CP_CONST, .resetvalue = 0 }, + .type = ARM_CP_CONST | ARM_CP_NO_GDB, .resetvalue = 0 }, { .name = "MDRAR_EL1", .state = ARM_CP_STATE_AA64, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 0, .access = PL1_R, .accessfn = access_tdra, .type = ARM_CP_CONST, .resetvalue = 0 }, { .name = "DBGDSAR", .cp = 14, .crn = 2, .crm = 0, .opc1 = 0, .opc2 = 0, .access = PL0_R, .accessfn = access_tdra, - .type = ARM_CP_CONST, .resetvalue = 0 }, + .type = ARM_CP_CONST | ARM_CP_NO_GDB, .resetvalue = 0 }, /* Monitor debug system control register; the 32-bit alias is DBGDSCRext. */ { .name = "MDSCR_EL1", .state = ARM_CP_STATE_BOTH, .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2, @@ -1065,9 +1065,11 @@ static const ARMCPRegInfo debug_cp_reginfo[] = { static const ARMCPRegInfo debug_lpae_cp_reginfo[] = { /* 64 bit access versions of the (dummy) debug registers */ { .name = "DBGDRAR", .cp = 14, .crm = 1, .opc1 = 0, - .access = PL0_R, .type = ARM_CP_CONST | ARM_CP_64BIT, .resetvalue = 0 }, + .access = PL0_R, .type = ARM_CP_CONST | ARM_CP_64BIT | ARM_CP_NO_GDB, + .resetvalue = 0 }, { .name = "DBGDSAR", .cp = 14, .crm = 2, .opc1 = 0, - .access = PL0_R, .type = ARM_CP_CONST | ARM_CP_64BIT, .resetvalue = 0 }, + .access = PL0_R, .type = ARM_CP_CONST | ARM_CP_64BIT | ARM_CP_NO_GDB, + .resetvalue = 0 }, }; static void dbgwvr_write(CPUARMState *env, const ARMCPRegInfo *ri,