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

Re: [PATCH v2 03/15] xen: ifdef inclusion of <asm/grant_table.h> in <xen/grant_table.h>


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Nov 2023 14:29:41 +0100
  • 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=M3mTAlIySIX+TD2EvkwavdC8wcdUZn2d5Pzq+5klE8g=; b=DB+frUtiZ64ZAxFzfBeOVsIGojibih+Wo8Bw6FvW26r/G32HeYSkDP1b4EBQdXs6pFPcXY3RE/KRnDb7rXDMlN63k7rPhylC/ERYaOE3v/ui+ngf+6Wn4lSm8y6HaizZj7lBtKKAa8tPWS+QhW8dj9kjU7tzCmyMf21sVr6ON0rS5ajM8uRj8V27icK4M64ouJcXaW6WpvwLUTnz34Q1MWs97RolR2bmFvyA6S1jaPCM0rtLL44UjLeStYOmgsoFEghsTdHGWO3W4iGYD1fquvYeS3Kk6aaSmZRYqDfn967KpEO5Z+idsyMQxM3VX1uN6HkLiS6x9smmgfI6lmgjgA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fxu+sZExBMslR5EY05M280R28x1ex36l5XZyDtpGO0Q+zLU1vX4JyxM4sahRJ28S1TyqVRNfDPaDREYKo2xl4XffGG/KC8hbFEOdCOvELAWxykavTHpB3DM012Vd0jMZ/0qRa5P1snmWTAILXiEpUz4VkTRKI0/1s9Qb27VrNMQO1Zxpjzu0A3wTJOIg33lO939yr6Ul5mAGyE7PaE1qNJDKnTKEBJUsPaXAvAi8vf4BtLbw053dgP/PjYV8GcQHAw99A2i2BG0Xt+0pIiaLJEV+aVujMmElOeqkhDaVWa6gW29BGPrdi2rjiIk0kdH7K6LO7HDGcF2GF7lD3eTuaA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 13 Nov 2023 13:29:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.11.2023 14:13, Oleksii wrote:
> On Sat, 2023-11-11 at 12:25 +0200, Oleksii wrote:
>> I missed to check the patch properly.
>>
>> The patch fails for Arm randconfigs:
>> https://gitlab.com/xen-project/people/olkur/xen/-/pipelines/1068865674
>>
>> I need to do an additional investigation.
> So the only one macro cause compile issue if move it to
> xen/grant_table.h compilation will pass:
> 
> --- a/xen/include/xen/grant_table.h
> +++ b/xen/include/xen/grant_table.h
> @@ -23,10 +23,14 @@
>  #ifndef __XEN_GRANT_TABLE_H__
>  #define __XEN_GRANT_TABLE_H__
>  
> +#include <xen/kernel.h>
>  #include <xen/mm-frame.h>
>  #include <xen/rwlock.h>
>  #include <public/grant_table.h>
> +
> +#ifdef CONFIG_GRANT_TABLE
>  #include <asm/grant_table.h>
> +#endif
>  
>  struct grant_table;
>  
> @@ -112,6 +116,16 @@ static inline int gnttab_acquire_resource(
>      return -EINVAL;
>  }
>  
> +/*
> + * The region used by Xen on the memory will never be mapped in DOM0
> + * memory layout. Therefore it can be used for the grant table.
> + *
> + * Only use the text section as it's always present and will contain
> + * enough space for a large grant table
> + */
> +#define gnttab_dom0_frames()                                         
> \
> +    min_t(unsigned int, opt_max_grant_frames, PFN_DOWN(_etext -
> _stext))
> +
>  #endif /* CONFIG_GRANT_TABLE */
>  
>  #endif /* __XEN_GRANT_TABLE_H__ */
> 
> 
> But gnttab_dom0_frames() is used only for ARM, so probably moving it to
> <xen/grant_table.h> is not a good idea.

Indeed. But wouldn't dealing with this again be a matter of having
Arm's domain_build.c simply include asm/grant_table.h explicitly, if need
be alongside xen/grant_table.h?

Jan



 


Rackspace

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