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.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 78D8FC83013 for ; Wed, 2 Jul 2025 08:45:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1030749.1404408 (Exim 4.92) (envelope-from ) id 1uWt5c-0006V2-98; Wed, 02 Jul 2025 08:45:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1030749.1404408; Wed, 02 Jul 2025 08:45:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uWt5c-0006Uv-66; Wed, 02 Jul 2025 08:45:12 +0000 Received: by outflank-mailman (input) for mailman id 1030749; Wed, 02 Jul 2025 08:45:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uWt5b-0006Up-4R for xen-devel@lists.xenproject.org; Wed, 02 Jul 2025 08:45:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1uWt5X-00EdKP-1I; Wed, 02 Jul 2025 08:45:07 +0000 Received: from [2a02:8012:3a1:0:694b:6608:aaf6:1a4c] by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uWt5X-007Xzb-0W; Wed, 02 Jul 2025 08:45:07 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=tYvMN78O5awv87mBc9KA8WtaDMxXQM5Oow7bybyxPFI=; b=3pA7OhJGesP0dpFQ5JF23I15/U aH9jz69NVrCdFgtD6BfmQYEARvvhGdBoqaAog9A/jqV0N5UitftNFTloox9R4yposn/vqo4sLSECr L7LvyqKHKDksGUI1eM8Vd+Ekd5eeK13uVLfs7CmB1huYr1OF0FYctDbPkTrcIQQsNVJk=; Message-ID: <9d0bed39-4ec5-4b7c-977d-69c4cfe2f043@xen.org> Date: Wed, 2 Jul 2025 09:45:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/8] pdx: introduce a new compression algorithm To: "Orzel, Michal" , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini Cc: Jan Beulich , xen-devel@lists.xenproject.org, Andrew Cooper , Anthony PERARD , Bertrand Marquis , Volodymyr Babchuk , Shawn Anastasio , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , Community Manager References: <20250620111130.29057-1-roger.pau@citrix.com> <1507b441-dd3c-4a24-beda-0d1d3143faf9@suse.com> <0807cdba-b0bb-42a7-a18d-407ab818709a@amd.com> Content-Language: en-US From: Julien Grall In-Reply-To: <0807cdba-b0bb-42a7-a18d-407ab818709a@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michal, On 02/07/2025 08:52, Orzel, Michal wrote: > We have a few issues on Arm. First, we don't check whether direct map is big > enough provided max_pdx that we don't set at all. Second, we don't really use > PDX grouping (can be also used without compression). My patch (that Stefano > attached previously) fixes the second issue (Allejandro will take it over to > come up with common solution). For the first issue, we need to know max_page (at > the moment we calculate it in setup_mm() at the very end but we could do it in > init_pdx() to know it ahead of setting direct map) and PDX offset (on x86 there > is no offset). I also think that on Arm we should just panic if direct map is > too small. > > The issue can be reproduced by disabling PDX compression, so not only with > Roger's patch. > > @Julien, I'm thinking of something like this: The change below look good to me. Cheers, -- Julien Grall