Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 9:17 AM Tamas K Lengyel wrote: > > On Wed, Feb 26, 2020 at 9:10 AM Roger Pau Monné wrote: > > > > On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > > > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné > > > wrote: > > > > > > > > On Wed, Feb 26, 2020 at

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 9:10 AM Roger Pau Monné wrote: > > On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné > > wrote: > > > > > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > > > +static int

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné wrote: > > > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > > +static int populate_special_pages(struct domain *cd) > > > > > +{ > > > > > +struct

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné wrote: > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > +static int populate_special_pages(struct domain *cd) > > > > +{ > > > > +struct p2m_domain *p2m = p2m_get_hostp2m(cd); > > > > +static const unsigned int

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > +static int populate_special_pages(struct domain *cd) > > > +{ > > > +struct p2m_domain *p2m = p2m_get_hostp2m(cd); > > > +static const unsigned int params[] = > > > +{ > > > +HVM_PARAM_STORE_PFN, > > > +

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Tamas K Lengyel
> > +if ( (ret = cpupool_move_domain(cd, d->cpupool)) ) > > +return ret; > > You can join both ifs into a single one, since both return ret. Sure. > > + > > +for ( i = 0; i < cd->max_vcpus; i++ ) > > +{ > > +mfn_t vcpu_info_mfn; > > + > > +if ( !d->vcpu[i] ||

Re: [Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-26 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 11:17:55AM -0800, Tamas K Lengyel wrote: > VM forking is the process of creating a domain with an empty memory space and > a > parent domain specified from which to populate the memory when necessary. For > the new domain to be functional the VM state is copied over as

[Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
VM forking is the process of creating a domain with an empty memory space and a parent domain specified from which to populate the memory when necessary. For the new domain to be functional the VM state is copied over as part of the fork operation (HVM params, hap allocation, etc). Signed-off-by: