Re: [Xen-devel] [PATCH for-next 6/8] x86/domain: factor out pv_domain_initialise

2017-04-25 Thread Wei Liu
On Mon, Apr 24, 2017 at 04:20:36AM -0600, Jan Beulich wrote: > > +if ( d->arch.pv_domain.gdt_ldt_l1tab ) > > +{ > > +free_xenheap_page(d->arch.pv_domain.gdt_ldt_l1tab); > > +d->arch.pv_domain.gdt_ldt_l1tab = NULL; > > +} > > + > > +if ( d->arch.pv_domain.cpuidmasks )

Re: [Xen-devel] [PATCH for-next 6/8] x86/domain: factor out pv_domain_initialise

2017-04-24 Thread Jan Beulich
>>> On 10.04.17 at 15:27, wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -533,6 +533,58 @@ static void pv_domain_destroy(struct domain *d) > free_xenheap_page(d->arch.pv_domain.gdt_ldt_l1tab); > } > > +static int pv_domain_initialise(struct domain *d, unsigned int

[Xen-devel] [PATCH for-next 6/8] x86/domain: factor out pv_domain_initialise

2017-04-10 Thread Wei Liu
Lump everything PV related in arch_domain_create into pv_domain_initialise. Though domcr_flags is not necessary, the new function is given one to match hvm counterpart. Since it cleans up after itself there is no need to clean up in arch_domain_create in case of failure. No functional change. S