From patchwork Fri Nov 3 19:59:31 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: 740714 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp9246wrr; Fri, 3 Nov 2023 13:04:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvYRQSjRe9UP9Il8F0TK5swcuTLJHUiXfMZ6jc2ggfe6EL38tNF6xZSS54tDAiTLTH+6hr X-Received: by 2002:a1f:1e52:0:b0:49a:8237:c81 with SMTP id e79-20020a1f1e52000000b0049a82370c81mr22168005vke.13.1699041864274; Fri, 03 Nov 2023 13:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699041864; cv=none; d=google.com; s=arc-20160816; b=bya0a5J+sof6Ko25E77ziKsXiLZo5L8qFnNjujhZ3EakoKY+P1BkCigrhng+64SSwZ DD8hAnNd+Nf5H417HeJHQ28hHwVjhXhE/ylTTkQ2jBt/y5XoduV65TcHuBAeRUPThzu0 v4zmCuauw/NOX97RXV61fAZD4/Cexlqy1+hquo6qS04espwO/Uy3lhWSG5PXl579kr4D L3XuJAUJSsF5dZCsyNwjr1VqFLp+UvIxekzvoFojh/yaPjNDQjH3pPtIgXHrJvQrBtMQ dzNwkPmzsYseDJDpjse1i7iCTdcSQtUAuRqwckK72QDEwkyVoS3nlBOBgKa0CKG2ZwjP ONyw== 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=BFMvrord6ftw6meFXnjRr6xGn8w/+aIYxd+SGyvGmrM=; fh=Kx2XI2Yx2wBtcq6Uh/oWjWfpY5DZOGguZfb2uQrLFXM=; b=zOceTeTioA9dtXPvwoPTSCfKBrf46fsF/IlrIvc0AmL/U2pGH1al/52TYrn3RnevZQ +7T4wnggGXZ8bHATcrLueMNhvkvh2rGHsm+BJFCWs0IcTtCJcWokCz6AX9sZ9rlod6uQ uDeu771meuP8aZyh3vIDDRUBkEODOvcrPM2DgLd96S2SSxmYAFSj41lp+BYL1eYCC74U KttOIaHj1rpY9ihvhFOxzIPcoxISsVbputIRiLtZt9JLpCq3MfJpc8ZZwzvgTXPSSOkh D9AqGgmB3MDDgFhcUIOrutqp9flDbQRYFEgCEDvZsLmcdiozvk3JnrrrBJLSkNbd9L6g m+xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GrGJv7UI; 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 pf2-20020a056214498200b006719629c973si2195677qvb.583.2023.11.03.13.04.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2023 13:04:24 -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=GrGJv7UI; 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 1qz0Mc-0001VO-Uq; Fri, 03 Nov 2023 16:01:54 -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 1qz0L3-00089l-8S for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:18 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qz0Kp-0005LV-BV for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:16 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507a55302e0so3226721e87.0 for ; Fri, 03 Nov 2023 13:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699041600; x=1699646400; 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=BFMvrord6ftw6meFXnjRr6xGn8w/+aIYxd+SGyvGmrM=; b=GrGJv7UITNHPg0ynahUsJ4rIAdwbeqhDZAhHY34+sKYX1xackDrYpqWoCsJxogAfcx hBXorNxP0/V5wWk1uQbz7h5DHzyUTZJSfgNwqXOMP9SD8tcVUJpNEwddibGJuO5YOFU+ vvw4WT/fstb7cl5wx39Zaze7zVXDQJVm1jCFzTs/fZ7kAPwlgDBnBSJQNvmYt23rIY8M kpJhqi2vsyX8ACMSF1pIepNbLV5tvkzTsds9/m+1rWuu60hmJVcaDL4CqSeM97G9SGgx JXwf7CGmdKoyfgNXHwd/3runu/4cgJ5u8IJkhtXmyS6+GiHveYI6BNFpR5owfatksiYX yFhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699041600; x=1699646400; 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=BFMvrord6ftw6meFXnjRr6xGn8w/+aIYxd+SGyvGmrM=; b=hWEJJ40gpMZ6fae5Oj03HzcBgYhUl7B56UaM0VGcJBiLUiO095rD+JnWJZyJrqCDil dbgo7fssMgeeiSRF+eMtrIhk+fYeXgtoF5RpAil6Rl49svstOMweAkxKco9lym+kIrYK EdoUtRYYUPWnNhnU//34maA9t90JlLNb4LtH+SLJk4CNZTkBzUh8QT/JhA98Rg7Eb6Rp HQj/m4eU5hytQL9dZJbFsxw5cTdTjntMunUybNxtHCn/3A+aND34JUKPbPeWOtGXVzGr kD/Me+LBZWXtkRUgJJStmD2IPe5NBuzZaVDY4aD++4aodIPmfFsFBAbiga/WZTdZ4a/5 zskg== X-Gm-Message-State: AOJu0YxWp7xz37PAPDBitjGhzMSNPayF1mAUgdsqT09SvIlbKAd0TDgx R4WX5ItVCGYZqEcHp52kTkweBw== X-Received: by 2002:a05:6512:969:b0:509:377a:26d9 with SMTP id v9-20020a056512096900b00509377a26d9mr7454336lft.8.1699041600653; Fri, 03 Nov 2023 13:00:00 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p12-20020adfe60c000000b0032d886039easm2608269wrm.14.2023.11.03.12.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 12:59:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1004665743; Fri, 3 Nov 2023 19:59:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , "Edgar E. Iglesias" , Song Gao , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Wainer dos Santos Moschetta , Weiwei Li , Marcel Apfelbaum , Ilya Leoshkevich , Daniel Henrique Barboza , Yanan Wang , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Paolo Bonzini , David Hildenbrand , Brian Cain , qemu-ppc@nongnu.org, Palmer Dabbelt , qemu-riscv@nongnu.org, Eduardo Habkost , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Alistair Francis , Liu Zhiwei , Cleber Rosa , qemu-s390x@nongnu.org, Laurent Vivier , Yoshinori Sato , Nicholas Piggin , Thomas Huth , John Snow , Alexandre Iooss , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Mahmoud Mandour , Daniel Henrique Barboza , Bin Meng , Beraldo Leal , Richard Henderson , Michael Rolnik Subject: [PATCH 04/29] target/arm: hide all versions of DBGD[RS]AR from gdbstub Date: Fri, 3 Nov 2023 19:59:31 +0000 Message-Id: <20231103195956.1998255-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231103195956.1998255-1-alex.bennee@linaro.org> References: <20231103195956.1998255-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x130.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, 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. Signed-off-by: Alex Bennée --- target/arm/debug_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 79a3659c0c..dc783adba5 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,9 @@ 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,