All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Shriram Rajagopalan <rshriram@cs.ubc.ca>,
	Yang Hongyang <yanghy@cn.fujitsu.com>
Subject: Re: [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory
Date: Mon, 13 Apr 2015 19:51:41 -0400	[thread overview]
Message-ID: <552C568D.5000206@one.verizon.com> (raw)
In-Reply-To: <20150413162007.GJ17670@zion.uk.xensource.com>

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 <dslutz@verizon.com>
>> ---
>> To see the hvmloader loader issue:
>>
...
>>  
>> +/* 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, QEMU_SPARE_PAGES can be removed.
> Yes, please properly modify hvmloader to do this instead of trying to
> workaround this over and over again.

At some point I might get to this.

> But didn't Stefano make some changes to libxl too to handle the extra
> ram needed?

Not that I have seen.

>> + */
>> +#define QEMU_SPARE_PAGES 16
>> +
> This is still arbitrary and prone to breakage.

Yes, but turns out not to be the important part.

>
>>  struct restore_ctx {
>>      unsigned long max_mfn; /* max mfn of the current host machine */
>>      unsigned long hvirt_start; /* virtual starting address of the hypervisor */
>> @@ -209,12 +216,44 @@ static int uncanonicalize_pagetable(
>>          if (!ctx->hvm && ctx->superpages)
>>              rc = alloc_superpage_mfns(xch, dom, ctx, nr_mfns);
>>          else
>> +        {
...
>> +            }
> This is not maintainable. Trying to do smart things inside libxc
> without libxl knowing it is prone to breakage.

Some how I forgot to include that this is a bug in master
(4.6-unstable).  Much more info in
my reply to Andrew Cooper (short form below).


[root@dcs-xen-52 don]# xl cre -p /home/don/e1000x8.xfg
Parsing config from /home/don/e1000x8.xfg
got a tsc mode string: "native_paravirt"
[root@dcs-xen-52 don]# xl save e1000x8 e1000x8.save
Saving to e1000x8.save new xl format (info 0x1/0x0/3506)
xc: Saving memory: iter 0 (last sent 0 skipped 0): 1044481/1044481  100%
[root@dcs-xen-52 don]# xl restore e1000x8.save                          
Loading new save file e1000x8.save (new xl fmt info 0x1/0x0/3506)
 Savefile contains xl domain config in JSON format
Parsing config from <saved>
xc: error: Failed to allocate memory for batch.!: Internal error
libxl: error: libxl_create.c:1057:libxl__xc_domain_restore_done:
restoring domain: Cannot allocate memory
libxl: error: libxl_create.c:1129:domcreate_rebuild_done: cannot
(re-)build domain: -3
libxl: error: libxl.c:1576:libxl__destroy_domid: non-existant domain 2
libxl: error: libxl.c:1540:domain_destroy_callback: unable to destroy
guest with domid 2
libxl: error: libxl_create.c:1490:domcreate_destruction_cb: unable to
destroy domain 2 following failed creation
[root@dcs-xen-52 don]#                         


   -Don Slutz


> Wei.

  reply	other threads:[~2015-04-13 23:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 16:09 [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory Don Slutz
2015-04-13 16:20 ` Wei Liu
2015-04-13 23:51   ` Don Slutz [this message]
2015-04-13 16:25 ` Andrew Cooper
2015-04-13 23:51   ` Don Slutz
2015-04-14  8:53     ` Wei Liu
2015-04-14 17:34       ` Don Slutz
2015-04-14 17:51         ` Wei Liu
2015-04-15  9:46         ` Stefano Stabellini
2015-04-15 10:09           ` Ian Campbell
2015-04-15 11:15             ` Hongyang Yang
2015-04-15 11:27               ` Stefano Stabellini
2015-04-15 11:56                 ` Ian Campbell
2015-04-15 18:19                   ` Don Slutz
2015-04-14  8:53     ` Andrew Cooper
2015-04-14  9:22       ` Hongyang Yang
2015-04-14  9:28         ` Andrew Cooper
2015-04-14  9:42           ` Hongyang Yang
2015-04-15 14:32             ` Ian Campbell
2015-04-15 20:41               ` Don Slutz
2015-04-14  9:29         ` Wei Liu
2015-04-14  9:40           ` Hongyang Yang
2015-04-14  9:52             ` Wei Liu
2015-04-14 17:43               ` Don Slutz
2015-04-14 17:54                 ` Wei Liu
2015-04-14 22:06                   ` [PATCH v2 1/1] tools: Handle xc_maxmem adjustments Don Slutz
2015-04-15  9:53                     ` Andrew Cooper
2015-04-15  9:57                       ` Stefano Stabellini
2015-04-15 10:03                         ` Andrew Cooper
2015-04-15 10:21                           ` George Dunlap
2015-04-15 11:48                           ` Stefano Stabellini
2015-04-15 21:43                             ` Don Slutz
2015-04-15 10:16                       ` George Dunlap
2015-04-15 10:25                         ` George Dunlap
2015-04-15 10:30                           ` Andrew Cooper
2015-04-15 14:34                   ` [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory Ian Campbell
2015-04-15 16:36                     ` Wei Liu
2015-04-15 16:45                       ` Ian Campbell
2015-04-15 16:52                         ` Wei Liu
2015-04-15 18:24                           ` Don Slutz
2015-04-16  9:00                           ` Ian Campbell
2015-04-16  9:14                             ` George Dunlap
2015-04-16  9:29                               ` Ian Campbell
2015-04-14  3:46 ` Hongyang Yang
2015-04-14  8:46   ` Wei Liu
2015-04-15 14:30 ` Ian Campbell
2015-04-15 18:17   ` Don Slutz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=552C568D.5000206@one.verizon.com \
    --to=dslutz@verizon.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.