From: Teck Choon Giam <giamteckchoon@gmail.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
"keir.xen@gmail.com" <keir.xen@gmail.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: backport requests for 4.x-testing
Date: Wed, 4 Apr 2012 03:50:49 +0800 [thread overview]
Message-ID: <CAEwRVpNqQXSYRJ-UeuQy98XqxeUs+btrvPCfHt==2eHSGLYPmg@mail.gmail.com> (raw)
In-Reply-To: <20347.11328.121224.686159@mariner.uk.xensource.com>
On Wed, Apr 4, 2012 at 12:58 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
> Teck Choon Giam writes ("Re: [Xen-devel] backport requests for 4.x-testing"):
>> On Tue, Apr 3, 2012 at 11:08 PM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
>> > I'm not really convinced that these are appropriate for backporting to
>> > a supposedly stable tree.
>>
>> What about the changeset 25131:6f81f4d79fde? It won't be able to
>> apply cleanly in xen-4.1-testing though and I can provide the backport
>> version for review if you give an OK?
>
> I would be happy to consider a backport of 25131, yes. You'll have to
> do some work as 4.1 doesn't have libxl_defbool_*.
Not just libxl_defbool_* but also couple others :p
Anyway, here is my backport which I have tested and worked as
described in http://lists.xen.org/archives/html/xen-devel/2012-03/msg01452.html
For your review and comments please.
libxl: support for "rtc_timeoffset" and "localtime"
Implement "rtc_timeoffset" and "localtime" options compatible as xm.
rtc_timeoffset is the offset between host time and guest time.
localtime means to specify whether the emulted RTC appears as UTC or is
offset by the host.
xen-unstable changeset: 25131:6f81f4d79fde
Signed-off-by: Giam Teck Choon <giamteckchoon@gmail.com>
---
tools/libxl/libxl.idl | 2 ++
tools/libxl/libxl_dom.c | 3 +++
tools/libxl/xl_cmdimpl.c | 13 +++++++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxl.idl b/tools/libxl/libxl.idl
index 377417a..3193506 100644
--- a/tools/libxl/libxl.idl
+++ b/tools/libxl/libxl.idl
@@ -94,6 +94,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
("target_memkb", uint32),
("video_memkb", uint32),
("shadow_memkb", uint32),
+ ("rtc_timeoffset", uint32),
+ ("localtime", bool),
("disable_migrate", bool),
("kernel", libxl_file_reference),
("cpuid", libxl_cpuid_policy_list),
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index c702cf7..7ab78db 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -76,6 +76,9 @@ int libxl__build_pre(libxl_ctx *ctx, uint32_t domid,
if ( info->disable_migrate )
xc_domain_disable_migrate(ctx->xch, domid);
+ if (info->rtc_timeoffset)
+ xc_domain_set_time_offset(ctx->xch, domid, info->rtc_timeoffset);
+
if (info->hvm) {
unsigned long shadow;
shadow = (info->shadow_memkb + 1023) / 1024;
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 2dbced7..74545a5 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -737,6 +737,19 @@ static void parse_config_data(const char
*configfile_filename_report,
if (!xlu_cfg_get_long(config, "tsc_mode", &l))
b_info->tsc_mode = l;
+ b_info->rtc_timeoffset = !xlu_cfg_get_long(config,
"rtc_timeoffset", &l) ? l : 0;
+
+ b_info->localtime = !xlu_cfg_get_long(config, "localtime", &l) ? l : 0;
+ if (b_info->localtime) {
+ time_t t;
+ struct tm *tm;
+
+ t = time(NULL);
+ tm = localtime(&t);
+
+ b_info->rtc_timeoffset += tm->tm_gmtoff;
+ }
+
if (!xlu_cfg_get_long (config, "videoram", &l))
b_info->video_memkb = l * 1024;
>
> Thanks,
> Ian.
Thanks.
Kindest regards,
Giam Teck Choon
next prev parent reply other threads:[~2012-04-03 19:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 10:13 backport requests for 4.x-testing Jan Beulich
2012-03-06 10:38 ` Keir Fraser
2012-03-06 11:04 ` Andrew Cooper
2012-03-07 7:25 ` Roderick Colenbrander
2012-03-07 9:43 ` Keir Fraser
2012-03-13 16:50 ` Ian Jackson
2012-03-13 17:25 ` Teck Choon Giam
2012-03-13 17:52 ` Teck Choon Giam
2012-03-13 18:23 ` Teck Choon Giam
2012-03-14 10:03 ` Ian Jackson
2012-03-14 9:58 ` Ian Jackson
2012-03-14 11:37 ` Ian Jackson
2012-03-14 23:08 ` Teck Choon Giam
2012-03-19 14:22 ` Teck Choon Giam
2012-04-03 15:04 ` Ian Jackson
2012-03-07 9:43 ` Keir Fraser
2012-03-07 10:44 ` Andrew Cooper
2012-03-07 10:59 ` Keir Fraser
2012-03-07 11:06 ` Jan Beulich
2012-03-07 11:08 ` Andrew Cooper
2012-03-07 19:38 ` Ian Campbell
2012-03-08 10:38 ` Andrew Cooper
2012-03-08 10:42 ` Keir Fraser
2012-03-13 16:52 ` Ian Jackson
2012-03-24 17:27 ` Konrad Rzeszutek Wilk
2012-03-29 9:22 ` Keir Fraser
2012-03-29 11:32 ` Teck Choon Giam
2012-03-29 11:42 ` Teck Choon Giam
2012-03-29 15:11 ` Konrad Rzeszutek Wilk
2012-03-29 15:26 ` Teck Choon Giam
2012-03-29 15:56 ` Konrad Rzeszutek Wilk
2012-03-29 16:20 ` Teck Choon Giam
2012-03-29 16:23 ` Konrad Rzeszutek Wilk
2012-03-29 16:39 ` Teck Choon Giam
2012-03-29 11:55 ` Stefano Stabellini
2012-03-29 15:31 ` Jan Beulich
2012-03-29 17:06 ` Stefano Stabellini
2012-03-30 8:23 ` Keir Fraser
2012-03-30 9:59 ` Stefano Stabellini
2012-04-03 15:08 ` Ian Jackson
2012-04-03 15:15 ` Teck Choon Giam
2012-04-03 16:58 ` Ian Jackson
2012-04-03 19:50 ` Teck Choon Giam [this message]
2012-04-03 20:02 ` Teck Choon Giam
2012-04-04 10:22 ` Ian Jackson
2012-04-04 12:54 ` Teck Choon Giam
2012-04-04 15:09 ` Ian Jackson
2012-03-07 9:18 ` Keir Fraser
2012-03-07 10:10 ` Jan Beulich
2012-03-08 10:00 ` Jan Beulich
2012-03-08 10:05 ` Keir Fraser
2012-03-08 10:45 ` Jan Beulich
2012-03-08 11:00 ` Keir Fraser
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='CAEwRVpNqQXSYRJ-UeuQy98XqxeUs+btrvPCfHt==2eHSGLYPmg@mail.gmail.com' \
--to=giamteckchoon@gmail.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=keir.xen@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
/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).