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 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33C47C432BE for ; Fri, 27 Aug 2021 20:35:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BAF8A60FD8 for ; Fri, 27 Aug 2021 20:35:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BAF8A60FD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.174019.317459 (Exim 4.92) (envelope-from ) id 1mJiYn-0000bI-2m; Fri, 27 Aug 2021 20:34:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 174019.317459; Fri, 27 Aug 2021 20:34:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mJiYm-0000bB-Un; Fri, 27 Aug 2021 20:34:44 +0000 Received: by outflank-mailman (input) for mailman id 174019; Fri, 27 Aug 2021 20:34:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mJiYm-0000b5-B2 for xen-devel@lists.xenproject.org; Fri, 27 Aug 2021 20:34:44 +0000 Received: from mail-lf1-x136.google.com (unknown [2a00:1450:4864:20::136]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c49fe0b7-ae3d-4464-be01-5f3c64d55405; Fri, 27 Aug 2021 20:34:43 +0000 (UTC) Received: by mail-lf1-x136.google.com with SMTP id c8so4263436lfi.3 for ; Fri, 27 Aug 2021 13:34:42 -0700 (PDT) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id u3sm773100lju.107.2021.08.27.13.34.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Aug 2021 13:34:41 -0700 (PDT) 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" X-Inumbo-ID: c49fe0b7-ae3d-4464-be01-5f3c64d55405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=GR1VzIgI95C7s5Zv9cazg0liNSpLP3B2iPo5pLuIroU=; b=veEVVCOJY+GKb6lNkdiXPgjrnDxjcRDj6PgfYHXUkzdgw01M81ZrpaH1k9b8kEhXgz B4rLqze2g/IFroZ1pwE9XvmvJ+l2WHCBH/8uoBHyk+jSuO/gU+lIq0C2RjWgwb2qyBRc s232LOynhbZTCUUypi+fpqp8BKAZwXZ9pk2flU9Uvgl+vRa7c4r+vTBGAO5aRWc8SJmM sCvx4C+jVBXQDOXj2wEZcNDsRF6WmRBiEp0aN3tM+pgkr9hpz25Lvq2QuPugakjOEzWP dNAvE5KVjIZcBYTUqYSBOVMKqV8Sgbz/IqC41PJpLwOBhRa6IUwAmCD1eTtric/y0vIP hhGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=GR1VzIgI95C7s5Zv9cazg0liNSpLP3B2iPo5pLuIroU=; b=SJz6aT5/msvG5xpc+cw9gYKfvI843pz6eIe8p6jZS/CB5CYMM4SRNcdr2IOcBySnto HV074D9KFtPYgGHs4uZBK+C/L7143cWu5YLDlE43SJuv4XGNL1mVuDKAJ6bxhYdH3NQB iXXTqvRP1nFLXmepAPznqFx7eRx86ZqZWG5grAkV4rLd832P2OZK2OZy5Qi1mhUbpzuC u3O3LhI7J7GZU3QoNbnPMt+y0G6MRzglMBYr59N8zSN8Eo4+ZgWmw4NcwNluxMKdMGe6 a9nz2DADz2iCQ477bZicJV2M9up0KTLt7rtZT6Y3wp6qBy2Ph2S4NAkQtzQuJ+GXFIAi k9mw== X-Gm-Message-State: AOAM530OBCmhIW3/sKJdFzdlOZIIM5FAbw/Bei8AdD4TObZFfxqBxZiz mLyT6+OhdMyNChb3cmfInRc= X-Google-Smtp-Source: ABdhPJytf/Vko32+7asLHaC5dXR9RoijSvb1oyh8EGC4vsBsPZlKPH873/l+2PnGK74Ouf65kFERjA== X-Received: by 2002:a19:c794:: with SMTP id x142mr8162813lff.134.1630096481847; Fri, 27 Aug 2021 13:34:41 -0700 (PDT) Subject: Re: [RFC PATCH] xen/memory: Introduce a hypercall to provide unallocated space To: Julien Grall Cc: Stefano Stabellini , Andrew Cooper , xen-devel@lists.xenproject.org, Oleksandr Tyshchenko , Daniel De Graaf , "Daniel P. Smith" , Ian Jackson , Wei Liu , George Dunlap , Jan Beulich , Volodymyr Babchuk , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Bertrand Marquis , Wei Chen References: <1627489110-25633-1-git-send-email-olekstysh@gmail.com> <4de5ed21-379e-b618-44c8-924d88b1a519@citrix.com> <6a633f4e-13e0-4a2b-cf6e-35ef90ae977c@gmail.com> <5643d414-0b76-74a4-2c37-c7a99338d547@gmail.com> <6596ad08-8398-64dd-ef62-cd7bc6f7333e@gmail.com> <1d0ea55d-2e5a-daa7-9c60-c7a1c4b48fa1@gmail.com> <6947db7a-44d3-eb5f-c93e-1c1b88c62f29@xen.org> <736c38b3-0dfa-ccbf-6a6a-6da871f8aca0@gmail.com> <4f5be55d-062b-06d2-1e41-bac3ade0cc3a@xen.org> <92268dd6-04b7-38e9-86d4-949702971f4b@xen.org> From: Oleksandr Message-ID: <610c474b-9590-2f52-b61e-ab4bb0fc1ec9@gmail.com> Date: Fri, 27 Aug 2021 23:34:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <92268dd6-04b7-38e9-86d4-949702971f4b@xen.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 17.08.21 20:54, Julien Grall wrote: Hi Julien > On 17/08/2021 18:53, Julien Grall wrote: >> Hi Oleksandr, >> >> On 10/08/2021 18:03, Oleksandr wrote: >>> >>> On 10.08.21 19:28, Julien Grall wrote: >>> >>> Hi Julien. >>> >>>> >>>> >>>> On 09/08/2021 22:18, Oleksandr wrote: >>>>> >>>>> On 09.08.21 23:45, Julien Grall wrote: >>>>> >>>>> >>>>> Hi Julien >>>> >>>> >>>> Hi Oleksandr, >>>> >>>>>> On 09/08/2021 19:24, Oleksandr wrote: >>>>>>> >>>>>>> On 09.08.21 18:42, Julien Grall wrote: >>>>>>> 1. If IOMMU is enabled for Dom0 -> provide holes found in Host >>>>>>> DT as safe ranges >>>>>>> >>>>>>> I would take into the account holes >= 1MB. >>>>>> >>>>>> May I ask why 1MB? >>>>> >>>>> Nothing special, just thinking to not bother with small regions >>>>> which would not be too useful overall, but could bloat resulting >>>>> reg property. >>>>> >>>>> Anyway, I would be ok with any sizes. >>>> >>>> I was more interesting with the reasoning behind your choice rather >>>> than saying we want more. >>>> >>>> I agree that we may want to skip smaller region. I am guess that an >>>> high number of small regions will also increase the bookeeping in >>>> Linux. >>>> >>>> But I would probably suggest to align the safe region to a 2MB >>>> (superpage for 4KB page granularity) just because the backend (or >>>> even Xen) may be able to do some optimization there. >>> >>> OK, agree regarding the alignment. But, what about the size? I >>> assume, it should be a multiple of 2MB. >> >> I would say yes. In the documentation for the guest, I would just >> write "64KB" to give us some flexibility to reduce the alignment/size >> if we encounter platform where we can meet those limits (hopefully >> there is none...). > > Whoops, I meant cannot rather than can. ok, makes sense, thank you for the clarification. > > Cheers, > -- Regards, Oleksandr Tyshchenko