Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-16 Thread Ian Campbell
On Thu, 2015-04-16 at 10:14 +0100, George Dunlap wrote: > On 04/16/2015 10:00 AM, Ian Campbell wrote: > > On Wed, 2015-04-15 at 17:52 +0100, Wei Liu wrote: > >> On Wed, Apr 15, 2015 at 05:45:15PM +0100, Ian Campbell wrote: > >>> On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: > On Wed, Apr 1

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-16 Thread George Dunlap
On 04/16/2015 10:00 AM, Ian Campbell wrote: > On Wed, 2015-04-15 at 17:52 +0100, Wei Liu wrote: >> On Wed, Apr 15, 2015 at 05:45:15PM +0100, Ian Campbell wrote: >>> On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: > On Tue, 201

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-16 Thread Ian Campbell
On Wed, 2015-04-15 at 17:52 +0100, Wei Liu wrote: > On Wed, Apr 15, 2015 at 05:45:15PM +0100, Ian Campbell wrote: > > On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: > > > On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: > > > > On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > > >

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Don Slutz
On 04/15/15 10:32, Ian Campbell wrote: > On Tue, 2015-04-14 at 17:42 +0800, Hongyang Yang wrote: >> >> On 04/14/2015 05:28 PM, Andrew Cooper wrote: > >>> Funny you should ask that. Migrationv2 for libxl moves the JSON config >>> blob into the libxl stream, rather than being a singleshot action at

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Don Slutz
On 04/15/15 12:52, Wei Liu wrote: > On Wed, Apr 15, 2015 at 05:45:15PM +0100, Ian Campbell wrote: >> On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: >>> On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > Let's see if we can r

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Don Slutz
On 04/15/15 07:56, Ian Campbell wrote: > On Wed, 2015-04-15 at 12:27 +0100, Stefano Stabellini wrote: >> On Wed, 15 Apr 2015, Hongyang Yang wrote: >>> On 04/15/2015 06:09 PM, Ian Campbell wrote: On Wed, 2015-04-15 at 10:46 +0100, Stefano Stabellini wrote: > On Tue, 14 Apr 2015, Don Slutz w

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Don Slutz
On 04/15/15 10:30, Ian Campbell wrote: > On Mon, 2015-04-13 at 12:09 -0400, Don Slutz wrote: >> >> +/* Leave some slack so that hvmloader does not complain about lack of >> + * memory at boot time ("Could not allocate order=0 extent"). >> + * Once hvmloader is modified to cope with that situation

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Wei Liu
On Wed, Apr 15, 2015 at 05:45:15PM +0100, Ian Campbell wrote: > On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: > > On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: > > > On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > > > > Let's see if we can record this in xc image format. I h

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Wed, 2015-04-15 at 17:36 +0100, Wei Liu wrote: > On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: > > On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > > > Let's see if we can record this in xc image format. I haven't looked, > > > but George mentioned that it might be possible to

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Wei Liu
On Wed, Apr 15, 2015 at 03:34:48PM +0100, Ian Campbell wrote: > On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > > Let's see if we can record this in xc image format. I haven't looked, > > but George mentioned that it might be possible to do so. > > Can this not be done at the save stage in the

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Tue, 2015-04-14 at 18:54 +0100, Wei Liu wrote: > Let's see if we can record this in xc image format. I haven't looked, > but George mentioned that it might be possible to do so. Can this not be done at the save stage in the bit where we update the JSON to reflect the actual configuration? Ian.

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Tue, 2015-04-14 at 17:42 +0800, Hongyang Yang wrote: > > On 04/14/2015 05:28 PM, Andrew Cooper wrote: > > Funny you should ask that. Migrationv2 for libxl moves the JSON config > > blob into the libxl stream, rather than being a singleshot action at the > > very start. From that point, it be

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Mon, 2015-04-13 at 12:09 -0400, Don Slutz wrote: > > +/* Leave some slack so that hvmloader does not complain about lack of > + * memory at boot time ("Could not allocate order=0 extent"). > + * Once hvmloader is modified to cope with that situation without > + * printing warning messages, QEM

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Wed, 2015-04-15 at 12:27 +0100, Stefano Stabellini wrote: > On Wed, 15 Apr 2015, Hongyang Yang wrote: > > On 04/15/2015 06:09 PM, Ian Campbell wrote: > > > On Wed, 2015-04-15 at 10:46 +0100, Stefano Stabellini wrote: > > > > On Tue, 14 Apr 2015, Don Slutz wrote: > > > > > On 04/14/15 04:53, Wei

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Stefano Stabellini
On Wed, 15 Apr 2015, Hongyang Yang wrote: > On 04/15/2015 06:09 PM, Ian Campbell wrote: > > On Wed, 2015-04-15 at 10:46 +0100, Stefano Stabellini wrote: > > > On Tue, 14 Apr 2015, Don Slutz wrote: > > > > On 04/14/15 04:53, Wei Liu wrote: > > > > > Is there a way to know how much more memory each o

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Hongyang Yang
On 04/15/2015 06:09 PM, Ian Campbell wrote: On Wed, 2015-04-15 at 10:46 +0100, Stefano Stabellini wrote: On Tue, 14 Apr 2015, Don Slutz wrote: On 04/14/15 04:53, Wei Liu wrote: Is there a way to know how much more memory each option rom needs? If so, you can correctly account for the extra m

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Ian Campbell
On Wed, 2015-04-15 at 10:46 +0100, Stefano Stabellini wrote: > On Tue, 14 Apr 2015, Don Slutz wrote: > > On 04/14/15 04:53, Wei Liu wrote: > > > Is there a way to know how much more memory each option rom needs? If > > > so, you can correctly account for the extra memory you need. This would > > >

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-15 Thread Stefano Stabellini
On Tue, 14 Apr 2015, Don Slutz wrote: > On 04/14/15 04:53, Wei Liu wrote: > > Is there a way to know how much more memory each option rom needs? If > > so, you can correctly account for the extra memory you need. This would > > be an ideal fix to this problem. > > I do not know of a way to get thi

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Tue, Apr 14, 2015 at 01:43:38PM -0400, Don Slutz wrote: > On 04/14/15 05:52, Wei Liu wrote: > > On Tue, Apr 14, 2015 at 05:40:24PM +0800, Hongyang Yang wrote: > >> > >> On 04/14/2015 05:29 PM, Wei Liu wrote: > >>> On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote: > >>> [...] > >

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Tue, Apr 14, 2015 at 01:34:43PM -0400, Don Slutz wrote: > On 04/14/15 04:53, Wei Liu wrote: > > On Mon, Apr 13, 2015 at 07:51:31PM -0400, Don Slutz wrote: > >> On 04/13/15 12:25, Andrew Cooper wrote: > >>> On 13/04/15 17:09, Don Slutz wrote: > If QEMU has called on xc_domain_setmaxmem to ad

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Don Slutz
On 04/14/15 05:52, Wei Liu wrote: > On Tue, Apr 14, 2015 at 05:40:24PM +0800, Hongyang Yang wrote: >> >> On 04/14/2015 05:29 PM, Wei Liu wrote: >>> On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote: >>> [...] > If I understand correctly, the steps are this: > > * 'xl create'

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Don Slutz
On 04/14/15 04:53, Wei Liu wrote: > On Mon, Apr 13, 2015 at 07:51:31PM -0400, Don Slutz wrote: >> On 04/13/15 12:25, Andrew Cooper wrote: >>> On 13/04/15 17:09, Don Slutz wrote: If QEMU has called on xc_domain_setmaxmem to add more memory for option ROMs, domain restore needs to also incr

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Tue, Apr 14, 2015 at 05:40:24PM +0800, Hongyang Yang wrote: > > > On 04/14/2015 05:29 PM, Wei Liu wrote: > >On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote: > >[...] > >>>If I understand correctly, the steps are this: > >>> > >>>* 'xl create' makes a VM of size $FOO > >>>* qemu b

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Hongyang Yang
On 04/14/2015 05:28 PM, Andrew Cooper wrote: On 14/04/15 10:22, Hongyang Yang wrote: On 04/14/2015 04:53 PM, Andrew Cooper wrote: On 14/04/15 00:51, Don Slutz wrote: On 04/13/15 12:25, Andrew Cooper wrote: On 13/04/15 17:09, Don Slutz wrote: If QEMU has called on xc_domain_setmaxmem to a

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Hongyang Yang
On 04/14/2015 05:29 PM, Wei Liu wrote: On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote: [...] If I understand correctly, the steps are this: * 'xl create' makes a VM of size $FOO * qemu bumps the size to $FOO+$N * 'xl save' writes $FOO+$N of page data, but the xl config file at

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote: [...] > >If I understand correctly, the steps are this: > > > >* 'xl create' makes a VM of size $FOO > >* qemu bumps the size to $FOO+$N > >* 'xl save' writes $FOO+$N of page data, but the xl config file at the > >start of the image sti

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Andrew Cooper
On 14/04/15 10:22, Hongyang Yang wrote: > > > On 04/14/2015 04:53 PM, Andrew Cooper wrote: >> On 14/04/15 00:51, Don Slutz wrote: >>> On 04/13/15 12:25, Andrew Cooper wrote: On 13/04/15 17:09, Don Slutz wrote: > If QEMU has called on xc_domain_setmaxmem to add more memory for > option

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Hongyang Yang
On 04/14/2015 04:53 PM, Andrew Cooper wrote: On 14/04/15 00:51, Don Slutz wrote: On 04/13/15 12:25, Andrew Cooper wrote: On 13/04/15 17:09, Don Slutz wrote: If QEMU has called on xc_domain_setmaxmem to add more memory for option ROMs, domain restore needs to also increase the memory. Signed

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Andrew Cooper
On 14/04/15 00:51, Don Slutz wrote: > On 04/13/15 12:25, Andrew Cooper wrote: >> On 13/04/15 17:09, Don Slutz wrote: >>> If QEMU has called on xc_domain_setmaxmem to add more memory for >>> option ROMs, domain restore needs to also increase the memory. >>> >>> Signed-off-by: Don Slutz >> hvmloader

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Mon, Apr 13, 2015 at 07:51:31PM -0400, Don Slutz wrote: > On 04/13/15 12:25, Andrew Cooper wrote: > > On 13/04/15 17:09, Don Slutz wrote: > >> If QEMU has called on xc_domain_setmaxmem to add more memory for > >> option ROMs, domain restore needs to also increase the memory. > >> > >> Signed-off

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-14 Thread Wei Liu
On Tue, Apr 14, 2015 at 11:46:55AM +0800, Hongyang Yang wrote: > This patch also fix a triple fault when guests running under COLO mode. > (XEN) d0v1 Over-allocation for domain 1: 524545 > 524544 > (XEN) memory.c:155:d0v1 Could not allocate order=0 extent: id=1 memflags=0 > (181 of 235) > (XEN) d1v

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Hongyang Yang
This patch also fix a triple fault when guests running under COLO mode. (XEN) d0v1 Over-allocation for domain 1: 524545 > 524544 (XEN) memory.c:155:d0v1 Could not allocate order=0 extent: id=1 memflags=0 (181 of 235) (XEN) d1v1 Triple fault - invoking HVM shutdown action 1 On 04/14/2015 12:09 A

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Don Slutz
On 04/13/15 12:25, Andrew Cooper wrote: > On 13/04/15 17:09, Don Slutz wrote: >> If QEMU has called on xc_domain_setmaxmem to add more memory for >> option ROMs, domain restore needs to also increase the memory. >> >> Signed-off-by: Don Slutz > hvmloader has no interaction with xc_domain_restore()

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Don Slutz
On 04/13/15 12:20, Wei Liu wrote: > On Mon, Apr 13, 2015 at 12:09:13PM -0400, Don Slutz wrote: >> If QEMU has called on xc_domain_setmaxmem to add more memory for >> option ROMs, domain restore needs to also increase the memory. >> >> Signed-off-by: Don Slutz >> --- >> To see the hvmloader loader

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Wei Liu
On Mon, Apr 13, 2015 at 12:09:13PM -0400, Don Slutz wrote: > If QEMU has called on xc_domain_setmaxmem to add more memory for > option ROMs, domain restore needs to also increase the memory. > > Signed-off-by: Don Slutz > --- > To see the hvmloader loader issue: > > xl cre -p e1000x8.xfg > x

Re: [Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Andrew Cooper
On 13/04/15 17:09, Don Slutz wrote: > If QEMU has called on xc_domain_setmaxmem to add more memory for > option ROMs, domain restore needs to also increase the memory. > > Signed-off-by: Don Slutz hvmloader has no interaction with xc_domain_restore(). It is xl's job to propagate the current memo

[Xen-devel] [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory

2015-04-13 Thread Don Slutz
If QEMU has called on xc_domain_setmaxmem to add more memory for option ROMs, domain restore needs to also increase the memory. Signed-off-by: Don Slutz --- To see the hvmloader loader issue: xl cre -p e1000x8.xfg xl save e1000x8 e1000x8.save xl restore e1000x8.save With e1000x8.xfg: