From nobody Sun Feb 8 20:34:20 2026 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=fail(p=none dis=none) header.from=kernel.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1640639936552457.6053414234676; Mon, 27 Dec 2021 13:18:56 -0800 (PST) Received: from localhost ([::1]:44872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1xOR-000801-Tg for importer@patchew.org; Mon, 27 Dec 2021 16:18:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1xMk-0005IK-Eb for qemu-devel@nongnu.org; Mon, 27 Dec 2021 16:17:10 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:53084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1xMi-0002Wr-No for qemu-devel@nongnu.org; Mon, 27 Dec 2021 16:17:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 365F4B8115E; Mon, 27 Dec 2021 21:17:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 099C7C36AEF; Mon, 27 Dec 2021 21:17:06 +0000 (UTC) Received: from cfbb000407.r.cam.camfibre.uk ([185.219.108.64] helo=hot-poop.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n1xMe-00Ed4b-4O; Mon, 27 Dec 2021 21:17:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640639826; bh=8jnTIlm8Zob2Jvux6Qz42yjEvf+iD+5kMVUVUXnj1ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q56PjvJIBDPFg9k+R/s7jSrr+hm/vcoXAPHyqveK2tK+tOZF4My4oU+D3fGM2JOxU jUyQuacheThXBYwn3eKWIod4ntDY14Wqy54ieL8EK13vzrkXe9cxeVE+3iqJ6wlF+P MCr6gHk23XNFjs9wBL2Dv4S3Q3SEivjB8rhtlQDulEstMsWTBCbMLP2ioAn+KVO/M2 MYkOkzZD9ErsRWPfHGTPf8XcjoN/ogqYYUn/1x5TC0ekcNH/+6pPNrfl7X1dfCkS5o pDjuRmdzJpo27+OhxuYyYIFX/QTh+2+A5kVU+c+xJvX3CY8acZwo3iMSStu7WlhKgZ zPRSTJhcPlu0Q== From: Marc Zyngier To: qemu-devel@nongnu.org Subject: [PATCH v3 5/5] hw/arm/virt: Disable highmem devices that don't fit in the PA range Date: Mon, 27 Dec 2021 21:16:42 +0000 Message-Id: <20211227211642.994461-6-maz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211227211642.994461-1-maz@kernel.org> References: <20211227211642.994461-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: qemu-devel@nongnu.org, drjones@redhat.com, eric.auger@redhat.com, peter.maydell@linaro.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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=145.40.68.75; envelope-from=maz@kernel.org; helo=ams.source.kernel.org X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.575, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=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: , Cc: Peter Maydell , Andrew Jones , kvm@vger.kernel.org, Eric Auger , kernel-team@android.com, kvmarm@lists.cs.columbia.edu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1640639938044000001 Content-Type: text/plain; charset="utf-8" Make sure both the highmem PCIe and GICv3 regions are disabled when they don't fully fit in the PA range. Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier --- hw/arm/virt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 212079e7a6..18e615070f 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1723,6 +1723,9 @@ static void virt_set_memmap(VirtMachineState *vms, in= t pa_bits) if (base <=3D BIT_ULL(pa_bits)) { vms->highest_gpa =3D base - 1; } else { + /* Advertise that we have disabled the highmem devices */ + vms->highmem_ecam =3D false; + vms->highmem_redists =3D false; vms->highest_gpa =3D memtop - 1; } =20 --=20 2.30.2