[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 Tyshchenko <olekstysh@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 16 Aug 2021 09:33:53 +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=hRsf1eJwiMmHTAqVEBhOweeGc6Jif7zqzzKVDHl+gvs=; b=ivBO3dA6jKi2RuuOYulbMjUMY5tMtDSTZU3qAA806iaOVUh+IZF8mG93/LsUD3hfHTbSD8BWnnOMuC4aqxAwWeSn4KY/qtE/qPdGK/UzTnAHWfUqb06jXv6d+Ub8BClmimzI5LVxbgjIfhnNQtBIgkLEMLfQ6VBWWWH7GSc6Uik0VVcQRXDQ0xmly4n4lBbe3mu9dXPnH177En2mJ72QsOaYIx+uknr2LyMVu0Durh7q8W9dPfQR6m/CROEEnrnE1BhbOzSEFNjZE89oYXg8K4e5RrEbOsUIwEdark8PvAUy6QJuY8/KznYKpBf7abXOIH3qmriAgcz2wbEoq+Lv+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZthXemOsl13j0q/+y1tfrzr0sxk0RQRmE4kvLQSuuJmLbjl5m/X+vVYFzB3R2Z0TayxR0IHNb6GyzdfEkGEHolM2m8zp+m8TEl68law6Vde0pCLMMhLRh8zLF8DRJcGyeDcsdkUhxDrORnIBD3+RcMuQvsF2QaTsqL8gzS/cRRkmuuHj0LhUcQ2qtxSnb4k615SNCF1rp2+0vdLSQuZHredK1WUeWRCaq2VZDSnK6pdNUcNVdxqzPrSy498ALdEyMG9dDyq6sNR0doZEorNE6d03SESK93AQn/TrmuUSjrXIQRO3kL/HG9fF/SQL6Mx1oMt7gXu+UT/jXO20F8pT/Q==
  • 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, 16 Aug 2021 07:34:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.08.2021 01:28, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
> 
> We need to pass info about maximum supported address space size
> to the toolstack on Arm in order to properly calculate the base
> and size of the safe range for the guest. Use p2m_ipa_bits variable
> which purpose is to hold the bit size of IPAs in P2M tables.

What is "the safe range"?

> --- 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. If indeed so, please name
the struct in a name space clean way, i.e. add xen_ as prefix.

Also please retain a blank line before the #endif. I wonder whether
on Arm you wouldn't want to add one at this occasion.

Jan




 


Rackspace

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