From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:906:43c7:b0:78d:9f02:16a1 with SMTP id j7csp1953264ejn; Sat, 29 Oct 2022 04:30:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59xDaea4Qh1dkDZ8SoIEtsjC466dyP+e+7yIbzxoxpeLNy3/yGvhRt8O3Zay1VIutnNV7p X-Received: by 2002:a05:6214:1cc2:b0:4af:891b:4e75 with SMTP id g2-20020a0562141cc200b004af891b4e75mr3135674qvd.30.1667043032377; Sat, 29 Oct 2022 04:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667043032; cv=none; d=google.com; s=arc-20160816; b=cXyQaGCerbSL2B7Cmf+eZtWJcr278Y9qtUxssSfqesn8BG6mitRdQR+GSb9aBHgdQ4 nOGSC8EEfZF9e71omdMtgYtoRg7Ej6u1UTOpeOibclwjExl6nLO62YRYo/enVKctoqv2 vI4w4OmIfvu5+tz1nJ9DnXkrPAmrrEDkk5zl/84M/25PzHx+GW/JHw5CdGsCouitXuKO dnyHavUJHmdB2e5SQGAHfg1WMkTKIZbvQd23cm7GibS/dyeiCWXDq6QnHI7aLGfxh/dm 0Kkd7S5cj5iH1z7YmrsEaCBWdSps9m4ryc8e0zBdgjgYTXpX7dhp416LQCYlMCh5I7OT Mzcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date :dkim-signature; bh=sJK9/lsU6dI02idKEHhpIA98LhAf32lO5j+r5nG2rBA=; b=x2Xf0qUcZA02iiGBkRu4fA0vWvmC5nSlgM3i0/5IxXLExwpPBdeJwM3gdgcun06m9l MLWfHNcgzBkzVoppQiB4viQEqvsv+xPqwWEFdX8PgiyEJlKW9xKwiD/hAuhnCS9pjY2/ Wwmd3zRNObF4wsUiivNrdwSQcj64pfnxl/m2LuZY4kV2XWBH1lrhAl8S4jkaA0WagucP TL4g+xDDpSKvbPOSJLBIXILGmXbnfJPum9P+oirpNOGDgwkAHzdRqf6WqbmZUQ5WgJ5G Ap67uLOVlgsnC5q2ijp/y2A7nl9eBP1pC5vluYDkOyfw37P0+djMVIz5WqpC0Tu5LI3R 7+8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uXVPehP8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jf13-20020a0562142a4d00b004b13396ceeasi681320qvb.299.2022.10.29.04.30.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Oct 2022 04:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uXVPehP8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ook2V-0000cY-U3; Sat, 29 Oct 2022 07:30:11 -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-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-arm" Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: A0KDLaAiRsju 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.