From: Yu Zhiguo <yuzg@cn.fujitsu.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: [PATCH] xl: Fix missing memory target in xenstore
Date: Fri, 14 May 2010 10:15:15 +0800 [thread overview]
Message-ID: <4BECB233.9040300@cn.fujitsu.com> (raw)
In-Reply-To: <4BEA4D81.40908@cn.fujitsu.com>
Yu Zhiguo wrote:
>
> It seems than /local/domain/$domid/memory/target cannot be created when use 'xl create',
> only /local/domain/0/memory/static-max is existent.
> Isn't it a bug? I'll check the code.
>
> I think it should be created like static-max.
> * memory/target can be created when use 'xm create'
/local/domain/$domid/memory/target should be
created in xenstore when domain is created.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
diff -r d77a88f938c6 -r 3b473b9417e9 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c Tue May 11 14:05:28 2010 +0100
+++ b/tools/libxl/libxl_dom.c Fri May 14 18:15:02 2010 +0800
@@ -100,22 +100,22 @@
xc_cpuid_apply_policy(ctx->xch, domid);
#endif
- ents = libxl_calloc(ctx, (10 + info->max_vcpus) * 2, sizeof(char *));
+ ents = libxl_calloc(ctx, (12 + info->max_vcpus) * 2, sizeof(char *));
ents[0] = "memory/static-max";
ents[1] = libxl_sprintf(ctx, "%d", info->max_memkb);
ents[2] = "memory/target";
ents[3] = libxl_sprintf(ctx, "%d", info->target_memkb);
- ents[2] = "memory/videoram";
- ents[3] = libxl_sprintf(ctx, "%d", info->video_memkb);
- ents[4] = "domid";
- ents[5] = libxl_sprintf(ctx, "%d", domid);
- ents[6] = "store/port";
- ents[7] = libxl_sprintf(ctx, "%"PRIu32, state->store_port);
- ents[8] = "store/ring-ref";
- ents[9] = libxl_sprintf(ctx, "%lu", state->store_mfn);
+ ents[4] = "memory/videoram";
+ ents[5] = libxl_sprintf(ctx, "%d", info->video_memkb);
+ ents[6] = "domid";
+ ents[7] = libxl_sprintf(ctx, "%d", domid);
+ ents[8] = "store/port";
+ ents[9] = libxl_sprintf(ctx, "%"PRIu32, state->store_port);
+ ents[10] = "store/ring-ref";
+ ents[11] = libxl_sprintf(ctx, "%lu", state->store_mfn);
for (i = 0; i < info->max_vcpus; i++) {
- ents[10+(i*2)] = libxl_sprintf(ctx, "cpu/%d/availability", i);
- ents[10+(i*2)+1] = (i && info->cur_vcpus && (i >= info->cur_vcpus))
+ ents[12+(i*2)] = libxl_sprintf(ctx, "cpu/%d/availability", i);
+ ents[12+(i*2)+1] = (i && info->cur_vcpus && (i >= info->cur_vcpus))
? "offline" : "online";
}
next prev parent reply other threads:[~2010-05-14 2:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 9:39 [PATCH] xl: Update memory info in xenstore when use 'xl mem-set' Yu Zhiguo
2010-05-07 17:42 ` Ian Jackson
2010-05-09 8:45 ` Yu Zhiguo
2010-05-12 6:26 ` [PATCH 0/2] xl: Add subcommand mem-max and fix mem-set Yu Zhiguo
2010-05-12 6:41 ` Yu Zhiguo
2010-05-12 11:33 ` Stefano Stabellini
2010-05-12 11:39 ` Stefano Stabellini
2010-05-14 2:15 ` Yu Zhiguo [this message]
2010-05-12 15:33 ` Jonathan Knowles
2010-05-13 12:21 ` Stefano Stabellini
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=4BECB233.9040300@cn.fujitsu.com \
--to=yuzg@cn.fujitsu.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=keir.fraser@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).