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

Re: [PATCH v5 6/9] xen/arm: introduce CDF_staticmem


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 May 2022 10:40:59 +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=MdQ0tv9ZY927eDAi9KWK6S8eybd4UghsqJGeP20ui00=; b=HWbRdpsBS0DXfNQ4pY2ccj8QnLyCtFWIyYttGMofdbp9xL+tZIj+IpP3JgifSssq0S4dSSXzErnL6KA6hB0LfIq2eyYnHZ56931fQggkPEyEeRiev1ooDJ7abPu6r9N0eABAxZUwlGYXS6e2ohcG9Znk4MpWZseDlplIyr4OZcv5+WYjeiiMMsS5Qv6RaK7xDiFjzZX+doBJnDGZAyc8XN6KFqZESb+HY6fpcWi06LEXj9cULDHnIYIfFl60xMlJCQ2YSKF5PiI7brITj+A3bCWaVEWImkIEe26sVT3IX4Vz0t4fjo+ZoF+T3RSFy8BbyZAxj0O3/FsiPoee92TuMA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hyX4wipu7NPCWeCV3puswQdF4GdS8XHVE7QaowKidcGVndH9Dnt17dH+rcI9Mhpju0JVl5B/E+Jk9Hc4tu1cEMAs2SkCaebFPuabT4RJwTXy5ZxJkR+lxIipnqcFpA90ba+ZqDtWoOW6ZRFRlmzVRznjWrWPjN02AeUr7rifRLDjkJWJSwvYltP95im+YqUQV+tTnvfm4SmB5xyCOe7L3IhH1ZN/eu7cRZ6+E6gatOGVtPdQWGrni/bpzf0+sDkRPYaFlMfa0ewPTyY0TiI06AY79cd7gRrL4ThHHVYFwOYCfBXxLKbIwtEil0Czt2NEJ2CHo7Le44YNzY+lxGS2zQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: wei.chen@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 31 May 2022 08:41:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.05.2022 05:12, Penny Zheng wrote:
> --- a/xen/arch/arm/include/asm/domain.h
> +++ b/xen/arch/arm/include/asm/domain.h
> @@ -31,6 +31,10 @@ enum domain_type {
>  
>  #define is_domain_direct_mapped(d) ((d)->cdf & CDF_directmap)
>  
> +#ifdef CONFIG_STATIC_MEMORY
> +#define is_domain_using_staticmem(d) ((d)->cdf & CDF_staticmem)
> +#endif

Why is this in the Arm header, rather than ...

> --- a/xen/include/xen/domain.h
> +++ b/xen/include/xen/domain.h
> @@ -34,6 +34,12 @@ void arch_get_domain_info(const struct domain *d,
>  #ifdef CONFIG_ARM
>  /* Should domain memory be directly mapped? */
>  #define CDF_directmap            (1U << 1)
> +/* Is domain memory on static allocation? */
> +#define CDF_staticmem            (1U << 2)
> +#endif
> +
> +#ifndef is_domain_using_staticmem
> +#define is_domain_using_staticmem(d) ((void)(d), false)
>  #endif

... here (with what you have here now simply becoming the #else part)?
Once living here, I expect it also can be an inline function rather
than a macro, with the #ifdef merely inside its body.

Jan




 


Rackspace

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