From nobody Thu Oct 16 04:15:42 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1760534855; cv=none; d=zohomail.com; s=zohoarc; b=PIf+YHuNxBkl6qGfiNcdPLWr9DQ7WY9fXnI+/qjsDlsJy1W5Iscq8DqFm5BgoMnjWMlcl8H1a42TEfPRnc5yvYSiyi3spyFCATKO6MFLpmIDqu7n9VQvv/h92wRU6YrDn3ftJtftYjOgmCDcoC8ZpAdewX/kjnvyj5Qr3rxAA2I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760534855; 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:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=5LcEs5/uKS7ZFN3gFQLlAvY0at56ba6rqJ47ZazperE=; b=QB5ge0MhzjVQQuXjFzMm+LR6aztZ/OmPg4svkYqYVBZMk5GxnzyLQeCAo5m33n9Enj8S2nrZvIwvxp3+URf1wqEy8fIypoPKth66w8qn2ObEPWb0HK0jlgpgh1iT8OArTFx9dsw7W3BHNnD1FXgrYvU1gPINoj6Guu4k8py0b7A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 17605348553721018.1972350881763; Wed, 15 Oct 2025 06:27:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v91VM-0001aZ-86; Wed, 15 Oct 2025 09:25:24 -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 1v91VG-0001Wq-3Z for qemu-devel@nongnu.org; Wed, 15 Oct 2025 09:25:18 -0400 Received: from rev.ng ([94.130.142.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v91V7-0003T7-B0 for qemu-devel@nongnu.org; Wed, 15 Oct 2025 09:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Cc:To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive:List-Unsubscribe:List-Unsubscribe-Post: List-Help; bh=5LcEs5/uKS7ZFN3gFQLlAvY0at56ba6rqJ47ZazperE=; b=F8bRsTQi1CtQRQh KzNdOhAteyOr58PhZN6vbxBM6u/zXevotzlbnaSrWhL30eD8Uo1cpweaE0G/5g0goL5tRNWWglqe7 nRIIEGRTYxgBNvePINtlj6KiU2nRn0znOEjwhQggR5oB+Mv9iBFdrcrBrWy10UEKwOlqwQhB+rdgQ 5M=; Date: Wed, 15 Oct 2025 15:27:39 +0200 Subject: [PATCH 2/5] hw/riscv: Replace target_ulong uses MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251015-feature-single-binary-hw-v1-v1-2-8b416eda42cf@rev.ng> References: <20251015-feature-single-binary-hw-v1-v1-0-8b416eda42cf@rev.ng> In-Reply-To: <20251015-feature-single-binary-hw-v1-v1-0-8b416eda42cf@rev.ng> To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org, alistair.francis@wdc.com, richard.henderson@linaro.org, palmer@dabbelt.com 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=94.130.142.21; envelope-from=anjo@rev.ng; helo=rev.ng 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1760534857947158500 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/riscv/riscv-iommu.c | 5 +++-- hw/riscv/riscv_hart.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index b33c7fe325..450285a850 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -26,6 +26,7 @@ #include "migration/vmstate.h" #include "qapi/error.h" #include "qemu/timer.h" +#include "qemu/target-info.h" =20 #include "cpu_bits.h" #include "riscv-iommu.h" @@ -391,9 +392,9 @@ static int riscv_iommu_spa_fetch(RISCVIOMMUState *s, RI= SCVIOMMUContext *ctx, const uint64_t va_mask =3D (1ULL << va_len) - 1; =20 if (pass =3D=3D S_STAGE && va_len > 32) { - target_ulong mask, masked_msbs; + uint64_t mask, masked_msbs; =20 - mask =3D (1L << (TARGET_LONG_BITS - (va_len - 1))) - 1; + mask =3D (1L << (target_long_bits() - (va_len - 1))) - 1; masked_msbs =3D (addr >> (va_len - 1)) & mask; =20 if (masked_msbs !=3D 0 && masked_msbs !=3D mask) { diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c index c7e98a4308..65d2c92018 100644 --- a/hw/riscv/riscv_hart.c +++ b/hw/riscv/riscv_hart.c @@ -93,7 +93,7 @@ static bool csr_qtest_callback(CharBackend *chr, gchar **= words) g_assert(rc =3D=3D 0); csr_call(words[1], cpu, csr, &val); =20 - qtest_sendf(chr, "OK 0 "TARGET_FMT_lx"\n", (target_ulong)val); + qtest_sendf(chr, "OK 0 %"PRIx64"\n", val); =20 return true; } --=20 2.51.0