Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-26 Thread Ian Campbell
On Tue, 2014-11-25 at 11:15 +, Wei Liu wrote: This will result in assertion in libxl_set_vcpuaffinity()-libxl_bitmap_copy() since the destination bitmap is created for maximum number of CPUs. FYI I'm also seeing this with libvirt (on ARM, but I don't think that matters) when the guest XML

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-25 Thread Dario Faggioli
On Mon, 2014-11-24 at 10:48 -0500, Boris Ostrovsky wrote: On 11/24/2014 05:47 AM, Wei Liu wrote: The partial copy function should explicitly zero-out all remaining bits. I actually thought that partial copy function should do just that --- copy bits that it has and leave others

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-25 Thread Wei Liu
And here it is. Boris, can you give it a shot? ---8--- From 77531e31d239887b9f36c03e434300bc30683092 Mon Sep 17 00:00:00 2001 From: Wei Liu wei.l...@citrix.com Date: Tue, 25 Nov 2014 10:59:47 + Subject: [PATCH] libxl: allow copying between bitmaps of different sizes When parsing bitmap

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-25 Thread Dario Faggioli
On Tue, 2014-11-25 at 11:15 +, Wei Liu wrote: And here it is. Boris, can you give it a shot? ---8--- From 77531e31d239887b9f36c03e434300bc30683092 Mon Sep 17 00:00:00 2001 From: Wei Liu wei.l...@citrix.com Date: Tue, 25 Nov 2014 10:59:47 + Subject: [PATCH] libxl: allow copying

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-25 Thread Boris Ostrovsky
On 11/25/2014 06:41 AM, Dario Faggioli wrote: On Tue, 2014-11-25 at 11:15 +, Wei Liu wrote: And here it is. Boris, can you give it a shot? ---8--- From 77531e31d239887b9f36c03e434300bc30683092 Mon Sep 17 00:00:00 2001 From: Wei Liu wei.l...@citrix.com Date: Tue, 25 Nov 2014 10:59:47

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-25 Thread Konrad Rzeszutek Wilk
On Tue, Nov 25, 2014 at 09:57:54AM -0500, Boris Ostrovsky wrote: On 11/25/2014 06:41 AM, Dario Faggioli wrote: On Tue, 2014-11-25 at 11:15 +, Wei Liu wrote: And here it is. Boris, can you give it a shot? ---8--- From 77531e31d239887b9f36c03e434300bc30683092 Mon Sep 17 00:00:00 2001

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-24 Thread Wei Liu
On Thu, Nov 20, 2014 at 04:27:34PM -0500, Boris Ostrovsky wrote: When parsing bitmap objects JSON parser will create libxl_bitmap map of the smallest size needed. This can cause problems when saved image file specifies CPU affinity. For example, if 'vcpu_hard_affinity' in the saved image has

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-24 Thread Wei Liu
CC'ing Dario... On Mon, Nov 24, 2014 at 10:41:27AM +, Wei Liu wrote: On Thu, Nov 20, 2014 at 04:27:34PM -0500, Boris Ostrovsky wrote: When parsing bitmap objects JSON parser will create libxl_bitmap map of the smallest size needed. This can cause problems when saved image file

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-21 Thread Boris Ostrovsky
On 11/21/2014 06:12 AM, Wei Liu wrote: On Thu, Nov 20, 2014 at 04:27:34PM -0500, Boris Ostrovsky wrote: When parsing bitmap objects JSON parser will create libxl_bitmap map of the smallest size needed. This can cause problems when saved image file specifies CPU affinity. For example, if

Re: [Xen-devel] [PATCH for-xen-4.5] libxl: Allow copying smaller bitmap into a larger one

2014-11-21 Thread Boris Ostrovsky
On 11/21/2014 06:26 AM, Dario Faggioli wrote: On Thu, 2014-11-20 at 16:27 -0500, Boris Ostrovsky wrote: diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index 58df4f3..2a08bef 100644 --- a/tools/libxl/libxl_utils.c +++ b/tools/libxl/libxl_utils.c @@ -614,6 +614,13 @@ void