Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Jan Beulich
On 18.03.2020 13:11, David Woodhouse wrote: > On Wed, 2020-03-18 at 11:03 +0100, Jan Beulich wrote: >> On 17.03.2020 23:15, David Woodhouse wrote: >>> On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote: On 07.02.2020 19:04, David Woodhouse wrote: >>> >>> ASSERT((pg[i].count_info &

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread David Woodhouse
On Wed, 2020-03-18 at 11:03 +0100, Jan Beulich wrote: > On 17.03.2020 23:15, David Woodhouse wrote: > > On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote: > > > On 07.02.2020 19:04, David Woodhouse wrote: > > > > ASSERT((pg[i].count_info & ~PGC_extra) == PGC_state_inuse || > >

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Jan Beulich
On 18.03.2020 11:41, Paul Durrant wrote: -Original Message- From: Jan Beulich Sent: 18 March 2020 10:10 To: p...@xen.org Cc: 'David Woodhouse' ; sstabell...@kernel.org; jul...@xen.org; w...@xen.org; konrad.w...@oracle.com; george.dun...@eu.citrix.com; andrew.coop...@citrix.com;

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 18 March 2020 10:10 > To: p...@xen.org > Cc: 'David Woodhouse' ; sstabell...@kernel.org; > jul...@xen.org; w...@xen.org; > konrad.w...@oracle.com; george.dun...@eu.citrix.com; > andrew.coop...@citrix.com; > ian.jack...@eu.citrix.com;

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Jan Beulich
On 18.03.2020 09:53, Paul Durrant wrote: -Original Message- From: Xen-devel On Behalf Of David Woodhouse Sent: 17 March 2020 22:15 On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote: On 07.02.2020 19:04, David Woodhouse wrote: --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Jan Beulich
On 17.03.2020 23:15, David Woodhouse wrote: On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote: On 07.02.2020 19:04, David Woodhouse wrote: ASSERT((pg[i].count_info & ~PGC_extra) == PGC_state_inuse || (pg[i].count_info & ~PGC_extra) == PGC_state_uninitialised);

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-18 Thread Paul Durrant
@citrix.com; > ian.jack...@eu.citrix.com; > george.dun...@citrix.com; jeff.kubas...@dornerworks.com; Xia, Hongyan > ; > stewart.hildebr...@dornerworks.com; xen-devel@lists.xenproject.org > Subject: Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised > > On Thu,

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-03-17 Thread David Woodhouse
On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote: > On 07.02.2020 19:04, David Woodhouse wrote: > > --- a/xen/arch/x86/mm.c > > +++ b/xen/arch/x86/mm.c > > @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, > > struct domain *d, > > > > page_set_owner(page, d);

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-20 Thread Julien Grall
Hi, On 20/02/2020 11:59, Jan Beulich wrote: On 07.02.2020 19:04, David Woodhouse wrote: --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, struct domain *d, page_set_owner(page, d); smp_wmb(); /* install

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-20 Thread Jan Beulich
On 07.02.2020 19:04, David Woodhouse wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, > struct domain *d, > > page_set_owner(page, d); > smp_wmb(); /* install valid domain ptr before updating

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread David Woodhouse
On Fri, 2020-02-07 at 17:06 +, David Woodhouse wrote: > On 7 February 2020 16:40:01 GMT, "Xia, Hongyan" wrote: > > On Fri, 2020-02-07 at 16:32 +, David Woodhouse wrote: > > > > > > ... > > > > > > Ideally not because init_heap_pages() then calls free_heap_pages() > > > and the

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread David Woodhouse
On 7 February 2020 16:40:01 GMT, "Xia, Hongyan" wrote: >On Fri, 2020-02-07 at 16:32 +, David Woodhouse wrote: >> >> ... >> >> Ideally not because init_heap_pages() then calls free_heap_pages() >> and the "recursion" is best avoided. > >Kind of depends on where we change its pg to

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread Xia, Hongyan
On Fri, 2020-02-07 at 16:32 +, David Woodhouse wrote: > > ... > > Ideally not because init_heap_pages() then calls free_heap_pages() > and the "recursion" is best avoided. Kind of depends on where we change its pg to initialised. If we do that in free_heap_pages this does recurse, but if it

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread Xia, Hongyan
On Fri, 2020-02-07 at 15:57 +, David Woodhouse wrote: > From: David Woodhouse > > ... > > Finally, make free_xenheap_pages() and free_domheap_pages() call > through to init_heap_pages() instead of directly to free_heap_pages() > in the case where pages are being free which have never passed

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread David Woodhouse
On 7 February 2020 16:30:04 GMT, "Xia, Hongyan" wrote: >On Fri, 2020-02-07 at 15:57 +, David Woodhouse wrote: >> From: David Woodhouse >> >> ... >> >> Finally, make free_xenheap_pages() and free_domheap_pages() call >> through to init_heap_pages() instead of directly to free_heap_pages()

[Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-07 Thread David Woodhouse
From: David Woodhouse It is possible for pages to enter general circulation without ever being process by init_heap_pages(). For example, pages of the multiboot module containing the initramfs may be assigned via assign_pages() to dom0 as it is created. And some code including