[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V7 2/2] xen/gnttab: Store frame GFN in struct page_info on Arm


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 11 Oct 2022 15:38:01 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k7FxmdC11CggFfz6/skPhgjgBNHXzbsJ4GzURyS4DY4=; b=aG3y1u2kF5n2m9ieCGogw17gLrw/zKcgaf6TJeDIWtGvz/sDftM3wxoxMSa3MvD/BsgX5X+LGPUFB5xLR/9Pg9Zng3QSigjRf0ZQKqJJQz3ykWSYA725tCISFK803ajDOohGjXNu5NRlJ1V58/qHMzqEvK8aiwprxU98qL+2pF/vTUMNsbAXJFmdGXFgdWlxl/oQyI+9ZTBXSycbRBwU++qaAyvc+ndb1majAs/6NvuwLToX5BMM8ZZ6NhcXajYkZOv+t89un+icXV53rDvt8I4KkOTtEbWTu1KLFni7CUsEDhxG8m2303n+fd7Wgnipe081BAn6h9JR4i6Xq3UA5Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TAqyLWgnwc1MzGZbcaO/mrqyISNO5iiM4gZ1kU/DTopaRN4Vd3L5KY8dlJaGH9yQbpMTYLLGLuLKZpI/lD1rtizraDFE4V4UHNXv4FZCTj1ajTWvhG7ulqumM7Wr87+tHMuBX4Cqk6oPSXvSXlOO/8V1rZQZpdebvGTP1SSSNc++Hj2oxduT+opvNd4EIQhLih+XQXo2Zgsup0DCT6b+PRq/ZMX+wepyBcKvj8Ozi8nZcqx35nRypUA3t7j/ZSAd1fL9uES4O/wvePma17YKXNFXXONaWWcmEKB+tX/l3ETYssVMjYNPru9aSwuDCFGcF6tBA+TESB2mShtYEJawLg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Henry Wang <Henry.Wang@xxxxxxx>, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
  • Delivery-date: Tue, 11 Oct 2022 13:38:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.10.2022 15:33, Julien Grall wrote:
> Hi Jan,
> 
> On 11/10/2022 14:28, Jan Beulich wrote:
>> On 11.10.2022 15:01, Julien Grall wrote:
>>> Hi Jan,
>>>
>>> On 11/10/2022 12:59, Jan Beulich wrote:
>>>> On 16.07.2022 16:56, Oleksandr Tyshchenko wrote:
>>>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>>>>>
>>>>> 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).
>>
>> I should have said "obtain a writable type reference".
> 
> Thanks for the clarification.
> 
>>
>>> 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.
>>
>> Wow - a mere stub (but not inline) function to make the build happy.
>> Then why is the description talking about one bit that's needed on
>> Arm?
> 
> Because share_xen_page_with_guest() will always set the type info's 
> count to 1.
> 
> TBH I don't exactly know why we set it. I always assumed this was a 
> requirement for the common code but never checked.

I don't think there is any such requirement. In fact there are only
very few uses of type_info in common code. By also setting
PGT_count_mask to zero you could actually have the compiler eliminate
some dead code ...

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.