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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99F89C433F5 for ; Tue, 12 Oct 2021 15:12:10 +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 6070A6052B for ; Tue, 12 Oct 2021 15:12:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6070A6052B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.207377.363181 (Exim 4.92) (envelope-from ) id 1maJRU-0003jP-FO; Tue, 12 Oct 2021 15:11:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 207377.363181; Tue, 12 Oct 2021 15:11:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maJRU-0003jI-CS; Tue, 12 Oct 2021 15:11:48 +0000 Received: by outflank-mailman (input) for mailman id 207377; Tue, 12 Oct 2021 15:11:47 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maJRT-0003jC-06 for xen-devel@lists.xenproject.org; Tue, 12 Oct 2021 15:11:47 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maJRS-0003ZK-UY for xen-devel@lists.xenproject.org; Tue, 12 Oct 2021 15:11:46 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1maJRS-0003Nc-Ta for xen-devel@lists.xenproject.org; Tue, 12 Oct 2021 15:11:46 +0000 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.89) (envelope-from ) id 1maJRN-0004hC-IT; Tue, 12 Oct 2021 16:11:41 +0100 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=xenproject.org; s=20200302mail; h=References:In-Reply-To:Subject:Cc:To:Date :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:From; bh=OJI774lIs/2GfmpiDFKJPlNU3bksOf/OlkxlAnheqq8=; b=lx2BW0EPJ/Kn+NuYWozm9KgaW2 dtseHZcsMhzoFWEp1bv2GHyMiOFT0hcKYgiaP76JBBF9PU3HtensiOSUs+PulEC7BIHUDg6Qh2aLe nf8yMBsjhJ+LB64I6cFMuz+FZgahJc+cjCGRl5hRri/kLo6MpVFRlMLXEQi3l4HrdpWI=; From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <24933.42413.176126.124248@mariner.uk.xensource.com> Date: Tue, 12 Oct 2021 16:11:41 +0100 To: Stefano Stabellini Cc: Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, Oleksandr Tyshchenko , Wei Liu , Anthony PERARD , Juergen Gross , Julien Grall , Volodymyr Babchuk Subject: Re: [PATCH V6 2/2] libxl/arm: Add handling of extended regions for DomU Newsgroups: chiark.mail.xen.devel In-Reply-To: References: <1633974539-7380-1-git-send-email-olekstysh@gmail.com> <1633974539-7380-3-git-send-email-olekstysh@gmail.com> X-Mailer: VM 8.2.0b under 24.5.1 (i686-pc-linux-gnu) Stefano Stabellini writes ("Re: [PATCH V6 2/2] libxl/arm: Add handling of extended regions for DomU"): > On Mon, 11 Oct 2021, Oleksandr Tyshchenko wrote: > > From: Oleksandr Tyshchenko > > > > The extended region (safe range) is a region of guest physical > > address space which is unused and could be safely used to create > > grant/foreign mappings instead of wasting real RAM pages from > > the domain memory for establishing these mappings. > > > > The extended regions are chosen at the domain creation time and > > advertised to it via "reg" property under hypervisor node in > > the guest device-tree. As region 0 is reserved for grant table > > space (always present), the indexes for extended regions are 1...N. > > If extended regions could not be allocated for some reason, > > Xen doesn't fail and behaves as usual, so only inserts region 0. > > > > Please note the following limitations: > > - The extended region feature is only supported for 64-bit domain > > currently. > > - The ACPI case is not covered. > > > > *** > > > > The algorithm to choose extended regions for non-direct mapped > > DomU is simpler in comparison with the algorithm for direct mapped > > Dom0. We usually have a lot of unused space above 4GB, and might > > have some unused space below 4GB (depends on guest memory size). > > Try to allocate separate 2MB-aligned extended regions from the first > > (below 4GB) and second (above 4GB) RAM banks taking into the account > > the maximum supported guest physical address space size and the amount > > of memory assigned to the guest. The minimum size of extended region > > the same as for Dom0 (64MB). > > > > Suggested-by: Julien Grall > > Signed-off-by: Oleksandr Tyshchenko > > Reviewed-by: Stefano Stabellini On the basis of that and the diffstat: Acked-by: Ian Jackson