aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools/configure.ac: fill PACKAGE_TARNAME in AC_INITOlaf Hering2012-10-082-5/+7
| | | | | | | | | | | | | Upcoming changes may move DOCDIR from Config.mk to config/Tools.mk. To preserve the currently used path, which ends with /xen, specify a value for PACKAGE_TARNAME. Without this change the path would end with /xen-hypervisor. Please rerun autoconf after applying this. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend/pvscsi: update sysfs parser for Linux 3.0Olaf Hering2012-10-081-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysfs parser for /sys/bus/scsi/devices understands only the layout of kernel version 2.6.16. This looks as follows: /sys/bus/scsi/devices/1:0:0:0/block:sda is a symlink to /sys/block/sda/ /sys/bus/scsi/devices/1:0:0:0/scsi_generic:sg1 is a symlink to /sys/class/scsi_generic/sg1 Both directories contain a 'dev' file with the major:minor information. This patch updates the used regex strings to match also the colon to make it more robust against possible future changes. In kernel version 3.0 the layout changed: /sys/bus/scsi/devices/ contains now additional symlinks to directories such as host1 and target1:0:0. This patch ignores these as they do not point to the desired scsi devices. They just clutter the devices array. The directory layout in '1:0:0:0' changed as well, the 'type:name' notation was replaced with 'type/name' directories: /sys/bus/scsi/devices/1:0:0:0/block/sda/ /sys/bus/scsi/devices/1:0:0:0/scsi_generic/sg1/ Both directories contain a 'dev' file with the major:minor information. This patch adds additional code to walk the subdir to find the 'dev' file to make sure the given subdirectory is really the kernel name. In addition this patch makes sure devname is not None. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend/pvscsi: fix usage of persistant device names for SCSI devicesOlaf Hering2012-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | Currently the callers of vscsi_get_scsidevices() do not pass a mask string. This will call "lsscsi -g '[]'", which causes a lsscsi syntax error. As a result the sysfs parser _vscsi_get_scsidevices() is used. But this parser is broken and the specified names in the config file are not found. Using a mask '*' if no mask was given will call lsscsi correctly and the following config is parsed correctly: vscsi=[ '/dev/sg3, 0:0:0:0', '/dev/disk/by-id/wwn-0x600508b4000cf1c30000800000410000, 0:0:0:1' ] Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend/pvscsi: fix passing of SCSI control LUNsOlaf Hering2012-10-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Currently pvscsi can not pass SCSI devices that have just a scsi_generic node. In the following example sg3 is a control LUN for the disk sdd. But vscsi=['4:0:2:0,0:0:0:0'] does not work because the internal 'devname' variable remains None. Later writing p-devname to xenstore fails because None is not a valid string variable. Since devname is used for just informational purpose use sg also as devname. carron:~ $ lsscsi -g [0:0:0:0] disk ATA FK0032CAAZP HPF2 /dev/sda /dev/sg0 [4:0:0:0] disk HP P2000G3 FC/iSCSI T100 /dev/sdb /dev/sg1 [4:0:1:0] disk HP P2000G3 FC/iSCSI T100 /dev/sdc /dev/sg2 [4:0:2:0] storage HP HSV400 0950 - /dev/sg3 [4:0:2:1] disk HP HSV400 0950 /dev/sdd /dev/sg4 [4:0:3:0] storage HP HSV400 0950 - /dev/sg5 [4:0:3:1] disk HP HSV400 0950 /dev/sde /dev/sg6 Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xenballoond.init: remove 4 from default runlevelOlaf Hering2012-10-081-1/+1
| | | | | | | | | | | | | Remove 4 from default runlevel in xenballoond.init. Similar to what changeset 24847:0900b1c905f1 does in xencommons, remove runlevel 4 from the other runlevel scripts. LSB defines runlevel 4 as reserved for local use, the local sysadmin is responsible for symlink creation in rc4.d. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* hotplug/Linux: Remove tracing (bash -x) from network-nat scriptOlaf Hering2012-10-081-1/+1
| | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* autoconf: add -Werror to libutil.h header checkRoger Pau Monne2012-10-082-0/+14
| | | | | | | | | | | | libutil.h is only needed on BSDs, but not in Linux. Debian package libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a Perform the libutil.h check with -Werror, so we don't include this bogus header. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Allow migration with qemu-xen.Anthony PERARD2012-10-081-17/+0
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_dom: Call the right switch logdirty for the right DM.Anthony PERARD2012-10-081-3/+42
| | | | | | | | | | | | This patch dispatch the switch logdirty call depending on which device model version is running. The call to qemu-xen right now is synchronous, not like the one to qemu-xen-traditional. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_qmp: Introduce libxl__qmp_set_global_dirty_log.Anthony PERARD2012-10-082-2/+12
| | | | | | | | | This function will enable or disable the global dirty log on QEMU, used during a migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_qmp: Simplify run of single QMP commands.Anthony PERARD2012-10-081-48/+22
| | | | | | | | This new function connects to QEMU, sends the command and disconnects. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_qmp: Use qmp_parameters_* functions for param list of a QMP command.Anthony PERARD2012-10-081-43/+28
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_qmp: Introduces helpers to create an argument list.Anthony PERARD2012-10-081-0/+51
| | | | | | | | | | | | | Those functions will be used to create a "list" of parameters that contain more than just strings. This list is converted by qmp_send to a string to be sent to QEMU. Those functions will be used in the next two patches, so right now there are not compiled. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_json: Introduce libxl__json_object_to_yajl_gen.Anthony PERARD2012-10-082-0/+64
| | | | | | | | | | | | | | | | This function converts a libxl__json_object to yajl by calling every yajl_gen_* function on a preallocated yajl_gen hand. This helps to integrate a json_object into an already existing yajl_gen tree. This function is used in a later patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- renamed local variable "index" to "idx" to avoid clash with index(3) function, highlighted by Wshadow ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_json: Replace JSON_TRUE/FALSE by JSON_BOOL.Anthony PERARD2012-10-083-5/+17
| | | | | | | | | Those two JSON_TRUE and JSON_FALSE were types of node. But it's better to have a unique JSON_BOOL type. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_json: Remove JSON_ERROR from enum.Anthony PERARD2012-10-081-1/+0
| | | | | | | | This value from libxl__json_node_type is never used. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_json: Export json_object related function.Anthony PERARD2012-10-082-19/+29
| | | | | | | | | Export libxl__json_object_alloc and libxl__json_object_append_to to use them in a later patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Add a comment about NOGC usage with flexarrayAnthony PERARD2012-10-081-1/+7
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl/libxl: add iomem supportMatthew Fioravante2012-10-053-4/+55
| | | | | | | | | | This patch adds a new option for xen config files for directly mapping hardware io memory into a vm. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl_json: Use libxl alloc function.Anthony PERARD2012-10-052-69/+19
| | | | | | | | | This patch makes use of the libxl allocation API and the GC and removes the check for allocation failure. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Have flexarray using the GCAnthony PERARD2012-10-057-158/+60
| | | | | | | | | | | This patch makes the flexarray function libxl__gc aware. It also updates every function that use a flexarray to pass the gc and removes every memory allocation check and free. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Move gc_is_real to libxl_internal.h.Anthony PERARD2012-10-052-8/+8
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl/qemu-xen: use cache=writeback for IDE and SCSIStefano Stabellini2012-10-051-4/+4
| | | | | | | | | | | | | | | | Change caching mode from writethrough to writeback for upstream QEMU. After a lengthy discussion, we came up with the conclusion that WRITEBACK is OK for IDE. See: http://marc.info/?l=xen-devel&m=133311527009773 Given that the same reasons apply to SCSI as well, change to writeback for SCSI too. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: make devid a type so it is initialized properlyMatthew Fioravante2012-10-057-8/+22
| | | | | | | | | | | | | | | | Previously device ids in libxl were treated as integers meaning they were being initialized to 0, which is a valid device id. This patch makes devid its own type in libxl and initializes it to -1, an invalid value. This fixes a bug where if you try to do a xl DEV-attach multiple time it will continuously try to reattach device 0 instead of generating a new device id. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* trace: trace hypercalls inside a multicallDavid Vrabel2012-10-032-1/+3
| | | | | | | | | | Add a trace record for every hypercall inside a multicall. These use a new event ID (with a different sub-class ) so they may be filtered out if only the calls into hypervisor are of interest. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* trace: improve usefulness of hypercall trace recordDavid Vrabel2012-10-032-0/+7
| | | | | | | | | | | | | | | | | | Trace hypercalls using a more useful trace record format. The EIP field is removed (it was always somewhere in the hypercall page) and include selected hypercall arguments (e.g., the number of calls in a multicall, and the number of PTE updates in an mmu_update etc.). 12 bits in the first extra word are used to indicate which arguments are present in the record and what size they are (32 or 64-bit). This is an incompatible record format so a new event ID is used so tools can distinguish between the two formats. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* trace: allow for different sub-classes of TRC_PV_* tracepointsDavid Vrabel2012-10-031-22/+22
| | | | | | | | | | | | | | | | | | We want to add additional sub-classes for TRC_PV tracepoints and to be able to only capture these new sub-classes. This cannot currently be done as the existing tracepoints all use a sub-class of 0xf. So, redefine the PV events to use a new sub-class. All the current tracepoints are tracing entry points to the hypervisor so the sub-class is named TRC_PV_ENTRY. This change does not affect xenalyze as that only looks at the main class and the event number and does not use the sub-class field. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add 64 bits big bar supportXiantao Zhang2012-10-014-25/+80
| | | | | | | | | | | Currently it is assumed PCI device BAR access < 4G memory. If there is such a device whose BAR size is larger than 4G, it must access > 4G memory address. This patch enable the 64bits big BAR support on hvmloader. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* docs: initial documentation for xenstore pathsIan Campbell2012-10-011-70/+0
| | | | | | | | | This is based upon my inspection of a system with a single PV domain and a single HVM domain running and is therefore very incomplete. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: Expose TSC adjust to HVM guestLiu, Jinsong2012-09-262-1/+3
| | | | | | | | | | Intel latest SDM (17.13.3) release a new MSR CPUID.7.0.EBX[1]=1 indicates TSC_ADJUST MSR 0x3b is supported. This patch expose it to hvm guest. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86: Save/restore TSC adjust during HVM guest migrationLiu, Jinsong2012-09-261-0/+8
| | | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86: vMCE save and restoreLiu, Jinsong2012-09-261-0/+2
| | | | | | | | | | | | | | | | | | | This patch provides vMCE save/restore when migration. 1. MCG_CAP is well-defined. However, considering future cap extension, we keep save/restore logic that Jan implement at c/s 24887; 2. MCi_CTL2 initialized by guestos when booting, so need save/restore otherwise guest would surprise; 3. Other MSRs do not need save/restore since they are either error- related and pointless to save/restore, or, unified among all vMCE platform; Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> - fix handling of partial data in XEN_DOMCTL_set_ext_vcpucontext - fix adjustment of xen_domctl_ext_vcpucontext Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* tools: bump SONAMEs for changes during 4.2 development cycle.Ian Campbell2012-09-252-2/+2
| | | | | | | | | | | We mostly did this as we went along, only a couple of minor number bumps were missed http://marc.info/?l=xen-devel&m=134366054929255&w=2: - Bumped libxl from 1.0.0 -> 1.0.1 - Bumped libxenstore from 3.0.1 -> 3.0.2 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: resume the domain on suspend failureBastian Blank2012-09-251-3/+6
| | | | | | | | | The MUST macro calls exit(3) on failure but we need to cleanup and resume. Signed-off-by: Bastian Blank <waldi@debian.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: always append --argsOlaf Hering2012-09-251-2/+4
| | | | | | | | | | | | | | | | | If a bootloader entry in menu.lst has no additional kernel command line options listed and the domU.cfg has 'bootargs="--args=something"' the additional arguments from the config file are not passed to the kernel. The reason for that incorrect behaviour is that run_grub appends arg only if the parsed config file has arguments listed. Fix this by appending args from image section and the config file separatly. To avoid adding to a NoneType initialize grubcfg['args'] to an empty string. This does not change behaviour but simplifies the code which appends the string. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xsm/flask: add domain relabel supportDaniel De Graaf2012-09-173-1/+9
| | | | | | | | | | | | | | | | This adds the ability to change a domain's XSM label after creation. The new label will be used for all future access checks; however, existing event channels and memory mappings will remain valid even if their creation would be denied by the new label. With appropriate security policy and hooks in the domain builder, this can be used to create domains that the domain builder does not have access to after building. It can also be used to allow a domain to drop privileges - for example, prior to launching a user-supplied kernel loaded by a pv-grub stubdom. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* xsm/flask: remove unneeded create_sid fieldDaniel De Graaf2012-09-171-2/+0
| | | | | | | | | This field was only used to populate the ssid of dom0, which can be handled explicitly in the domain creation hook. This also removes the unnecessary permission check on the creation of dom0. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* xsm/flask: remove inherited class attributesDaniel De Graaf2012-09-173-106/+2
| | | | | | | | | | | The ability to declare common permission blocks shared across multiple classes is not currently used in Xen. Currently, support for this feature is broken in the header generation scripts, and it is not expected that this feature will be used in the future, so remove the dead code. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* tools: drop ia64 only foreign structs from headersIan Campbell2012-09-172-13/+0
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Fix libxenstore memory leak when USE_PTHREAD is not definedAndres Lagar-Cavilla2012-09-171-4/+13
| | | | | | | | | | | Redefine usage of pthread_cleanup_push and _pop, to explicitly call free for heap objects in error paths. By the way, set a suitable errno value for an error path that had none. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Remove global domid and enable -WshadowIan Campbell2012-09-172-153/+140
| | | | | | | | | | | | | | | | | | | | | | Lots of functions loop over a list of domain and others take a domid as a parameter, shadowing the global one and leading to all sorts of confusion. Therefore remove the global domid and explicitly pass it around as necessary. Adds a domid to the parameters for many functions and switches many others from taking a char * domain specifier to taking a domid, pushing the domid lookup to the toplevel. Replaces some open-coded domain_qualifier_to_domid error checking with find_domain. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- annotate find_domain() with warn_unused_result and fix the handful of errors. ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: prepare to enable WshadowIan Campbell2012-09-172-23/+21
| | | | | | | | | | | | Takes care of everything other than the global domid clashes. Avoid galobal functions - stime(2) - time(2) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Enable -Wshadow.Ian Campbell2012-09-1710-84/+95
| | | | | | | | | | | | | | | | | | | | | | It was convenient to invent $(CFLAGS_LIBXL) to do this. Various renamings to avoid shadowing standard functions: - index(3) - listen(2) - link(2) - abort(3) - abs(3) Reduced the scope of some variables to avoid conflicts. Change to libxc is due to the nested hypercall buf macros in set_xen_guest_handle (used in libxl) using the same local private vars. Build tested only. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: free libxl context, logger and lockfile using atexit handlerIan Campbell2012-09-171-2/+18
| | | | | | | | | xl frequently just calls exit(3), especially on error. Try to clean up some of our global state to make tools like valgrind more useful. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xenpm: make argument parsing and error handling more consistentJan Beulich2012-09-171-170/+149
| | | | | | | | | | | | | | | Specifically, what values are or aren't accepted as CPU identifier, and how the values get interpreted should be consistent across sub-commands (intended behavior now: non-negative values are okay, and along with omitting the argument, specifying "all" will also be accepted). For error handling, error messages should get consistently issued to stderr, and the tool should now (hopefully) produce an exit code of zero only in the (partial) success case (there may still be a small number of questionable cases). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* hvmloader: Do not zero the wallclock fields in shared-info.Keir Fraser2012-09-141-1/+5
| | | | | | | | | | | | | These fields need to be valid at all times. Hypervisor ensures this even across 32/64-bit guest transitions. This fixes a bug where wallclock time is incorrect for booting 32-bit HVM guests. This should be backported to Xen 4.1 and 4.2. Signed-off-by: Keir Fraser <keir@xen.org> Tested-and-Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* libxl: Tolerate xl config files missing trailing newlineIan Jackson2012-09-142-78/+88
| | | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Fix missing dependency in api check ruleIan Jackson2012-09-141-4/+4
| | | | | | | | | | | | | | | | | Without this, the api check cpp run might happen before the various autogenerated files which are #include by libxl.h are ready. We need to remove the api-ok file from AUTOINCS to avoid a circular dependency. Instead, we list it explicitly as a dependency of the object files. The result is that the api check is the last thing to be done before make considers the preparation done and can start work on compiling .c files into .o's. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xentop.c: Change curses painting behavior to avoid flickerJason McCarver2012-09-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | Currently, xentop calls clear() before drawing the screen and calling refresh(). This causes the entire screen to be repainted from scratch on each call to refresh(). It is inefficient and causes visible flicker when using xentop. This patch fixes this by calling erase() instead of clear() which overwrites the current screen with blanks instead. The screen is then drawn as usual in the top() function and refresh() is called. This method allows curses to only repaint the characters that have changed since the last call to refresh(), thus avoiding the flicker and sending fewer characters to the terminal. In the event the screen becomes corrupted, this patch accepts a CTRL-L keystroke from the user which will call clear() and force a repaint of the entire screen. Signed-off-by: Jason McCarver <slam@parasite.cc> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: do not leak cpupool names.Ian Campbell2012-09-144-10/+25
| | | | | | | | | | | | | | | | | | | | Valgrind reports: ==3076== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==3076== at 0x402458C: malloc (vg_replace_malloc.c:270) ==3076== by 0x406F86D: libxl_cpupoolid_to_name (libxl_utils.c:102) ==3076== by 0x8058742: parse_config_data (xl_cmdimpl.c:639) ==3076== by 0x805BD56: create_domain (xl_cmdimpl.c:1838) ==3076== by 0x805DAED: main_create (xl_cmdimpl.c:3903) ==3076== by 0x804D39D: main (xl.c:285) And indeed there are several places where xl uses libxl_cpupoolid_to_name as a boolean to test if the pool name is valid and leaks the name if it is. Introduce an is_valid helper and use that instead. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Juergen Gross<juergen.gross@ts.fujitsu.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>