From nobody Tue Oct 7 20:20:13 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=pass header.i=@amazon.de; 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=quarantine dis=none) header.from=amazon.de ARC-Seal: i=1; a=rsa-sha256; t=1576076847; cv=none; d=zohomail.com; s=zohoarc; b=WglALs9zTDM2VmRaiUoeJpyuM8Sw1dUdvHKiqjwhyxLN59A6Yfgr8SA8WKRW0GM+ptoVWx2EnnF9sydmQEDamytVWvIMbyMNUaNlW93YohH+UHIWJJkUrYvd4DupkaZvbK7uP3zeWZcpuUnCIzdJg8T+N32TW1FumtbDE5wLW48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576076847; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=mVMZNzfGgCZy2rnEt7SIpbodq72YKWuf3Om7HpAHf2g=; b=P5bAW15iWPrOtybuSsiPNFSRagnGTXLQzzrr8DmusS+DRlFzl+8HaZ+dIk+7HvTFWxUYW737D1vcyyA7WNoOxxaFnr7idUYmY/VZrOWX6ChGpIRJGuaLsDuJxR/x0YyOyLQbFW9vT6r7XECypR2/MrbuMNn+/0QqJnu0tqlCpaM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@amazon.de; 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=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576076847738135.09237574786437; Wed, 11 Dec 2019 07:07:27 -0800 (PST) Received: from localhost ([::1]:43864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1if3aI-0001cM-IC for importer@patchew.org; Wed, 11 Dec 2019 10:07:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1if3ZH-0000hj-Br for qemu-devel@nongnu.org; Wed, 11 Dec 2019 10:06:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1if3ZG-00020y-9i for qemu-devel@nongnu.org; Wed, 11 Dec 2019 10:06:23 -0500 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:44717) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1if3ZE-0001vm-3L; Wed, 11 Dec 2019 10:06:20 -0500 Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 11 Dec 2019 15:06:18 +0000 Received: from sveith-desktop.aka.corp.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com (Postfix) with ESMTPS id 1FFECA25EA; Wed, 11 Dec 2019 15:06:15 +0000 (UTC) Received: from sveith-desktop.aka.corp.amazon.com (localhost [127.0.0.1]) by sveith-desktop.aka.corp.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id xBBF6Ce7024283; Wed, 11 Dec 2019 16:06:12 +0100 Received: (from sveith@localhost) by sveith-desktop.aka.corp.amazon.com (8.15.2/8.15.2/Submit) id xBBF6B5B024260; Wed, 11 Dec 2019 16:06:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1576076780; x=1607612780; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=mVMZNzfGgCZy2rnEt7SIpbodq72YKWuf3Om7HpAHf2g=; b=gTi1E7VRURq/8F+m3ObZxnpdUDHC2/IfhGJ5AoFwdjT0IPcAMfN/Egxr qO9XG7oNgAEC+4qkurtVIE9nptg8FwY/R5mpJKyMl+BffRoaQ+x+lXTxh EwCxXcfgfITGMmyKXK0i6tXN9+RcNVm2U3wNK42U59XEqLiqEYQyVDetl M=; IronPort-SDR: p7UU1YkJwIQ3WP4vdsajOaU54IkE1Csl31l9DnNCzg2gx+MXCq9C6N9DoLk3l3ixomBy+QJ6c8 61zJL+IGrd6w== X-IronPort-AV: E=Sophos;i="5.69,301,1571702400"; d="scan'208";a="8108820" From: Simon Veith To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Simon Veith , Eric Auger Subject: [PATCH v2 2/6] hw/arm/smmuv3: Correct SMMU_BASE_ADDR_MASK value Date: Wed, 11 Dec 2019 16:05:39 +0100 Message-Id: <1576076739-23708-1-git-send-email-sveith@amazon.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576076260-18659-1-git-send-email-sveith@amazon.de> References: <1576076260-18659-1-git-send-email-sveith@amazon.de> Precedence: Bulk X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 72.21.196.25 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @amazon.de) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There are two issues with the current value of SMMU_BASE_ADDR_MASK: - At the lower end, we are clearing bits [4:0]. Per the SMMUv3 spec, we should also be treating bit 5 as zero in the base address. - At the upper end, we are clearing bits [63:48]. Per the SMMUv3 spec, only bits [63:52] must be explicitly treated as zero. Update the SMMU_BASE_ADDR_MASK value to mask out bits [63:52] and [5:0]. ref. ARM IHI 0070C, section 6.3.23. Signed-off-by: Simon Veith Cc: Eric Auger Cc: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org --- hw/arm/smmuv3-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h index d190181..042b435 100644 --- a/hw/arm/smmuv3-internal.h +++ b/hw/arm/smmuv3-internal.h @@ -99,7 +99,7 @@ REG32(GERROR_IRQ_CFG2, 0x74) =20 #define A_STRTAB_BASE 0x80 /* 64b */ =20 -#define SMMU_BASE_ADDR_MASK 0xffffffffffe0 +#define SMMU_BASE_ADDR_MASK 0xfffffffffffc0 =20 REG32(STRTAB_BASE_CFG, 0x88) FIELD(STRTAB_BASE_CFG, FMT, 16, 2) --=20 2.7.4