From patchwork Thu Nov 24 03:38:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changbin Du X-Patchwork-Id: 13053776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 531EFC4332F for ; Wed, 23 Nov 2022 15:02:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxrGW-000513-VL; Wed, 23 Nov 2022 10:02:21 -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 1oxo5C-00027T-Al; Wed, 23 Nov 2022 06:38:26 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxo59-0003SP-DF; Wed, 23 Nov 2022 06:38:25 -0500 Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NHJtW1lRCzXdYd; Wed, 23 Nov 2022 19:34:11 +0800 (CST) Received: from M910t (10.110.54.157) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 23 Nov 2022 19:38:05 +0800 Date: Thu, 24 Nov 2022 11:38:02 +0800 To: Richard Henderson , Peter Maydell CC: , , liyang , Hui Wang Subject: arm: gdb-stub is broken by FEAT_HAFDBS Message-ID: <20221124033802.meuiphlcskwu3aty@M910t> MIME-Version: 1.0 Content-Disposition: inline X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.187; envelope-from=changbin.du@huawei.com; helo=szxga01-in.huawei.com X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DATE_IN_FUTURE_12_24=3.199, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 23 Nov 2022 10:02:15 -0500 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: , Reply-to: Changbin Du X-Patchwork-Original-From: Changbin Du via From: Changbin Du Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hello, Richard, We just noticed the gdb-stub is broken and probably caused by commit 4a3585568 ("target/arm: Plumb debug into S1Translate"). (gdb) target remote :1234 Remote debugging using :1234 0x000000000e1716d0 in ?? () => 0x000000000e1716d0: Cannot access memory at address 0xe1716d0 This issue can be workaround by below change. --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -2879,7 +2879,7 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr, S1Translate ptw = { .in_mmu_idx = arm_mmu_idx(env), .in_secure = arm_is_secure(env), - .in_debug = true, + .in_debug = false, }; Could you take a look at this? Thank you!