From 28c40113329a2cd385f43c999932d310ced39291 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2010 16:50:34 +0100 Subject: [PATCH 1/5] tools/debugger/gdbsx: build enabled by default Submitted-by: Bruce Edge Signed-off-by: Ian Jackson --- tools/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index 2b84998415..3ae1f15eb1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -35,6 +35,7 @@ SUBDIRS-y += xenpmd SUBDIRS-y += libxl SUBDIRS-y += remus SUBDIRS-$(CONFIG_X86) += xenpaging +SUBDIRS-y += debugger/gdbsx # These don't cross-compile ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) @@ -114,3 +115,9 @@ subdir-clean-ioemu-dir: $(buildmakevars2shellvars); \ $(MAKE) -C ioemu-dir clean; \ fi + +subdir-clean-debugger/gdbsx: + $(MAKE) -C debugger/gdbsx clean + +subdir-install-debugger/gdbsx: + $(MAKE) -C debugger/gdbsx install From 84b1ed809c51b96dfefee394a4da932e7ec66cd9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2010 17:22:18 +0100 Subject: [PATCH 2/5] tools/libxl/xl: fix for short BDF (without domain specified) Check that BDF have been parsed correctly. Before this fix, BDF could be parsed incorrectly if user omitted the domain. Signed-off-by: Ian Jackson Contributed-by: Sergey Tovpeko Acked-by: Stefano Stabellini --- tools/libxl/xl_cmdimpl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 984a2e420e..335cd1e58d 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -833,9 +833,12 @@ skip_vfb: p = strtok(buf2, ","); if (!p) goto skip_pci; - if (!sscanf(p, PCI_BDF_VDEVFN, &domain, &bus, &dev, &func, &vdevfn)) { - sscanf(p, "%02x:%02x.%01x@%02x", &bus, &dev, &func, &vdevfn); + if (sscanf(p, PCI_BDF_VDEVFN, &domain, &bus, &dev, &func, &vdevfn) < 4) { domain = 0; + if (sscanf(p, "%02x:%02x.%01x@%02x", &bus, &dev, &func, &vdevfn) < 3) { + fprintf(stderr,"xl: Unable to parse pci bdf (%s)\n", p); + goto skip_pci; + } } libxl_device_pci_init(*pcidevs + *num_pcidevs, domain, bus, dev, func, vdevfn); (*pcidevs)[*num_pcidevs].msitranslate = pci_msitranslate; From a87a580e8a0c329f4374e668ec29defa6bac77d1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2010 17:39:00 +0100 Subject: [PATCH 3/5] tools/xentrace: increase default xentrace buffer size. increase default xentrace buffer size to reduce the number of lost records. Signed-off-by: Tim Deegan --- tools/xentrace/xentrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 8812bfdf3b..9e07f3f2c4 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -45,7 +45,7 @@ do { \ /* sleep for this long (milliseconds) between checking the trace buffers */ #define POLL_SLEEP_MILLIS 100 -#define DEFAULT_TBUF_SIZE 20 +#define DEFAULT_TBUF_SIZE 32 /***** The code **************************************************************/ typedef struct settings_st { From 7182d1d11b43dcbb7c53c0e41e4b62571a3bc619 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2010 17:53:19 +0100 Subject: [PATCH 4/5] tools/libxl: Read soundhw option and pass it on to qemu Signed-off-by: George Dunlap Acked-by: Stefano Stabellini --- tools/libxl/libxl.c | 4 ++++ tools/libxl/libxl.h | 1 + tools/libxl/xl_cmdimpl.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 293aaa7f02..7b874fbf99 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -879,6 +879,10 @@ static char ** libxl_build_device_model_args(struct libxl_ctx *ctx, flexarray_set(dm_args, num++, info->usbdevice); } } + if (info->soundhw) { + flexarray_set(dm_args, num++, "-soundhw"); + flexarray_set(dm_args, num++, info->soundhw); + } if (info->apic) { flexarray_set(dm_args, num++, "-acpi"); } diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 280e53e881..4bb0bc1716 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -161,6 +161,7 @@ typedef struct { char *boot; /* boot order, for example dca */ bool usb; /* usb support enabled or disabled */ char *usbdevice; /* enable usb mouse: tablet for absolute mouse, mouse for PS/2 protocol relative mouse */ + char *soundhw; /* enable sound hardware */ bool apic; /* apic enabled or disabled */ int vcpus; /* max number of vcpus */ int vcpu_avail; /* vcpus actually available */ diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 335cd1e58d..d95466c65d 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -895,6 +895,8 @@ skip_pci: dm_info->usb = l; if (!xlu_cfg_get_string (config, "usbdevice", &buf)) dm_info->usbdevice = strdup(buf); + if (!xlu_cfg_get_string (config, "soundhw", &buf)) + dm_info->soundhw = strdup(buf); if (!xlu_cfg_get_long (config, "xen_platform_pci", &l)) dm_info->xen_platform_pci = l; } From 772aebeab986e570c569eb863ef44b8c3c4aadf7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jul 2010 17:54:42 +0100 Subject: [PATCH 5/5] tools/libxl: implement support for nomigrate option in VM profiles Signed-off-by: Gianni Tedesco Acked-by: Stefano Stabellini --- tools/libxl/libxl.h | 1 + tools/libxl/libxl_dom.c | 2 ++ tools/libxl/xl_cmdimpl.c | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 4bb0bc1716..9ca67e826f 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -97,6 +97,7 @@ typedef struct { uint32_t target_memkb; uint32_t video_memkb; uint32_t shadow_memkb; + bool disable_migrate; const char *kernel; int hvm; union { diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 39b1b09ef8..3f673398ed 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -68,6 +68,8 @@ int build_pre(struct libxl_ctx *ctx, uint32_t domid, (info->hvm) ? info->max_memkb : (info->max_memkb + info->u.pv.slack_memkb)); xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); + if ( info->disable_migrate ) + xc_domain_disable_migrate(ctx->xch, domid); if (info->hvm) { unsigned long shadow; diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index d95466c65d..e7aa89b841 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -192,6 +192,7 @@ static void init_build_info(libxl_domain_build_info *b_info, libxl_domain_create b_info->max_vcpus = 1; b_info->max_memkb = 32 * 1024; b_info->target_memkb = b_info->max_memkb; + b_info->disable_migrate = 0; if (c_info->hvm) { b_info->shadow_memkb = 0; /* Set later */ b_info->video_memkb = 8 * 1024; @@ -360,6 +361,7 @@ static void printf_info(int domid, printf("\t(tsc_mode %d)\n", b_info->tsc_mode); printf("\t(max_memkb %d)\n", b_info->max_memkb); printf("\t(target_memkb %d)\n", b_info->target_memkb); + printf("\t(nomigrate %d)\n", b_info->disable_migrate); printf("\t(image\n"); if (c_info->hvm) { @@ -551,6 +553,9 @@ static void parse_config_data(const char *configfile_filename_report, : libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); + if (!xlu_cfg_get_long (config, "nomigrate", &l)) + b_info->disable_migrate = l; + if (!xlu_cfg_get_long(config, "tsc_mode", &l)) b_info->tsc_mode = l;