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

RE: [PATCH v4 02/11] xen: introduce CDF_directmap


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Fri, 21 Jan 2022 09:15:30 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=ht17sfsBFKs5sbiNdFUpSEjSLSRisxR2BXIrjSqHg5w=; b=AXB5tuN+IYavk/Twp537moyC18+dzSYJm5uQezzY86T1uDPe4A9xe8StmUIucIzhbj3/uxn3wlSBSGsilLrvIBact9ANJsPGfw2AaxOO8X4IhJwvm7trP82S5SE+2jkTNZMzo5VjxRDZofVTi3TU/s8d4FJJsdgZAQkzmANLQ5IgafZKbam7oBDyjM3fNaUD7I0Spusf+oFzYHaXZiDT6JZ8daEjG6CYLJauGp1IcJZUKFiyyaHGgcpSdG7SQRcrCfk5LeqQoBxywNsFnXz7SUkQUB7x7GYt1ZuCsFNBg4ULIWLpbVWaDPrAl766Lj202uHMDqTWT4Jh8U662qm3Tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SbarPiamgrwmwugmaKcEPCQE85jXGW30tEnsuXgpQSI7094mh5keh88br8EaPPZlshcSJujYz/snih4EuFTOiCtJMvFCLrBRy/pttZkM7fqZ513lGzfKG53kNvDBOAoCYwxxSAi/AWHO2hO+i7HQfJas4WLVhYCC5rNeCLkJeTJ1ETON1JO+uNmiHjMetheg7jJ7DzXfmTVqsblMDEZwWLKCFyOHIxs1HT6jSyGaaOZpevO7qMU2nq/gHlzfB1KsryoaOBlZt8OMfzS7IiVPuRanUISQTYAVsSYLeXvH29WOB3Qt+As07knggWwP2DrxOaxipEu5gDTdyvJwYENr0w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Fri, 21 Jan 2022 09:15:51 +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: AQHYA9H+JIfw9425OkuSPzbM51YUg6xtROgg
  • Thread-topic: [PATCH v4 02/11] xen: introduce CDF_directmap

Hi Jan

Sorry for the late reply.

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Friday, January 7, 2022 10:22 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx; julien@xxxxxxx
> Subject: Re: [PATCH v4 02/11] xen: introduce CDF_directmap
> 
> On 20.12.2021 06:21, Penny Zheng wrote:
> > From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> >
> > This commit introduces a new arm-specific flag CDF_directmap to
> > specify that a domain should have its memory direct-map(guest physical
> > address == physical address) at domain creation.
> >
> > Also, add a directmap flag under struct arch_domain and use it to
> > reimplement is_domain_direct_mapped.
> >
> > For now, direct-map is only available when statically allocated memory
> > is used for the domain, that is, "xen,static-mem" must be also defined
> > in the domain configuration.
> >
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> > Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> 
> Non-Arm parts
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> However, ...
> 
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -3029,10 +3029,20 @@ void __init create_domUs(void)
> >              .max_maptrack_frames = -1,
> >              .grant_opts =
> XEN_DOMCTL_GRANT_version(opt_gnttab_max_version),
> >          };
> > +        unsigned int flags = 0U;
> 
> Nit: No real need for a U suffix here.
> 
> >          if ( !dt_device_is_compatible(node, "xen,domain") )
> >              continue;
> >
> > +        if ( dt_property_read_bool(node, "direct-map") )
> > +        {
> > +            if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
> 
> Isn't this too lax a check? I didn't find any other check of this property, 
> so the
> use of static memory must be keyed to something else. Hence it's not 
> sufficient
> that static memory support is enabled in the build.
> 

Ok.
I'll change the check to " if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) || 
!dt_find_property(node, "xen,static-mem", NULL) ) "
to make the check a bit more strict.

> > @@ -65,7 +67,8 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn,
> > unsigned offset);  void unmap_vcpu_info(struct vcpu *v);
> >
> >  int arch_domain_create(struct domain *d,
> > -                       struct xen_domctl_createdomain *config);
> > +                       struct xen_domctl_createdomain *config,
> > +                       const unsigned int flags);
> 
> Same comment as for the earlier patch regarding the const here.
> 
> Jan

Many thanks,
Penny Zheng


 


Rackspace

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