From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6917AC433F5 for ; Thu, 6 Jan 2022 19:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243378AbiAFTfA (ORCPT ); Thu, 6 Jan 2022 14:35:00 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:58322 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243375AbiAFTfA (ORCPT ); Thu, 6 Jan 2022 14:35:00 -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 EECA0B82354 for ; Thu, 6 Jan 2022 19:34:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4893C36AEB; Thu, 6 Jan 2022 19:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641497697; bh=2aGQymYqTmaWkfPiI1bX2V0qCtNAHECJTgwZi07GMh4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nNqWwlQz7WxKUjta1Ykq0eI8sEc++6Jqr+uYZoLWH/ihFTz5769u27qEayjrljlwg iCceiLkfcJaKgAquR2xCCxnuAVoLUwlAPT+zHBVg6ager2MCsNX9QrWfyboVk6Q1xF R3d5N8coVxtVq+K08l8caIbA2CthNSKgOgKnGpKwE6RbPg2afP1SGogRJEwxrgRZA9 SqzeVwH+cTGHcYtdP/VqF+4ZdQiZNGRQQwhU/5M/vjMcLjdk4PXs4NjMfoVnzxAbhY 7bEtGUhk06KyHFtumXa70vTUixrIMnNVaDyFBq0upOX8QiMLthnyhnkUtdGBQcSYHu bn0dquxsEqIqA== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) 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 1n5YXH-00GQ5m-TC; Thu, 06 Jan 2022 19:34:56 +0000 Date: Thu, 06 Jan 2022 19:34:57 +0000 Message-ID: <8735m0zmhq.wl-maz@kernel.org> From: Marc Zyngier To: eric.auger@redhat.com Cc: qemu-devel@nongnu.org, Andrew Jones , Peter Maydell , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam In-Reply-To: References: <20211003164605.3116450-1-maz@kernel.org> <20211003164605.3116450-2-maz@kernel.org> <87pmpiyrfw.wl-maz@kernel.org> <877dbfywpj.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: eric.auger@redhat.com, qemu-devel@nongnu.org, drjones@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 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Eric, On Wed, 05 Jan 2022 09:41:19 +0000, Eric Auger wrote: > > couldn't you simply introduce highmem_redist which is truly missing. You > could set it in virt_set_memmap() in case you skip extended_map overlay > and use it in virt_gicv3_redist_region_count() as you did? > In addition to the device memory top address check against the 4GB limit > if !highmem, we should be fine then? No, highmem really isn't nearly enough. Imagine you have (like I do) a system with 36 bits of IPA space. Create a VM with 8GB of RAM (which means the low-end of IPA space is already 9GB). Obviously, highmem=true here. With the current code, we will try to expose this PCI MMIO range, which falls way out of the IPA space (you need at least 40 bits of IPA to even cover it with the smallest configuration). highmem really is a control that says 'things may live above 4GB'. It doesn't say *how far* above 4GB it can be placed. Which is what I am trying to address. Thanks, M. -- Without deviation from the norm, progress is not possible.