[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 15 of 23] libxl: make boolean members of libxl_domain_create_info into libxl_defbool
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1329148141 0 # Node ID ca432f4ad9f58b0a0a87045a680e37a123bbda11 # Parent a20f15f1889ba1dda88d64509694818a0793cf8a libxl: make boolean members of libxl_domain_create_info into libxl_defbool This allows them to be set via the _init/_setdefault methods. This just covers the obvious ones. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_bootloader.c --- a/tools/libxl/libxl_bootloader.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_bootloader.c Mon Feb 13 15:49:01 2012 +0000 @@ -352,6 +352,9 @@ int libxl_run_bootloader(libxl_ctx *ctx, if (info->type != LIBXL_DOMAIN_TYPE_PV || !info->u.pv.bootloader) goto out; + rc = libxl__domain_build_info_setdefault(gc, info); + if (rc) goto out; + rc = ERROR_INVAL; if (!disk) goto out; diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_create.c Mon Feb 13 15:49:01 2012 +0000 @@ -73,7 +73,6 @@ void libxl_domain_build_info_init(libxl_ const libxl_domain_create_info *c_info) { memset(b_info, '\0', sizeof(*b_info)); - b_info->disable_migrate = 0; b_info->cpuid = NULL; b_info->type = c_info->type; @@ -88,17 +87,7 @@ void libxl_domain_build_info_init(libxl_ switch (b_info->type) { case LIBXL_DOMAIN_TYPE_HVM: b_info->u.hvm.firmware = NULL; - b_info->u.hvm.pae = 1; - b_info->u.hvm.apic = 1; - b_info->u.hvm.acpi = 1; - b_info->u.hvm.acpi_s3 = 1; - b_info->u.hvm.acpi_s4 = 1; - b_info->u.hvm.nx = 1; - b_info->u.hvm.viridian = 0; - b_info->u.hvm.hpet = 1; - b_info->u.hvm.vpt_align = 1; b_info->u.hvm.timer_mode = LIBXL_TIMER_MODE_DEFAULT; - b_info->u.hvm.nested_hvm = 0; b_info->u.hvm.no_incr_generationid = 0; b_info->u.hvm.stdvga = 0; @@ -106,9 +95,7 @@ void libxl_domain_build_info_init(libxl_ b_info->u.hvm.vnc.display = 0; b_info->u.hvm.vnc.findunused = 1; b_info->u.hvm.serial = NULL; - b_info->u.hvm.usb = 0; b_info->u.hvm.usbdevice = NULL; - b_info->u.hvm.xen_platform_pci = 1; break; case LIBXL_DOMAIN_TYPE_PV: b_info->u.pv.slack_memkb = 0; @@ -141,6 +128,8 @@ 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->disable_migrate, false); + switch (b_info->type) { case LIBXL_DOMAIN_TYPE_HVM: if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) @@ -151,6 +140,19 @@ int libxl__domain_build_info_setdefault( b_info->u.hvm.timer_mode = LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS; + libxl_defbool_setdefault(&b_info->u.hvm.pae, true); + libxl_defbool_setdefault(&b_info->u.hvm.apic, true); + libxl_defbool_setdefault(&b_info->u.hvm.acpi, true); + libxl_defbool_setdefault(&b_info->u.hvm.acpi_s3, true); + libxl_defbool_setdefault(&b_info->u.hvm.acpi_s4, true); + libxl_defbool_setdefault(&b_info->u.hvm.nx, true); + libxl_defbool_setdefault(&b_info->u.hvm.viridian, false); + libxl_defbool_setdefault(&b_info->u.hvm.hpet, true); + libxl_defbool_setdefault(&b_info->u.hvm.vpt_align, true); + libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm, false); + libxl_defbool_setdefault(&b_info->u.hvm.usb, false); + libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci, true); + if (!b_info->u.hvm.boot) { b_info->u.hvm.boot = strdup("cda"); if (!b_info->u.hvm.boot) return ERROR_NOMEM; @@ -165,6 +167,7 @@ int libxl__domain_build_info_setdefault( break; case LIBXL_DOMAIN_TYPE_PV: + libxl_defbool_setdefault(&b_info->u.pv.e820_host, false); if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) b_info->shadow_memkb = 0; if (b_info->u.pv.slack_memkb == LIBXL_MEMKB_DEFAULT) @@ -220,11 +223,11 @@ int libxl__domain_build(libxl__gc *gc, localents = libxl__calloc(gc, 7, sizeof(char *)); localents[0] = "platform/acpi"; - localents[1] = (info->u.hvm.acpi) ? "1" : "0"; + localents[1] = libxl_defbool_val(info->u.hvm.acpi) ? "1" : "0"; localents[2] = "platform/acpi_s3"; - localents[3] = (info->u.hvm.acpi_s3) ? "1" : "0"; + localents[3] = libxl_defbool_val(info->u.hvm.acpi_s3) ? "1" : "0"; localents[4] = "platform/acpi_s4"; - localents[5] = (info->u.hvm.acpi_s4) ? "1" : "0"; + localents[5] = libxl_defbool_val(info->u.hvm.acpi_s4) ? "1" : "0"; break; case LIBXL_DOMAIN_TYPE_PV: @@ -426,7 +429,6 @@ retry_transaction: xs_rm(ctx->xsh, t, dom_path); libxl__xs_mkdir(gc, t, dom_path, roperm, ARRAY_SIZE(roperm)); - xs_rm(ctx->xsh, t, vm_path); libxl__xs_mkdir(gc, t, vm_path, roperm, ARRAY_SIZE(roperm)); @@ -673,7 +675,7 @@ static int do_domain_create(libxl__gc *g } if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_PV && - d_config->b_info.u.pv.e820_host) { + libxl_defbool_val(d_config->b_info.u.pv.e820_host)) { int rc; rc = libxl__e820_alloc(gc, domid, d_config); if (rc) diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_dm.c Mon Feb 13 15:49:01 2012 +0000 @@ -192,7 +192,7 @@ static char ** libxl__build_device_model if (b_info->u.hvm.boot) { flexarray_vappend(dm_args, "-boot", b_info->u.hvm.boot, NULL); } - if (b_info->u.hvm.usb || b_info->u.hvm.usbdevice) { + if (libxl_defbool_val(b_info->u.hvm.usb) || b_info->u.hvm.usbdevice) { flexarray_append(dm_args, "-usb"); if (b_info->u.hvm.usbdevice) { flexarray_vappend(dm_args, @@ -202,7 +202,7 @@ static char ** libxl__build_device_model if (b_info->u.hvm.soundhw) { flexarray_vappend(dm_args, "-soundhw", b_info->u.hvm.soundhw, NULL); } - if (b_info->u.hvm.acpi) { + if (libxl_defbool_val(b_info->u.hvm.acpi)) { flexarray_append(dm_args, "-acpi"); } if (b_info->max_vcpus > 1) { @@ -427,7 +427,7 @@ static char ** libxl__build_device_model flexarray_vappend(dm_args, "-boot", libxl__sprintf(gc, "order=%s", b_info->u.hvm.boot), NULL); } - if (b_info->u.hvm.usb || b_info->u.hvm.usbdevice) { + if (libxl_defbool_val(b_info->u.hvm.usb) || b_info->u.hvm.usbdevice) { flexarray_append(dm_args, "-usb"); if (b_info->u.hvm.usbdevice) { flexarray_vappend(dm_args, @@ -437,7 +437,7 @@ static char ** libxl__build_device_model if (b_info->u.hvm.soundhw) { flexarray_vappend(dm_args, "-soundhw", b_info->u.hvm.soundhw, NULL); } - if (!b_info->u.hvm.acpi) { + if (!libxl_defbool_val(b_info->u.hvm.acpi)) { flexarray_append(dm_args, "-no-acpi"); } if (b_info->max_vcpus > 1) { @@ -939,7 +939,7 @@ int libxl__create_device_model(libxl__gc b_info->device_model_version == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/disable_pf", path), - "%d", !b_info->u.hvm.xen_platform_pci); + "%d", !libxl_defbool_val(b_info->u.hvm.xen_platform_pci)); libxl_create_logfile(ctx, libxl__sprintf(gc, "qemu-dm-%s", c_info->name), diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_dom.c Mon Feb 13 15:49:01 2012 +0000 @@ -88,7 +88,7 @@ int libxl__build_pre(libxl__gc *gc, uint abort(); } xc_domain_set_tsc_info(ctx->xch, domid, tsc_mode, 0, 0, 0); - if ( info->disable_migrate ) + if (libxl_defbool_val(info->disable_migrate)) xc_domain_disable_migrate(ctx->xch, domid); if (info->type == LIBXL_DOMAIN_TYPE_HVM) { @@ -292,7 +292,7 @@ static int hvm_build_set_params(xc_inter return -1; va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET); - va_hvm->apic_mode = info->u.hvm.apic; + va_hvm->apic_mode = libxl_defbool_val(info->u.hvm.apic); va_hvm->nr_vcpus = info->max_vcpus; memcpy(va_hvm->vcpu_online, &info->cur_vcpus, sizeof(info->cur_vcpus)); for (i = 0, sum = 0; i < va_hvm->length; i++) @@ -302,14 +302,19 @@ static int hvm_build_set_params(xc_inter xc_get_hvm_param(handle, domid, HVM_PARAM_STORE_PFN, store_mfn); xc_get_hvm_param(handle, domid, HVM_PARAM_CONSOLE_PFN, console_mfn); - xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED, info->u.hvm.pae); + xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED, + libxl_defbool_val(info->u.hvm.pae)); #if defined(__i386__) || defined(__x86_64__) - xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN, info->u.hvm.viridian); - xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED, (unsigned long) info->u.hvm.hpet); + xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN, + libxl_defbool_val(info->u.hvm.viridian)); + xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED, + libxl_defbool_val(info->u.hvm.hpet)); #endif xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info)); - xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN, (unsigned long) info->u.hvm.vpt_align); - xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM, info->u.hvm.nested_hvm); + xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN, + libxl_defbool_val(info->u.hvm.vpt_align)); + xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM, + libxl_defbool_val(info->u.hvm.nested_hvm)); xc_set_hvm_param(handle, domid, HVM_PARAM_STORE_EVTCHN, store_evtchn); xc_set_hvm_param(handle, domid, HVM_PARAM_CONSOLE_EVTCHN, console_evtchn); @@ -400,7 +405,7 @@ int libxl__domain_restore_common(libxl__ case LIBXL_DOMAIN_TYPE_HVM: hvm = 1; superpages = 1; - pae = info->u.hvm.pae; + pae = libxl_defbool_val(info->u.hvm.pae); no_incr_generationid = info->u.hvm.no_incr_generationid; break; case LIBXL_DOMAIN_TYPE_PV: diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_pci.c --- a/tools/libxl/libxl_pci.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_pci.c Mon Feb 13 15:49:01 2012 +0000 @@ -1378,7 +1378,7 @@ int libxl__e820_alloc(libxl__gc *gc, uin return ERROR_INVAL; b_info = &d_config->b_info; - if (!b_info->u.pv.e820_host) + if (!libxl_defbool_val(b_info->u.pv.e820_host)) return ERROR_INVAL; rc = xc_get_machine_memory_map(ctx->xch, map, E820MAX); diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/libxl_types.idl Mon Feb 13 15:49:01 2012 +0000 @@ -212,7 +212,7 @@ libxl_domain_build_info = Struct("domain ("target_memkb", MemKB), ("video_memkb", MemKB), ("shadow_memkb", MemKB), - ("disable_migrate", bool), + ("disable_migrate", libxl_defbool), ("cpuid", libxl_cpuid_policy_list), ("type", libxl_domain_type), @@ -230,19 +230,19 @@ libxl_domain_build_info = Struct("domain ("extra_hvm", libxl_string_list), ("u", KeyedUnion(None, libxl_domain_type, "type", - [("hvm", Struct(None, [("firmware", string), - ("pae", bool), - ("apic", bool), - ("acpi", bool), - ("acpi_s3", bool), - ("acpi_s4", bool), - ("nx", bool), - ("viridian", bool), - ("timeoffset", string), - ("hpet", bool), - ("vpt_align", bool), - ("timer_mode", libxl_timer_mode), - ("nested_hvm", bool), + [("hvm", Struct(None, [("firmware", string), + ("pae", libxl_defbool), + ("apic", libxl_defbool), + ("acpi", libxl_defbool), + ("acpi_s3", libxl_defbool), + ("acpi_s4", libxl_defbool), + ("nx", libxl_defbool), + ("viridian", libxl_defbool), + ("timeoffset", string), + ("hpet", libxl_defbool), + ("vpt_align", libxl_defbool), + ("timer_mode", libxl_timer_mode), + ("nested_hvm", libxl_defbool), ("no_incr_generationid", bool), ("nographic", bool), ("stdvga", bool), @@ -256,13 +256,13 @@ libxl_domain_build_info = Struct("domain ("serial", string), ("boot", string), - ("usb", bool), + ("usb", libxl_defbool), # usbdevice: # - "tablet" for absolute mouse, # - "mouse" for PS/2 protocol relative mouse ("usbdevice", string), ("soundhw", string), - ("xen_platform_pci", bool), + ("xen_platform_pci", libxl_defbool), ])), ("pv", Struct(None, [("kernel", libxl_file_reference), ("slack_memkb", MemKB), @@ -272,7 +272,7 @@ libxl_domain_build_info = Struct("domain ("ramdisk", libxl_file_reference), ("features", string, {'const': True}), # Use host's E820 for PCI passthrough. - ("e820_host", bool), + ("e820_host", libxl_defbool), ])), ])), ], diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/xl_cmdimpl.c Mon Feb 13 15:49:01 2012 +0000 @@ -673,8 +673,7 @@ static void parse_config_data(const char : libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); - if (!xlu_cfg_get_long (config, "nomigrate", &l, 0)) - b_info->disable_migrate = l; + xlu_cfg_get_defbool(config, "nomigrate", &b_info->disable_migrate, 0); if (!xlu_cfg_get_long(config, "tsc_mode", &l, 1)) { const char *s = libxl_tsc_mode_to_string(l); @@ -710,24 +709,16 @@ static void parse_config_data(const char xlu_cfg_replace_string (config, "firmware_override", &b_info->u.hvm.firmware, 0); - if (!xlu_cfg_get_long (config, "pae", &l, 0)) - b_info->u.hvm.pae = l; - if (!xlu_cfg_get_long (config, "apic", &l, 0)) - b_info->u.hvm.apic = l; - if (!xlu_cfg_get_long (config, "acpi", &l, 0)) - b_info->u.hvm.acpi = l; - if (!xlu_cfg_get_long (config, "acpi_s3", &l, 0)) - b_info->u.hvm.acpi_s3 = l; - if (!xlu_cfg_get_long (config, "acpi_s4", &l, 0)) - b_info->u.hvm.acpi_s4 = l; - if (!xlu_cfg_get_long (config, "nx", &l, 0)) - b_info->u.hvm.nx = l; - if (!xlu_cfg_get_long (config, "viridian", &l, 0)) - b_info->u.hvm.viridian = l; - if (!xlu_cfg_get_long (config, "hpet", &l, 0)) - b_info->u.hvm.hpet = l; - if (!xlu_cfg_get_long (config, "vpt_align", &l, 0)) - b_info->u.hvm.vpt_align = l; + + xlu_cfg_get_defbool(config, "pae", &b_info->u.hvm.pae, 0); + xlu_cfg_get_defbool(config, "apic", &b_info->u.hvm.apic, 0); + xlu_cfg_get_defbool(config, "acpi", &b_info->u.hvm.acpi, 0); + xlu_cfg_get_defbool(config, "acpi_s3", &b_info->u.hvm.acpi_s3, 0); + xlu_cfg_get_defbool(config, "acpi_s4", &b_info->u.hvm.acpi_s4, 0); + xlu_cfg_get_defbool(config, "nx", &b_info->u.hvm.nx, 0); + xlu_cfg_get_defbool(config, "viridian", &b_info->u.hvm.viridian, 0); + xlu_cfg_get_defbool(config, "hpet", &b_info->u.hvm.hpet, 0); + xlu_cfg_get_defbool(config, "vpt_align", &b_info->u.hvm.vpt_align, 0); if (!xlu_cfg_get_long(config, "timer_mode", &l, 1)) { const char *s = libxl_timer_mode_to_string(l); @@ -752,8 +743,7 @@ static void parse_config_data(const char } } - if (!xlu_cfg_get_long (config, "nestedhvm", &l, 0)) - b_info->u.hvm.nested_hvm = l; + xlu_cfg_get_defbool(config, "nestedhvm", &b_info->u.hvm.nested_hvm, 0); break; case LIBXL_DOMAIN_TYPE_PV: { @@ -990,19 +980,10 @@ skip_vfb: /* To be reworked (automatically enabled) once the auto ballooning * after guest starts is done (with PCI devices passed in). */ - if (!xlu_cfg_get_long (config, "e820_host", &l, 0)) { - switch (c_info->type) { - case LIBXL_DOMAIN_TYPE_HVM: - fprintf(stderr, "Can't do e820_host in HVM mode!"); - break; - case LIBXL_DOMAIN_TYPE_PV: - if (l) - b_info->u.pv.e820_host = true; - break; - default: - abort(); - } - } + if (c_info->type == LIBXL_DOMAIN_TYPE_PV) { + xlu_cfg_get_defbool(config, "e820_host", &b_info->u.pv.e820_host, 0); + } + if (!xlu_cfg_get_list (config, "pci", &pcis, 0, 0)) { int i; d_config->num_pcidevs = 0; @@ -1020,7 +1001,7 @@ skip_vfb: d_config->num_pcidevs++; } if (d_config->num_pcidevs && c_info->type == LIBXL_DOMAIN_TYPE_PV) - b_info->u.pv.e820_host = true; + libxl_defbool_set(&b_info->u.pv.e820_host, true); } switch (xlu_cfg_get_list(config, "cpuid", &cpuids, 0, 1)) { @@ -1212,12 +1193,12 @@ skip_vfb: b_info->u.hvm.gfx_passthru = l; xlu_cfg_replace_string (config, "serial", &b_info->u.hvm.serial, 0); xlu_cfg_replace_string (config, "boot", &b_info->u.hvm.boot, 0); - if (!xlu_cfg_get_long (config, "usb", &l, 0)) - b_info->u.hvm.usb = l; - xlu_cfg_replace_string (config, "usbdevice", &b_info->u.hvm.usbdevice, 0); + xlu_cfg_get_defbool(config, "usb", &b_info->u.hvm.usb, 0); + xlu_cfg_replace_string (config, "usbdevice", + &b_info->u.hvm.usbdevice, 0); xlu_cfg_replace_string (config, "soundhw", &b_info->u.hvm.soundhw, 0); - if (!xlu_cfg_get_long (config, "xen_platform_pci", &l, 0)) - b_info->u.hvm.xen_platform_pci = l; + xlu_cfg_get_defbool(config, "xen_platform_pci", + &b_info->u.hvm.xen_platform_pci, 0); } xlu_cfg_destroy(config); diff -r a20f15f1889b -r ca432f4ad9f5 tools/libxl/xl_sxp.c --- a/tools/libxl/xl_sxp.c Mon Feb 13 15:49:00 2012 +0000 +++ b/tools/libxl/xl_sxp.c Mon Feb 13 15:49:01 2012 +0000 @@ -71,7 +71,8 @@ void printf_info_sexp(int domid, libxl_d printf("\t(tsc_mode %s)\n", libxl_tsc_mode_to_string(b_info->tsc_mode)); printf("\t(max_memkb %"PRId64")\n", b_info->max_memkb); printf("\t(target_memkb %"PRId64")\n", b_info->target_memkb); - printf("\t(nomigrate %d)\n", b_info->disable_migrate); + printf("\t(nomigrate %s)\n", + libxl_defbool_to_string(b_info->disable_migrate)); if (c_info->type == LIBXL_DOMAIN_TYPE_PV && b_info->u.pv.bootloader) { int i; @@ -91,16 +92,22 @@ void printf_info_sexp(int domid, libxl_d printf("\t\t\t(firmware %s)\n", b_info->u.hvm.firmware); printf("\t\t\t(video_memkb %"PRId64")\n", b_info->video_memkb); printf("\t\t\t(shadow_memkb %"PRId64")\n", b_info->shadow_memkb); - printf("\t\t\t(pae %d)\n", b_info->u.hvm.pae); - printf("\t\t\t(apic %d)\n", b_info->u.hvm.apic); - printf("\t\t\t(acpi %d)\n", b_info->u.hvm.acpi); - printf("\t\t\t(nx %d)\n", b_info->u.hvm.nx); - printf("\t\t\t(viridian %d)\n", b_info->u.hvm.viridian); - printf("\t\t\t(hpet %d)\n", b_info->u.hvm.hpet); - printf("\t\t\t(vpt_align %d)\n", b_info->u.hvm.vpt_align); + printf("\t\t\t(pae %s)\n", libxl_defbool_to_string(b_info->u.hvm.pae)); + printf("\t\t\t(apic %s)\n", + libxl_defbool_to_string(b_info->u.hvm.apic)); + printf("\t\t\t(acpi %s)\n", + libxl_defbool_to_string(b_info->u.hvm.acpi)); + printf("\t\t\t(nx %s)\n", libxl_defbool_to_string(b_info->u.hvm.nx)); + printf("\t\t\t(viridian %s)\n", + libxl_defbool_to_string(b_info->u.hvm.viridian)); + printf("\t\t\t(hpet %s)\n", + libxl_defbool_to_string(b_info->u.hvm.hpet)); + printf("\t\t\t(vpt_align %s)\n", + libxl_defbool_to_string(b_info->u.hvm.vpt_align)); printf("\t\t\t(timer_mode %s)\n", libxl_timer_mode_to_string(b_info->u.hvm.timer_mode)); - printf("\t\t\t(nestedhvm %d)\n", b_info->u.hvm.nested_hvm); + printf("\t\t\t(nestedhvm %s)\n", + libxl_defbool_to_string(b_info->u.hvm.nested_hvm)); printf("\t\t\t(no_incr_generationid %d)\n", b_info->u.hvm.no_incr_generationid); @@ -125,7 +132,7 @@ void printf_info_sexp(int domid, libxl_d printf("\t\t\t(gfx_passthru %d)\n", b_info->u.hvm.gfx_passthru); printf("\t\t\t(serial %s)\n", b_info->u.hvm.serial); printf("\t\t\t(boot %s)\n", b_info->u.hvm.boot); - printf("\t\t\t(usb %d)\n", b_info->u.hvm.usb); + printf("\t\t\t(usb %s)\n", libxl_defbool_to_string(b_info->u.hvm.usb)); printf("\t\t\t(usbdevice %s)\n", b_info->u.hvm.usbdevice); printf("\t\t)\n"); break; @@ -134,7 +141,8 @@ void printf_info_sexp(int domid, libxl_d printf("\t\t\t(kernel %s)\n", b_info->u.pv.kernel.path); printf("\t\t\t(cmdline %s)\n", b_info->u.pv.cmdline); printf("\t\t\t(ramdisk %s)\n", b_info->u.pv.ramdisk.path); - printf("\t\t\t(e820_host %d)\n", b_info->u.pv.e820_host); + printf("\t\t\t(e820_host %s)\n", + libxl_defbool_to_string(b_info->u.pv.e820_host)); printf("\t\t)\n"); break; default: _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |