Re: [Xen-devel] [PATCH v3 2/9] x86: introduce a new set of APIs to manage Xen page tables

2019-11-18 Thread Wei Liu
On Mon, Nov 18, 2019 at 10:50:47AM +0100, Jan Beulich wrote: > On 15.11.2019 18:16, Wei Liu wrote: > > On Fri, Nov 15, 2019 at 04:23:30PM +0100, Jan Beulich wrote: > >> On 02.10.2019 19:16, Hongyan Xia wrote: > >>> @@ -4847,22 +4848,50 @@ int mmcfg_intercept_write( > >>> } > >>> > >>> void

Re: [Xen-devel] [PATCH v3 2/9] x86: introduce a new set of APIs to manage Xen page tables

2019-11-18 Thread Jan Beulich
On 15.11.2019 18:16, Wei Liu wrote: > On Fri, Nov 15, 2019 at 04:23:30PM +0100, Jan Beulich wrote: >> On 02.10.2019 19:16, Hongyan Xia wrote: >>> @@ -4847,22 +4848,50 @@ int mmcfg_intercept_write( >>> } >>> >>> void *alloc_xen_pagetable(void) >>> +{ >>> +mfn_t mfn; >>> + >>> +mfn =

Re: [Xen-devel] [PATCH v3 2/9] x86: introduce a new set of APIs to manage Xen page tables

2019-11-15 Thread Wei Liu
On Fri, Nov 15, 2019 at 04:23:30PM +0100, Jan Beulich wrote: > On 02.10.2019 19:16, Hongyan Xia wrote: > > @@ -4847,22 +4848,50 @@ int mmcfg_intercept_write( > > } > > > > void *alloc_xen_pagetable(void) > > +{ > > +mfn_t mfn; > > + > > +mfn = alloc_xen_pagetable_new(); > > +

Re: [Xen-devel] [PATCH v3 2/9] x86: introduce a new set of APIs to manage Xen page tables

2019-11-15 Thread Jan Beulich
On 02.10.2019 19:16, Hongyan Xia wrote: > @@ -4847,22 +4848,50 @@ int mmcfg_intercept_write( > } > > void *alloc_xen_pagetable(void) > +{ > +mfn_t mfn; > + > +mfn = alloc_xen_pagetable_new(); > +ASSERT(!mfn_eq(mfn, INVALID_MFN)); > + > +return map_xen_pagetable_new(mfn); > +} >

[Xen-devel] [PATCH v3 2/9] x86: introduce a new set of APIs to manage Xen page tables

2019-10-02 Thread Hongyan Xia
From: Wei Liu We are going to switch to using domheap page for page tables. A new set of APIs is introduced to allocate, map, unmap and free pages for page tables. The allocation and deallocation work on mfn_t but not page_info, because they are required to work even before frame table is set