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 7CA0BC433FE for ; Tue, 11 Oct 2022 13:02:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.420206.664797 (Exim 4.92) (envelope-from ) id 1oiEtd-0005NJ-Qk; Tue, 11 Oct 2022 13:02:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 420206.664797; Tue, 11 Oct 2022 13:02:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiEtd-0005NC-O0; Tue, 11 Oct 2022 13:02:09 +0000 Received: by outflank-mailman (input) for mailman id 420206; Tue, 11 Oct 2022 13:02:08 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiEtc-0005N6-9f for xen-devel@lists.xenproject.org; Tue, 11 Oct 2022 13:02:08 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiEtX-00021O-1S; Tue, 11 Oct 2022 13:02:03 +0000 Received: from 54-240-197-234.amazon.com ([54.240.197.234] helo=[192.168.14.212]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oiEtW-0000OD-PA; Tue, 11 Oct 2022 13:02:02 +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=x4kUecLRn/PpXV1NA2Xv+wHU7ZIN5eA7nNXU1lzxSeQ=; b=m3IYHxRfVe/qYuqp0TSpd47nbt csiIiKbODTEYFrGDktJvBKk5zI1lAlMKfVEk8M2taSvHTm/r1RwmckJdx0PmVqVgPeqeBFzxlWFY0 MjgPhHXr+O2IozdCRfmx+PZkaNsu8CV9SPn1OKvOseqlPtkT23Nfem/nq4/I6xFsH9Ro=; Message-ID: Date: Tue, 11 Oct 2022 14:01:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH V7 2/2] xen/gnttab: Store frame GFN in struct page_info on Arm Content-Language: en-US To: Jan Beulich , Oleksandr Tyshchenko Cc: Oleksandr Tyshchenko , Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Julien Grall , xen-devel@lists.xenproject.org, Henry Wang References: <20220716145658.4175730-1-olekstysh@gmail.com> <20220716145658.4175730-2-olekstysh@gmail.com> From: Julien Grall In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Jan, On 11/10/2022 12:59, Jan Beulich wrote: > On 16.07.2022 16:56, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> Rework Arm implementation to store grant table frame GFN >> in struct page_info directly instead of keeping it in >> standalone status/shared arrays. This patch is based on >> the assumption that a grant table page is a xenheap page. >> >> To cover 64-bit/40-bit IPA on Arm64/Arm32 we need the space >> to hold 52-bit/28-bit + extra bit value respectively. In order >> to not grow the size of struct page_info borrow the required >> amount of bits from type_info's count portion which current >> context won't suffer (currently only 1 bit is used on Arm). > > I'm afraid this isn't true: There's no requirement for a guest to pass > all different GFNs to VCPUOP_register_vcpu_info, yet map_vcpu_info() > tries to obtain a reference for every vCPU. AFAIU, this would be a reference of the **count_info** not **type_info** (which BTW will never be incremented on Arm because we have no type support). The commit message is only referring to the 'type_info's count'. So... > With my adding of GFN > (really gaddr) based registration of the runstate area (already > looking towards 4.18) the maximum possible count is to further grow. ... I am not sure which problem you are referring too. Cheers, -- Julien Grall