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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Thu, 2 Jun 2022 10:07:00 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=AGLT+CTPi9nVsaGk6By6eC6CzYWHyDyS0UPXgKX49HY=; b=Ry9Lo8PgPvPbLdOA0+bSRI4bxBWN/e1thiRR4SkcxwchmuRErm2U7W+qyYUBBesRhFX/hDFWpJ1Rk/XyG9u8GK0nlJkhxioOI/Pk7csNSezld1ToL+mmEFxugftYonx51fVeHvDtFN0TJbbyqrvbpBgKVfCGnFxmdMuehZ/ZIuEX1Sgxqm4LAiO1yuUy9ssXXILg3hHK5qjHjK1Eb0MTfR0YekjEa9EX6bMvMeHZWalenpOdoLh71rQ7HwgoxXC6a/JCv5VBcx1IBlOC3gsMH56OJPjZDR0Nd17/yRZ50ZwMrBLFxKZL4psljEmMgsaeHoQcQd7bqUxJfz7+T1gkKA==
  • 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=AGLT+CTPi9nVsaGk6By6eC6CzYWHyDyS0UPXgKX49HY=; b=dcLEaWe376H17e15eGGLx/paNCnri37DozboQ8zx/ezg0l7vIKLRfVF7nTnptfh578oWLyWmKSY+yy1YeWRCVCEEJAJRgc/Gi4wgTOhYgVgue61F+joSbTDwobnoi5w5k5iP4MoiN8SJ6qi7dT/QUHFHI2OLZgZLSN+pTrljnmouEYfg52JkZ3RerwdZ4JvUnSpBm4IbUvOiTMi00GrAtJzYfF6d80LPOnpCENWnNjgpVCDk84iKnInDMwpSrkBp62PuHFRBQ8Qv806xHqDWFC38UUBDdyIb7yTTkJOdbTANX0cYVqWSAs3XDqmA8iRLVC+nP+/bshPCywjBAzKxQQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CBnRDK3+929jG2BEtKkF6ERVKUyv1B7CnsMtIYELe1PrJXPN04Ht474fyGkMBonJhIMqJZW1JAKSWuJrMGjPWYIlNg/bSUMvgaSuPHIj9x3AqFS9N6xRzGN4b3f7HNAjsDh+taRQx2aSVYhljq5UH5oUwdhRphkyinVlTCKIBU2HRjVK1UM/h9rc8ssmNlsIKAJdrn8IH85MCQEPpfV3NWc2W3x5qu/UcDoDxCHbwSrccioB84bjKMabpyqbkVvAn6MhtKkB5avg7EkwkrtaFFsEoO1kdICqjZR3okGXYiMhOABvmT4eVlRZ+wWDrF86e0xjI4YZq8BJMVGiuHRofg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7u7eFgUcwHF8iZzec8YbaqjPGVytLP6H5kdz+8uq5LJUv0nJpKq9uF8+KXtv80ldDsalqCFwZqKnAFdmngLXDpCBptqF8mcui9Hb7ZRLsvoagE9V0vNjHgcevMTLck9IMhStZpAkR3vvWwPm8qgMnh79Voj/PtJU4obuFKHv6Ga6BoZc+WQ98y8QjejQTlHZInp6NM9Zy1DFx2GvBpMi58QbaU9lac00hGOGHb3UacDmhd7jsBYdTZ64lhtE5Y3J+QHBf8eXLiewFOK1otXeC1YpMiqfBZ+Ebib1bFjza/bybpE0PaMLPTHkKitDzM7py0diW5xJU6uPqo6sFB08Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 02 Jun 2022 10:07:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYdJxz5gwtTkiV8EuW1ruWinPeo604qxSAgAM6niA=
  • Thread-topic: [PATCH v5 6/9] xen/arm: introduce CDF_staticmem

Hi Jan

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, May 31, 2022 4:41 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Wei Chen <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
> Subject: Re: [PATCH v5 6/9] xen/arm: introduce CDF_staticmem
> 
> 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.
> 

In order to avoid bring the chicken and egg problem in xen/include/xen/domain.h,
I may need to move the static inline function to xen/include/xen/sched.h(which
has already included domain.h header).

> Jan


 


Rackspace

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