From nobody Wed Oct 23 01:37:21 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=yeah.net ARC-Seal: i=1; a=rsa-sha256; t=1728300372; cv=none; d=zohomail.com; s=zohoarc; b=MK2TOwqIAgbRutilkzPHyearQ5Yu+yUrKYTUix/uPSd+KOxqki/VrgaKcV12kXmNgetAJX1E5GA0OYp/n4TNTzV41aHXQHQJ62i0NCLYIw4PLxaNETEOfsc+G12m7Yzltx15pZPVtLuqpBokmhRuNyFIpxJXH6lqooZAaaHCOVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728300372; h=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=QHbPalvgpRBsIV4AzKxJkAd/59RTOeVHtbo41YQVKiY=; b=fjbUK17hBGzyie6iccX8QzBT16gpy/srqTgAfo9Aa3Sg6iR6oMjHuUvvzx3vY6H4zDYMACXGVV64nsAnLYnJ6EIiDI/3jvi1RKSPfSE2oevxaYGx1xi3UNXyHiL579Vug9fIuUkURgRy9GX0OEkRb3HEuZNbxoZetpNrvMmm2Bo= 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 1728300372438394.3544011040159; Mon, 7 Oct 2024 04:26:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxls9-0007Mu-3W; Mon, 07 Oct 2024 07:25:53 -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 1sxls2-0007MY-PN for qemu-devel@nongnu.org; Mon, 07 Oct 2024 07:25:46 -0400 Received: from mail-m16.yeah.net ([220.197.32.17]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxls0-0001BJ-Pg for qemu-devel@nongnu.org; Mon, 07 Oct 2024 07:25:46 -0400 Received: from localhost.localdomain (unknown []) by gzsmtp3 (Coremail) with SMTP id M88vCgAnSOcMxQNnGGjGAQ--.32547S5; Mon, 07 Oct 2024 19:25:01 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=QHbPa lvgpRBsIV4AzKxJkAd/59RTOeVHtbo41YQVKiY=; b=F1cZIgRuKCtf+GQyG/J7v N3Q1kFXcNCq02DmbVD8ZQPNk9SbFOuI3ysjqv+I9WxwG89DGDEiXbVBQTHQDq9eu 4fpKcjZTQtRUXcPOZW0UjzTbLh6+Okb0L6ugHr0JF6jsltyBQseKfkB+rufrTPfA J38dWu90g9DO+amBYeu19M= From: Chao Liu To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, bin.meng@windriver.com, edgar.iglesias@gmail.com, alistair@alistair23.me, Chao Liu Subject: [PATCH v4 3/3] xilink-zynq-devcfg: Avoid disabling devcfg memory region during initialization Date: Mon, 7 Oct 2024 19:24:55 +0800 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: M88vCgAnSOcMxQNnGGjGAQ--.32547S5 X-Coremail-Antispam: 1Uf129KBjvdXoWrKw1xZFW8GrW8tw43GFWkXrb_yoWktrg_Ca yFkF93ursxAw1Syas0yr1qyryfuw4vvr10gFn7t3s3tFyUWrsxGrsYy3ZYqw1kX3y5Arsx Za4jkFnxAa13ujkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU87l1PUUUUU== X-Originating-IP: [112.19.146.115] X-CM-SenderInfo: pfkd0hxolxq5hhdkh0dhw/1tbiERNxKGcDw+gCUgAAsE 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=220.197.32.17; envelope-from=chao.liu@yeah.net; helo=mail-m16.yeah.net 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yeah.net) X-ZM-MESSAGEID: 1728300373568116600 Content-Type: text/plain; charset="utf-8" During the initialization phase, we've encountered an issue where the UNLOCK register is inadvertently cleared. This results in devcfg MR being disabled, which in turn leads to unexpected memory access exceptions when attempting subsequent accesses to the devcfg register. This behavior is not consistent with the hardware specifications. This bug was not found earlier because the ignore_memory_transaction_failur= es flag was enabled, which ignored exceptions from devcfg devices when access was disabled. Signed-off-by: Chao Liu --- hw/dma/xlnx-zynq-devcfg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/dma/xlnx-zynq-devcfg.c b/hw/dma/xlnx-zynq-devcfg.c index e5eff9abc0..af8cc72471 100644 --- a/hw/dma/xlnx-zynq-devcfg.c +++ b/hw/dma/xlnx-zynq-devcfg.c @@ -144,7 +144,12 @@ static void xlnx_zynq_devcfg_reset(DeviceState *dev) int i; =20 for (i =3D 0; i < XLNX_ZYNQ_DEVCFG_R_MAX; ++i) { - register_reset(&s->regs_info[i]); + if (s->regs_info[i].access) { + if (s->regs_info[i].access->addr =3D=3D A_UNLOCK) { + continue; + } + register_reset(&s->regs_info[i]); + } } } =20 --=20 2.46.1