From nobody Wed Nov 27 11:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699296826; cv=none; d=zohomail.com; s=zohoarc; b=b3ah4XdO6Fwy8/0Pj5UQyxCuRlAi5aGsbzc/ZfbKV/JmZzsr7bZk3KPJwKmc8eIu6otbQCoSrW39PS7O+CZ0PkYy0r7Q4c/SEAgZmJ54cdvIWrCXlx3e5QlFez1uPOrX6dDyXen2tpTB7nTodsSI4UKOyk7SQSJdwZ5R1Om6VkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699296826; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dhApO9Ay6WkoDHQaLzRIOYtnAoxR05P4kp/hfwO/YNE=; b=JtmOs70CBo5RtjzxSNcUsBC5FIL0Iu/iK/6StjUYjmzWk4R6OwN+MFM/MikZvM7EGFHvttFayucKirnQKuLedNm63j0rFd7noHiz5qQbS3wlb2mdA+4LhDN1AqIuFRbC3hFphLx4HnlGykItHRCIXJI1ficOawG412OHETzZWjs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699296826396320.8400168545978; Mon, 6 Nov 2023 10:53:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r04hC-0006E3-Gk; Mon, 06 Nov 2023 13:51:34 -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 1r04h9-0006A8-8Q for qemu-devel@nongnu.org; Mon, 06 Nov 2023 13:51:31 -0500 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r04gv-0000xH-4o for qemu-devel@nongnu.org; Mon, 06 Nov 2023 13:51:30 -0500 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-507cee17b00so6163711e87.2 for ; Mon, 06 Nov 2023 10:51:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k25-20020a05600c1c9900b004067e905f44sm13340971wms.9.2023.11.06.10.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 10:51:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D242B6573E; Mon, 6 Nov 2023 18:51:12 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699296675; x=1699901475; 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=dhApO9Ay6WkoDHQaLzRIOYtnAoxR05P4kp/hfwO/YNE=; b=hrnQfoD34u/csHZiPLQ3JbqSd7sZu6G+wxUH9dUBmVVjE26qnrn+nP5+eUTVUSbTFX /WEvXum9pa5lmHA4l8UKHoZ4L/msFmUywAQZV0TtLeFsFrELal60jpYYwlnAq5+xMeBX fKCg5i9KvzI65rJ1MU5OA9LZr3oeP0NU0jLkT8GrF4BGJA0ZlhkUANH3W5rskLq7JhKj 1nqlUFMU/LU6T+hfTHrPC5djh/CDX+vkl6lRImz5nzdmOLee6sXOi3VYHg8+/hwE6YhC xG6DHM0WmNBgMVliCchgSZFcIojiXabPzKx9+SjdX/p2u1gHR0bZLN5+0ZFDEQVuKmGm 3R9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699296675; x=1699901475; 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=dhApO9Ay6WkoDHQaLzRIOYtnAoxR05P4kp/hfwO/YNE=; b=DChB1M45WXsG51DXNjl56R8ELGzLJSx6DeWyMD5J9pBQE26KtMTPshmwywRqK8XIQ/ nDpE48N8WP/RhEJF1vQ2wM2as9vT6IyI9lVnYvtfQ5/mp3iFTUw7kHFPRAoYEdt4qvcX GewEjaHOAStKffGhSNLDluwj2bs4g69jZ1uV1/xHur4ojL7mJ3uS7Mo/vOsTQHXBfsSr XP/CTEB4OR1j+S92yWcTvq9d5cBswck1dbhh4JwnLBqCKCuy1yBIZft8LfM4v/alnkUH sa7ZCPwkzyrwx70HUQsmhTIdLKo+Uiqg4PcgxGP/V7GHQRA09nsV/0W2Xvi46JPgabrA OLcw== X-Gm-Message-State: AOJu0Yz/FmnmKNyogjmhixC8MQL8r2n1oETA7dHVy4lXscyHBkAvE6Hr sYgyFP6Vb6jU/eT0i+vN6D5MCQ== X-Google-Smtp-Source: AGHT+IFferl/m3ntvivL3nECOQrneQWjFFcDEK+j7HRzQDtYHoFWSctR9SfGs6QB6mQulGvb2QBjGA== X-Received: by 2002:ac2:5634:0:b0:507:aaab:528c with SMTP id b20-20020ac25634000000b00507aaab528cmr21547700lff.69.1699296675383; Mon, 06 Nov 2023 10:51:15 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mahmoud Mandour , Cleber Rosa , Wainer dos Santos Moschetta , Paolo Bonzini , Thomas Huth , Beraldo Leal , Alexandre Iooss , John Snow , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Chris Wulff , Marek Vasut , Richard Henderson Subject: [PATCH 04/22] target/arm: hide all versions of DBGD[RS]AR from gdbstub Date: Mon, 6 Nov 2023 18:50:54 +0000 Message-Id: <20231106185112.2755262-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231106185112.2755262-1-alex.bennee@linaro.org> References: <20231106185112.2755262-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699296826801100001 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=C3=A9e Message-Id: <20231103195956.1998255-5-alex.bennee@linaro.org> Acked-by: Richard Henderson --- 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[] =3D { */ { .name =3D "DBGDRAR", .cp =3D 14, .crn =3D 1, .crm =3D 0, .opc1 =3D 0= , .opc2 =3D 0, .access =3D PL0_R, .accessfn =3D access_tdra, - .type =3D ARM_CP_CONST, .resetvalue =3D 0 }, + .type =3D ARM_CP_CONST | ARM_CP_NO_GDB, .resetvalue =3D 0 }, { .name =3D "MDRAR_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 2, .opc1 =3D 0, .crn =3D 1, .crm =3D 0, .opc2 =3D 0, .access =3D PL1_R, .accessfn =3D access_tdra, .type =3D ARM_CP_CONST, .resetvalue =3D 0 }, { .name =3D "DBGDSAR", .cp =3D 14, .crn =3D 2, .crm =3D 0, .opc1 =3D 0= , .opc2 =3D 0, .access =3D PL0_R, .accessfn =3D access_tdra, - .type =3D ARM_CP_CONST, .resetvalue =3D 0 }, + .type =3D ARM_CP_CONST | ARM_CP_NO_GDB, .resetvalue =3D 0 }, /* Monitor debug system control register; the 32-bit alias is DBGDSCRe= xt. */ { .name =3D "MDSCR_EL1", .state =3D ARM_CP_STATE_BOTH, .cp =3D 14, .opc0 =3D 2, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 = =3D 2, @@ -1065,9 +1065,9 @@ static const ARMCPRegInfo debug_cp_reginfo[] =3D { static const ARMCPRegInfo debug_lpae_cp_reginfo[] =3D { /* 64 bit access versions of the (dummy) debug registers */ { .name =3D "DBGDRAR", .cp =3D 14, .crm =3D 1, .opc1 =3D 0, - .access =3D PL0_R, .type =3D ARM_CP_CONST | ARM_CP_64BIT, .resetvalu= e =3D 0 }, + .access =3D PL0_R, .type =3D ARM_CP_CONST | ARM_CP_64BIT | ARM_CP_NO= _GDB, .resetvalue =3D 0 }, { .name =3D "DBGDSAR", .cp =3D 14, .crm =3D 2, .opc1 =3D 0, - .access =3D PL0_R, .type =3D ARM_CP_CONST | ARM_CP_64BIT, .resetvalu= e =3D 0 }, + .access =3D PL0_R, .type =3D ARM_CP_CONST | ARM_CP_64BIT | ARM_CP_NO= _GDB, .resetvalue =3D 0 }, }; =20 static void dbgwvr_write(CPUARMState *env, const ARMCPRegInfo *ri, --=20 2.39.2