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. 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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53F86C433EF for ; Thu, 6 Jan 2022 19:35:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id DDE7349ECD; Thu, 6 Jan 2022 14:35:02 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LfILZj6j5254; Thu, 6 Jan 2022 14:35:01 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id DCB9A49F01; Thu, 6 Jan 2022 14:35:01 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8A77C49ECD for ; Thu, 6 Jan 2022 14:35:00 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vBBCQ4t10tpD for ; Thu, 6 Jan 2022 14:34:59 -0500 (EST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 50AF649EAB for ; Thu, 6 Jan 2022 14:34:59 -0500 (EST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 5ABD961D26; 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 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") 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 Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38F84C433EF for ; Thu, 6 Jan 2022 19:38:29 +0000 (UTC) Received: from localhost ([::1]:42338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5Yai-0006vq-3c for qemu-devel@archiver.kernel.org; Thu, 06 Jan 2022 14:38:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5YXS-0005AF-7a for qemu-devel@nongnu.org; Thu, 06 Jan 2022 14:35:06 -0500 Received: from [2604:1380:4641:c500::1] (port=46816 helo=dfw.source.kernel.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5YXP-0003rQ-5k for qemu-devel@nongnu.org; Thu, 06 Jan 2022 14:35:05 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5ABD961D26; 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 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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2604:1380:4641:c500::1 (failed) Received-SPF: pass client-ip=2604:1380:4641:c500::1; envelope-from=maz@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.372, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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, qemu-devel@nongnu.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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.