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 too,

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, vkuzn...@redhat.com 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

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

2015-01-13 Thread Vitaly Kuznetsov
Ian Campbell ian.campb...@citrix.com 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

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, vkuzn...@redhat.com wrote: Ian Campbell ian.campb...@citrix.com 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

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 ian.campb...@citrix.com 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

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

2015-01-13 Thread Vitaly Kuznetsov
Jan Beulich jbeul...@suse.com writes: On 13.01.15 at 17:17, vkuzn...@redhat.com wrote: Ian Campbell ian.campb...@citrix.com 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

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, vkuzn...@redhat.com wrote: Jan Beulich jbeul...@suse.com writes: On 13.01.15 at 17:17, vkuzn...@redhat.com wrote: Ian Campbell ian.campb...@citrix.com writes: An alternative approach to this might be to walk the guest p2m (with appropriate continuations) and move each

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, vkuzn...@redhat.com 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 vkuzn...@redhat.com --- xen/common/domain.c | 3 +++ xen/common/domctl.c | 33 +