Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 17:45, wrote: > "Jan Beulich" writes: > > On 13.01.15 at 17:17, wrote: >>> Ian Campbell writes: An alternative approach to this might be to walk the guest p2m (with appropriate continuations) and move each domheap page (this would also help us preserve sup

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 13.01.15 at 17:17, wrote: >> Ian Campbell writes: >>> An alternative approach to this might be to walk the guest p2m (with >>> appropriate continuations) and move each domheap page (this would also >>> help us preserve super page mappings). It would also have the a

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 17:17 +0100, Vitaly Kuznetsov wrote: > Ian Campbell writes: > > > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > >> +gmfn = mfn_to_gmfn(d, mfn); > > > > (I haven't thought about it super hard, but I'm taking it as given that > > this approach to kex

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 17:17, wrote: > Ian Campbell writes: >> An alternative approach to this might be to walk the guest p2m (with >> appropriate continuations) and move each domheap page (this would also >> help us preserve super page mappings). It would also have the advantage >> of not needing ad

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Vitaly Kuznetsov
Ian Campbell writes: > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: >> +gmfn = mfn_to_gmfn(d, mfn); > > (I haven't thought about it super hard, but I'm taking it as given that > this approach to kexec is going to be needed for ARM too, since that > seems likely) > > mfn_

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Tim Deegan
At 13:53 + on 13 Jan (1421153637), Ian Campbell wrote: > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > > +gmfn = mfn_to_gmfn(d, mfn); > > (I haven't thought about it super hard, but I'm taking it as given that > this approach to kexec is going to be needed for ARM to

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > +gmfn = mfn_to_gmfn(d, mfn); (I haven't thought about it super hard, but I'm taking it as given that this approach to kexec is going to be needed for ARM too, since that seems likely) mfn_to_gmfn is going to be a bit pricey

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-18 at 13:57 +, Jan Beulich wrote: > >>> On 11.12.14 at 14:45, wrote: > > --- a/xen/common/domctl.c > > +++ b/xen/common/domctl.c > > @@ -1177,6 +1177,39 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) > > u_domctl) > > } > > break; > > > > +case XEN_DOMC

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-18 Thread Jan Beulich
>>> On 11.12.14 at 14:45, wrote: > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -1177,6 +1177,39 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) > u_domctl) > } > break; > > +case XEN_DOMCTL_devour: > +{ > +struct domain *recipient_dom; > + > +

[Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-11 Thread Vitaly Kuznetsov
New operation sets the 'recipient' domain which will receive all memory pages from a particular domain and kills the original domain. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 3 +++ xen/common/domctl.c | 33 + xen/common/page_allo