|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] libxl parser question
I'm currently working with xen-unstable changeset 25260:0f53540494f7
and trying to add a `vncviewer` type to the libxl_types.idl, but
having difficulties understanding the root of a failure that occurs
after I add my changes. Hopefully I enclose enough detail below, but
if not, I'm happy to provide more information.
I've created a small patch to add a 'vncviewer' bool type to the
configuration parser of xl and based these changes on the "localtime"
implementation part of c/s 25131, see below:
diff -r 0f53540494f7 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c Fri May 04 11:18:48 2012 +0100
+++ b/tools/libxl/libxl_create.c Sat May 05 21:27:41 2012 +0000
@@ -156,6 +156,7 @@ int libxl__domain_build_info_setdefault(
if (b_info->target_memkb == LIBXL_MEMKB_DEFAULT)
b_info->target_memkb = b_info->max_memkb;
+ libxl_defbool_setdefault(&b_info->vncviewer, false);
libxl_defbool_setdefault(&b_info->localtime, false);
libxl_defbool_setdefault(&b_info->disable_migrate, false);
diff -r 0f53540494f7 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl Fri May 04 11:18:48 2012 +0100
+++ b/tools/libxl/libxl_types.idl Sat May 05 21:27:41 2012 +0000
@@ -250,6 +250,7 @@ libxl_domain_build_info = Struct("domain
("video_memkb", MemKB),
("shadow_memkb", MemKB),
("rtc_timeoffset", uint32),
+ ("vncviewer", libxl_defbool),
("localtime", libxl_defbool),
("disable_migrate", libxl_defbool),
("cpuid", libxl_cpuid_policy_list),
diff -r 0f53540494f7 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Fri May 04 11:18:48 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c Sat May 05 21:27:41 2012 +0000
@@ -728,6 +728,7 @@ static void parse_config_data(const char
if (!xlu_cfg_get_long(config, "rtc_timeoffset", &l, 0))
b_info->rtc_timeoffset = l;
+ xlu_cfg_get_defbool(config, "vncviewer", &b_info->localtime, 0);
xlu_cfg_get_defbool(config, "localtime", &b_info->localtime, 0);
if (!xlu_cfg_get_long (config, "videoram", &l, 0))
The outcome of this patch when applied and compiled in is that xl
aborts during the parse_config_data() call in the create_domain().
# ./xl create win7
Parsing config file win7
Aborted
This abort is the `default` case in the switch at xl_cmdimpl.c:736,
which gets triggered from an erroneous b_info->type with a bogus value
of 0x84 (which is neither PV nor HVM.)
For reference, the backtrace is:
(gdb) bt
#0 0xb7fe2416 in __kernel_vsyscall ()
#1 0xb7e28781 in *__GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xb7e2bbb2 in *__GI_abort () at abort.c:92
#3 0x0804fe4b in parse_config_data (configfile_filename_report=<value
optimized out>, configfile_data=<value optimized out>,
configfile_len=250, d_config=0xbffff55c) at xl_cmdimpl.c:841
#4 0x080526ba in create_domain (dom_info=<value optimized out>) at
xl_cmdimpl.c:1646
#5 0x0805c098 in main_create (argc=2, argv=0xbffffcc8) at
xl_cmdimpl.c:3470
#6 0x0804cfe4 in main (argc=3, argv=0xbffffcc4) at xl.c:176
I've also attached the win7 config file which I'm using, in case this
is a side effect of something wrong in config file itself (I should
add that it's mostly copied from an example and it successfully
creates a win7 domain without my patch applied.)
Any guesses or suggestions how to troubleshoot this further would be
greatly appreciated.
Thanks,
Goncalo
Attachment:
win7 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |