> -----Original Message-----
> From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of
> Durrant, Paul
> Sent: 31 January 2020 15:19
> To: Jan Beulich <jbeul...@suse.com>; Julien Grall <jul...@xen.org>
> Cc: Stefano Stabellini <sstabell...@kernel.org>; Wei Liu <w...@xen.org>;
> Konrad Rzeszutek Wilk <konrad.w...@oracle.com>; George Dunlap
> <george.dun...@eu.citrix.com>; Andrew Cooper <andrew.coop...@citrix.com>;
> Ian Jackson <ian.jack...@eu.citrix.com>; Tim Deegan <t...@xen.org>; xen-
> de...@lists.xenproject.org; Roger Pau Monné <roger....@citrix.com>
> Subject: Re: [Xen-devel] [PATCH v8 2/4] add a domain_tot_pages() helper
> function
> 
> > -----Original Message-----
> > From: Jan Beulich <jbeul...@suse.com>
> > Sent: 31 January 2020 12:53
> > To: Durrant, Paul <pdurr...@amazon.co.uk>
> > Cc: xen-devel@lists.xenproject.org; Andrew Cooper
> > <andrew.coop...@citrix.com>; Wei Liu <w...@xen.org>; Roger Pau Monné
> > <roger....@citrix.com>; George Dunlap <george.dun...@eu.citrix.com>; Ian
> > Jackson <ian.jack...@eu.citrix.com>; Julien Grall <jul...@xen.org>;
> Konrad
> > Rzeszutek Wilk <konrad.w...@oracle.com>; Stefano Stabellini
> > <sstabell...@kernel.org>; Tim Deegan <t...@xen.org>
> > Subject: Re: [PATCH v8 2/4] add a domain_tot_pages() helper function
> >
> > On 30.01.2020 15:57, Paul Durrant wrote:
> > > v8:
> > >  - New in v8
> > > ---
> > >  xen/arch/x86/domain.c           |  2 +-
> > >  xen/arch/x86/mm.c               |  6 +++---
> > >  xen/arch/x86/mm/p2m-pod.c       | 10 +++++-----
> > >  xen/arch/x86/mm/shadow/common.c |  2 +-
> > >  xen/arch/x86/msi.c              |  2 +-
> > >  xen/arch/x86/numa.c             |  2 +-
> > >  xen/arch/x86/pv/dom0_build.c    | 25 +++++++++++++------------
> > >  xen/arch/x86/pv/domain.c        |  2 +-
> > >  xen/common/domctl.c             |  2 +-
> > >  xen/common/grant_table.c        |  4 ++--
> > >  xen/common/keyhandler.c         |  2 +-
> > >  xen/common/memory.c             |  4 ++--
> > >  xen/common/page_alloc.c         | 15 ++++++++-------
> > >  xen/include/public/memory.h     |  4 ++--
> > >  xen/include/xen/sched.h         | 24 ++++++++++++++++++------
> > >  15 files changed, 60 insertions(+), 46 deletions(-)
> >
> > From this, with the comment you add next to the struct field, and
> > with your reply yesterday, what about the uses in
> > - arch/arm/arm64/domctl.c:switch_mode(),
> 
> TBH I'm not sure with that one. It looks to me like it needs to check
> whether the domain has *any* memory assigned. Perhaps checking page_list
> would be more appropriate. Perhaps Julien can comment?
> 

Having chatted to Julien, the aim of checking tot_pages here is to test whether 
the domain is newly created, in which case using domain_tot_pages() is the 
appropriate thing to do.

  Paul

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to