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

Re: [RFC PATCH] xen: Introduce arch specific field to XEN_SYSCTL_physinfo


  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 30 Aug 2021 15:16:29 +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-SenderADCheck; bh=8iPaSGF2Y9vmySV5bHttv69vkJpXpqgQRidWltffVYg=; b=ht7+IXBNCEY7EjdbFPd7IhJ9raHCPOgKvlDP6Bkaqjdrgw/6aDPENmD4CCqYceHNXxIUJgmVbn3j4D39Aw3gzNhCBbWbfbcHzrj7nB9J00VN9CA8ipNQmjJK1G85cnVHsP2oHyXxIjbtywapuRoeoj1+qbMkdSlX5H0XuHeUE7hgZoG0ahO0B0cPessYUqp73gGcoTqnnMXwS445lLisupA51l6Ur4GIGRgp+hlvP7DAicUWicI4feaf+jtxmDXsEmPI0s/u9gb0ofNKSKfAuzU9vwqbDDhnnoPlJwqnR0ndkUATfnUA+s1HF0Ohe2Unb7oj8QoRT4NUwoOy+dvyFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYDwzSVIsPhYpyizyaiVFqu2ZCTooyH5okmlpG6XzxUoO1PdkLP9uuPXROO38O8gTxVpONtUaZN00YOeUV3oHWkxKXja/UXKTiIOoa5QnORzD7LNn01sqZgrchwIH4BpKZUIxEDm6woncxJ24irR6SR0MtLGdMjSo+4rvXBxbqQTSLPYl04dQq6vmq4oXvBMgF4LH4lSYcqWxQwiO7468nDonUvXF7jNmpEhXCvDebfSKXKUhEKIzq4Viap1Y7wdpjRABiDs6PHVxR/l/FQUEq/iMEavdhuyLmnRwwKQlHXaC3HwxrVBiEWjv7FjwcGjVYbqYc3K8fZtVT2bF9jvQQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 30 Aug 2021 13:16:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.08.2021 22:28, Oleksandr wrote:
> On 16.08.21 10:33, Jan Beulich wrote:
>> On 14.08.2021 01:28, Oleksandr Tyshchenko wrote:
>>> --- a/xen/include/public/arch-arm.h
>>> +++ b/xen/include/public/arch-arm.h
>>> @@ -332,6 +332,11 @@ struct xen_arch_domainconfig {
>>>        */
>>>       uint32_t clock_frequency;
>>>   };
>>> +
>>> +struct arch_physinfo {
>>> +    /* Holds the bit size of IPAs in p2m tables. */
>>> +    uint32_t p2m_ipa_bits;
>>> +};
>>>   #endif /* __XEN__ || __XEN_TOOLS__ */
>>>   
>>>   struct arch_vcpu_info {
>>> --- a/xen/include/public/arch-x86/xen.h
>>> +++ b/xen/include/public/arch-x86/xen.h
>>> @@ -346,6 +346,8 @@ typedef struct xen_msr_entry {
>>>   } xen_msr_entry_t;
>>>   DEFINE_XEN_GUEST_HANDLE(xen_msr_entry_t);
>>>   
>>> +struct arch_physinfo {
>>> +};
>>>   #endif /* !__ASSEMBLY__ */
>> While the term "p2m_ipa_bits" surely isn't arch-agnostic, I wonder
>> whether the expressed information is (the x86 equivalent being
>> hap_paddr_bits, at a guess), and hence whether this really ought
>> to live in an arch-specific sub-struct.
> 
> Well, on Arm we calculate the number of the IPA bits based on the number 
> of PA bits when setting Stage 2 address translation.
> I might mistake, but what we currently have on Arm is "ipa_bits == 
> pa_bits". So, this means that information we need at the toolstack side 
> isn't really arch-specific and
> we could probably avoid introducing arch-specific sub-struct by suitable 
> renaming the field (pa_bits, paddr_bits, whatever).
> 
> We could even name the field as hap_paddr_bits. Although, I don't know 
> whether the hap_* is purely x86-ism, but I see there are several 
> mentions in the common code (hap_pt_share, use_hap_pt, etc). Any 
> suggestions?

Well, HAP or not - there is going to be a limit to a guest's
address bits. So I don't see why it would matter whether HAP is
an x86-specific term. If you wanted to express the guest nature
and distinguish it from "paddr_bits", how about "gaddr_bits" or
"gpaddr_bits"?

Jan




 


Rackspace

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