aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* xend: fix traceback in pci.pyKeir Fraser2010-03-231-0/+3
| | | | Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* Fix vcpu hotplug bug: transfer vcpu_avail hex string to qemuKeir Fraser2010-03-201-1/+1
| | | | | | | | | | | | | | | Currently qemu has a bug: When maxvcpus > 64, qemu will get wrong vcpu bitmap (s->cpus_sts[i]) since it only get bitmap from a long variable. This patch, cooperate with another qemu patch, is to fix this bug. This patch transfer a vcpu_avail string in a hex string format, so that at qemu side it's more easier to get vcpu bitmap from hex string, especially when many vcpus, like more than 64. (Also update QEMU_TAG for matching qemu-side update) Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Fixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"Keir Fraser2010-03-182-11/+6
| | | | Signed-off-by: James (Song Wei) <jsong@novell.com>
* libxc: Support set affinity for more than 64 CPUs.Keir Fraser2010-03-173-29/+83
| | | | | | | | There are more than 64 cpus on new intel platform especially on NUMA system, so that we need break the pcpu limit (that is 64) when set affinity of a VCPU. Signed-off-by: James (song wei) <jsong@novell.com>
* Increase default console ring allocation size and reduce default verbosityKeir Fraser2010-03-171-4/+29
| | | | | | | | | | | | | | | | | | | | In order to have better chance that relevant messages fit into the ring buffer, allocate a dynamic (larger) one in more cases, and make the default allocation size depend on both the number of CPUs and the log level. Also free the static buffer if a dynamic one was obtained. In order for "xm dmesg" to retrieve larger buffers, eliminate pyxc_readconsolering()'s 32k limitation resulting from the use of a statically allocated buffer. Finally, suppress on x86 most per-CPU boot time messages (by default, most of them can be re-enabled with a new command line option "cpuinfo", some others are now only printed more than once when there are inconsistencies between CPUs). This reduces both boot time (namely when a graphical console is in use) and pressure on the console ring and serial transmit buffers. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xend: Remove warning message from xend.logKeir Fraser2010-03-171-0/+1
| | | | | | | | | | When I created a domain, I saw the following warning message in xend.log. This patch removes the message from xend.log. [2010-03-16 19:04:16 3623] WARNING (XendConfig:872) Unconverted key: Description Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* blktap/fs-back: Build fixes for Fedora 13Keir Fraser2010-03-157-2/+7
| | | | | | | | | | | | | 1. Some files use stat, mkfifo, mkdir etc. without including sys/stat.h 2. Some programs link against libpthread without a -lpthread compile option. The compile used to work if this library happened to be used by one of the other libraries that was being linked against, but Fedora 13 has stopped allowing this. From: M A Young <m.a.young@durham.ac.uk> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* pygrub: further improve grub2 supportKeir Fraser2010-03-151-11/+16
| | | | | | | | | | | | | | * Improve syntax error messages to say what actually went wrong instead of giving an arbitrary and basically useless integer. * Improve handling of quoted values used with the "set" command, previously only the default variable was special cased to handle quoting. * Allow for extra options to the menuentry command, syntax now appears to be menuentry "TITLE" --option1 --option2 {...} Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxenlight: fix segfault when domid_to_name returns NULLKeir Fraser2010-03-151-3/+3
| | | | | | | | | | | | | The function libxl_domid_to_name() can return NULL if the path /local/domain/%d/name does not exist. This causes a segfault if the NULL name is later passed as a value to libxl_xs_writev(). I'm hitting this making a call to libxl_device_vfb_add() from my graphical switcher application. This patch modifies xs_writev() and libxl_xs_writev() to skip NULL values. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
* hotplug: Avoid race condition when creating or destroying network bridgesKeir Fraser2010-03-151-0/+10
| | | | | | | | | | | | | | | I saw the following message when I created or destroyed two bridges by using network-bridge script at same time. Of course names of the bridges are different. But, a temporal name "tmpbridge" is used by the script to create or destroy the bridges. I think that the message was shown by "tmpbridge". SIOCSIFNAME: File exists This patch avoids race condition when creating or destroying the bridges. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* libxl: Do not delete checked-in flex/bison outputs.Keir Fraser2010-03-081-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenstore: Resolve gcc4.5 type errorKeir Fraser2010-03-061-1/+1
| | | | | | | Without this, gcc 4.5 complains with, error: case value '3' not in enumerated type 'const enum xs_perm_type' Signed-off-by: Charles Arnold <carnold@novell.com>
* blktap: provide a variant of __RING_SIZE() that is an integer constant ↵Keir Fraser2010-03-062-2/+2
| | | | | | | | | expression Without this new variant, gcc 4.5 won't compile where this is being used to specify array sizes. See also c/s 20975. Signed-off-by: Charles Arnold <carnold@novell.com>
* xend: XenAPI does not support pvSCSI multipathKeir Fraser2010-03-051-1/+5
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Fix Makefile targets that generate several files at onceKeir Fraser2010-03-052-4/+8
| | | | | | | | | | | | | | | | | | | | In a few places in the tree the Makefiles have constructs like this: one_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) This is wrong, because make will run _two copies_ of the same command at once. This generally causes races and hard-to-reproduce build failures. Notably, `make -j4' at the top level will build stubdom libxc twice simultaneously! In this patch we replace the occurrences of this construct with the correct idiom: one_file: another_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: Fix grub2 support when config is on a separate /boot partitionKeir Fraser2010-03-051-1/+1
| | | | | Signed-off-by: David Markey <david@dmarkey.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Fix undefined behaviour when pci not specified in input fileKeir Fraser2010-03-051-1/+1
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Commit output from flex for benefit of prehistoric peopleKeir Fraser2010-03-054-0/+4225
| | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xentop: tmem: no stats for non-tmem domainsKeir Fraser2010-03-031-2/+3
| | | | | | | In xentop, don't re-use and print stale data of previous tmem domain for subsequent non-tmem domain. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* Fix domain exit actions that contain hyphenKeir Fraser2010-03-031-4/+4
| | | | | | | | | | | | | | | Domain exit actions that contain a hyphen (e.g. rename-restart) were not being detected properly when xm is configured to use xenapi. Domain config containing on_crash=3D"rename-restart" results in xen53:~ # xm new /tmp/domU.config Using config file "/tmp/domU.config". Unexpected error: <type 'exceptions.TypeError'> This patch fixes the raised exception and at the same time handles the replacement of hyphen with underscore properly. Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* Replace config file parser for "xl"Keir Fraser2010-03-038-129/+696
| | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a replacement config file parser for "xl" based on bison and flex. Benefits: * proper error reporting with line numbers * parser can understand nearly all "xm" configuration files directly (doesn't understand Python code but should do everything else) * parser also understands the ;-infested "xl" style files * removes the dependency on libconfig * better checking for certain kinds of mistakes * eliminates the strange "massage file and try again" code This is intended to support all config files currently supported by "xl" and almost all files supported by "xm". (NB that whether a feature works depends on the implementation of that feature in xl/libxl of course.) This patch also introduces a new library "libxlutil" which is mainly for the benefit of "xl". Users of libxl do not need to use libxlutil, but they can do so if they want to parse "xl" files without being "xl". Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* libxc: Pre-zero argument structures for map/unmap_pirq operations.Keir Fraser2010-02-251-0/+3
| | | | | From: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: Fix cpuid() inline asm.Keir Fraser2010-02-241-4/+13
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xm: Show usage message of xm commandsKeir Fraser2010-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The following commands don't show an usage message even if we give a wrong option to the commands. - xm block-list - xm network-list - xm network2-list - xm vtpm-list - xm pci-list - xm scsi-list e.g. # xm block-list --xxx vm1 Error: option --xxx not recognized This patch shows the usage message of the commands. e.g. # xm block-list --xxx vm1 Error: option --xxx not recognized Usage: xm block-list <Domain> [--long] List virtual block devices for a domain. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: notify xenpv device model that console info is readyKeir Fraser2010-02-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | Sometimes PV domain with vfb doesn't boot up. /sbin/kudzu is stuck. After investigation, I've found that the evtchn for console is not bound at all. Normal sequence of evtchn initialization in qemu-dm for xenpv is: 1) watch xenstore backpath (/local/domain/0/backend/console/<domid>/0) 2) read console info (/local/domain/<domid>/console/{type, ring-ref, port..= }) 3) bind the evtchn to the port. But in some case, xend writes to the backpath before the console info is prepared, and never write to the backpath again. So the qemu-dm fails at 2) and never reach to 3). When this happens, manually xenstore-write command on Domain-0 resumes the guest. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* python: Don't install anything directly under /usr/shareKeir Fraser2010-02-222-3/+3
| | | | Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
* hvmloader: Replace unportable usage of GNU head with portable awk.Keir Fraser2010-02-221-1/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix blktap2 test in xen-hotplug-cleanupKeir Fraser2010-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The blktap2 test in xen-hotplug-cleanup was not quite right, causing orphaned /vm/<uuid>/device node in xenstore. Attempt to reattach the device failed: xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r xen53: # xm block-detach 0 /dev/xvdp xen53: # xenstore-ls /vm/00000000-0000-0000-0000-000000000000/device vbd =3D "" 51952 =3D "" frontend =3D "/local/domain/0/device/vbd/51952" frontend-id =3D "0" backend-id =3D "0" backend =3D "/local/domain/0/backend/vbd/0/51952" xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r Error: Device /dev/xvdp (51952, vbd) is already connected. Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain] From: Jim Fehlig <jfehlig@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix for fs-backend crash when xend was not started after system boot.Keir Fraser2010-02-222-1/+9
| | | | Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
* hvmloader: fix vgatype detecting issueKeir Fraser2010-02-221-1/+2
| | | | | | | | | | | | When graphics card is assigned to a guest as a secondary VGA, without gfx_passthru and emulated VGA is the primary VGA, hvmloader misreads gfx_passthru is specified if VGA device is found after the emulated VGA. This patch fix this issue. If emulated VGA is found, hvmloader preserves it and loads vgabios of the emulated VGA. Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
* xm: Fix xm network-list for XenAPIKeir Fraser2010-02-221-2/+5
| | | | | | | When I use XenAPI, MAC addresses are not shown by xm network-list. MAC addresses are shown by this patch. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* hotplug: ignore xenstore-read errorKeir Fraser2010-02-162-3/+3
| | | | | | | | The failure to read "backend/tap/<domid>/*" in the xenstore is a usual case since the domain is gone after xenstore-ls command is executed. The error should be ignored. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xend: Remove redundant 'name' from LEGACY_CFG_TYPES and ↵Keir Fraser2010-02-151-2/+0
| | | | | | | | | | LEGACY_XENSTORE_VM_PARAMS Two 'name's are defined in LEGACY_CFG_TYPES of XendConfig.py. LEGACY_XENSTORE_VM_PARAMS also is same. This patch removes redundant 'name's. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xenpaging: Small code style cleanupsKeir Fraser2010-02-151-3/+6
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix a small bug about HVM_MAX_VCPUS related arrayKeir Fraser2010-02-151-1/+1
| | | | | | | | Currently it doesn't block running, anyway, it better fix the small bug considering if in the future HVM_MAX_VCPUS will not necessarily be 8x value. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>=
* hvmloader: Fix an ACPI asl bug.Keir Fraser2010-02-151-1/+1
| | | | | | | | Fix an ACPI asl bug by explicitly convert PRS to buffer, otherwise PRS would be parsed as integer if less than 32/64 bits (according to ACPI 1.0 or 2.0). Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Vcpu hotplug: Move ACPI processor from \_PR to \_SBKeir Fraser2010-02-151-7/+7
| | | | | | | | | | Move processor from \_PR to \_SB. ACPI processor can be defined under \_PR or \_SB. However, recently os like linux 2.6.30/32 support cpu hotplug better for \_SB processor object. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remus: increase failover timeout from 500ms to 1sKeir Fraser2010-02-122-8/+8
| | | | | | | | 500ms is aggressive enough to trigger split-brain under fairly ordinary workloads, particularly for HVM. The long-term fix is to integrate with a real HA monitor like linux HA. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* hvmloader: Fix parallel build of ACPI tables.Keir Fraser2010-02-122-19/+20
| | | | | | | | | | | Make build.c dependency on ssdt_{pm,tpm}.h explicit, else they can be built in the wrong order. Also, improve naming of target DSDT structures, and specify -p option to iasl so that all generated files for a given target have target-unique names, hence build can proceed safely in parallel. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Fix comment style in ssdt_tpm.aslKeir Fraser2010-02-121-17/+19
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Build a compatibility DSDT with only 15 processor objects.Keir Fraser2010-02-113-19/+44
| | | | | | | | | Deploy this smaller DSDT where possible: this is required to boot Windows 2000, which only supports up to 15 processors and will blue screen if it sees more processor objects than that (even inactive ones). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Remove checked-in ready-compiled SSDT_PM and SSDT_TPM.Keir Fraser2010-02-114-238/+11
| | | | | | These can be built at the same time as the DSDT. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Do not leave compiled DSDT checked in to tree.Keir Fraser2010-02-111-11046/+0
| | | | | | | It's big and small changes generate huge diffs. People building the firmware will have to ensure they have iasl installed. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: disable presently broken memshr extensionKeir Fraser2010-02-111-1/+1
| | | | Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
* tools/xenpaging: fix bug of Segmentation faultKeir Fraser2010-02-111-10/+24
| | | | | | | | Segmentation fault occurs in two situations: 1. argc is less than 3 2. xenpaging_init() fault Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* tools/xenbaked: fix bug of Segmentation faultKeir Fraser2010-02-101-70/+52
| | | | | | | | Run xenbaked will cause Segmentation fault, because the method to get pointers of trace buffer metadata is wrong. Fix this bug according to xentrace. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* libxc: fix bug in xc_tbuf_get_size()Keir Fraser2010-02-101-3/+15
| | | | | | | The size in pages of trace buffer should be t_info->tbuf_size rather than t_info pages. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* tools/remus: fix build in (symlinked) read-only source treeKeir Fraser2010-02-101-4/+5
| | | | | | | | | | | Modifying source files should generally be avoided; if it is being done, care should at least be taken to not attempt writes to read-only files. While at it, also force the whole ugly construct to fail if any of its commands fails. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xend: Enlarge the memory balloon size for domain creation since shadowKeir Fraser2010-02-101-3/+2
| | | | | | pre-allocation size has changed from 1M to 4M. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
* tools/xenconsole: fix Segmentation faultKeir Fraser2010-02-081-1/+7
| | | | | | | Segmentation fault occurs if DOMID isn't specified. Some check be added to output error message in this situation. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>