Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-12 Thread Yang Hongyang
On 05/11/2015 07:49 PM, Ian Campbell wrote: On Mon, 2015-05-11 at 12:47 +0100, Ian Campbell wrote: Actually this is another trick that I need to deal with those hypercall macros. DECLARE_HYPERCALL_BUFFER_SHADOW will define a user pointer dirty_bitmap and a shadow buffer, although

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-11 Thread Ian Campbell
On Mon, 2015-05-11 at 09:20 +0800, Hongyang Yang wrote: On 05/08/2015 06:08 PM, Andrew Cooper wrote: On 08/05/15 10:59, Hongyang Yang wrote: In general, a good change, but some comments... --- tools/libxc/xc_sr_save.c | 72 +---

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-11 Thread Ian Campbell
On Mon, 2015-05-11 at 12:47 +0100, Ian Campbell wrote: Actually this is another trick that I need to deal with those hypercall macros. DECLARE_HYPERCALL_BUFFER_SHADOW will define a user pointer dirty_bitmap and a shadow buffer, although xc_hypercall_buffer_free_pages takes

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-10 Thread Hongyang Yang
On 05/08/2015 06:08 PM, Andrew Cooper wrote: On 08/05/15 10:59, Hongyang Yang wrote: In general, a good change, but some comments... --- tools/libxc/xc_sr_save.c | 72 +--- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-08 Thread Hongyang Yang
On 05/08/2015 05:45 PM, Andrew Cooper wrote: On 08/05/15 10:33, Yang Hongyang wrote: introduce setup() and cleanup() which subsume the ctx-save.ops.{setup,cleanup}() calls and also do allocate/free necessary memory. The SHADOW_OP_OFF hypercall also included in the cleanup(). Signed-off-by:

[Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-08 Thread Yang Hongyang
introduce setup() and cleanup() which subsume the ctx-save.ops.{setup,cleanup}() calls and also do allocate/free necessary memory. The SHADOW_OP_OFF hypercall also included in the cleanup(). Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- tools/libxc/xc_sr_save.c | 72

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-08 Thread Andrew Cooper
On 08/05/15 10:33, Yang Hongyang wrote: introduce setup() and cleanup() which subsume the ctx-save.ops.{setup,cleanup}() calls and also do allocate/free necessary memory. The SHADOW_OP_OFF hypercall also included in the cleanup(). Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com I would

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

2015-05-08 Thread Andrew Cooper
On 08/05/15 10:59, Hongyang Yang wrote: In general, a good change, but some comments... --- tools/libxc/xc_sr_save.c | 72 +--- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/tools/libxc/xc_sr_save.c