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 12F7FC433FE for ; Sat, 29 Oct 2022 11:31:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ook2W-0000e7-9C; Sat, 29 Oct 2022 07:30:12 -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 1ook2U-0000bY-FJ; Sat, 29 Oct 2022 07:30:10 -0400 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ook2S-0007SS-9a; Sat, 29 Oct 2022 07:30:10 -0400 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 C521E60DCA; Sat, 29 Oct 2022 11:29:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 344E1C433D6; Sat, 29 Oct 2022 11:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667042997; bh=XaaXucIqrFcMt8iGR/2sU2f7hIaJDxFhg6GoHL8zeN4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uXVPehP8YQLtgru0Y9K6ToCnJA7AA25DYxmgU619BEi1+qv9jxKxbMv3NoXl7wzZY WUYuFWpvxK3gJVpmhQt1N5553gfAlMyaj7R7tZJA5efSt5792bU1ULqD8ou0Pm9PI4 xnrLwgwj25BOH8kX1k/xaL/Vg4IWUxRDWobCsKyHGlGmajkzx/1CsxmzBRyWTnmTy4 RC1eM00L4q/Pg7ClEgOq0MIH+zGQoqkuVzUAmTr2oa7uXdwesulmCj3GiQ/sQXSFIi zjLoSdiQIeEdsZ/ks/1gQ+hww0Q5pIAWuUG49roFKggxsE9vOzeWwDCAHLnWZcjK5e j37QntisnCQlw== 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.95) (envelope-from ) id 1ook2E-002Rfn-QX; Sat, 29 Oct 2022 12:29:54 +0100 Date: Sat, 29 Oct 2022 12:29:19 +0100 Message-ID: <874jvmhnqo.wl-maz@kernel.org> From: Marc Zyngier To: Gavin Shan Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, eric.auger@redhat.com, cohuck@redhat.com, zhenyzha@redhat.com, richard.henderson@linaro.org, peter.maydell@linaro.org, shan.gavin@gmail.com Subject: Re: [PATCH v6 0/7] hw/arm/virt: Improve address assignment for high memory regions In-Reply-To: References: <20221024035416.34068-1-gshan@redhat.com> 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: gshan@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, eric.auger@redhat.com, cohuck@redhat.com, zhenyzha@redhat.com, richard.henderson@linaro.org, peter.maydell@linaro.org, shan.gavin@gmail.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 client-ip=2604:1380:4641:c500::1; envelope-from=maz@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -75 X-Spam_score: -7.6 X-Spam_bar: ------- X-Spam_report: (-7.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.516, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Wed, 26 Oct 2022 01:29:56 +0100, Gavin Shan wrote: > > Hi Peter and Marc, > > On 10/24/22 11:54 AM, Gavin Shan wrote: > > There are three high memory regions, which are VIRT_HIGH_REDIST2, > > VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses > > are floating on highest RAM address. However, they can be disabled > > in several cases. > > > > (1) One specific high memory region is disabled by developer by > > toggling vms->highmem_{redists, ecam, mmio}. > > > > (2) VIRT_HIGH_PCIE_ECAM region is disabled on machine, which is > > 'virt-2.12' or ealier than it. > > > > (3) VIRT_HIGH_PCIE_ECAM region is disabled when firmware is loaded > > on 32-bits system. > > > > (4) One specific high memory region is disabled when it breaks the > > PA space limit. > > > > The current implementation of virt_set_memmap() isn't comprehensive > > because the space for one specific high memory region is always > > reserved from the PA space for case (1), (2) and (3). In the code, > > 'base' and 'vms->highest_gpa' are always increased for those three > > cases. It's unnecessary since the assigned space of the disabled > > high memory region won't be used afterwards. > > > > The series intends to improve the address assignment for these > > high memory regions and introduces new properties for user to > > selectively disable those 3 high memory regions. > > > > PATCH[1-4] preparatory work for the improvment > > PATCH[5] improve high memory region address assignment > > PATCH[6] adds 'compact-highmem' to enable or disable the optimization > > PATCH[7] adds properties so that high memory regions can be disabled > > > > v5: https://lists.nongnu.org/archive/html/qemu-arm/2022-10/msg00280.html > > v4: https://lists.nongnu.org/archive/html/qemu-arm/2022-10/msg00067.html > > v3: https://lists.nongnu.org/archive/html/qemu-arm/2022-09/msg00258.html > > v2: https://lore.kernel.org/all/20220815062958.100366-1-gshan@redhat.com/T/ > > v1: https://lists.nongnu.org/archive/html/qemu-arm/2022-08/msg00013.html > > > > Could you help to take a look when getting a chance? I think Connie and > Eric are close to complete the reviews, but v7 is still needed to address > extra comments from them. I hope to make v7 mergeable if possible :) With the comments from Connie and Eric addressed, this looks good to me: Reviewed-by: Marc Zyngier Thanks for having gone the extra mile on this one. M. -- Without deviation from the norm, progress is not possible.