aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* libxl: beautify json with YAJL2M A Young2013-04-121-1/+5
| | | | | | | | xl list -l should produce readable output when built with yajl2 so it is compatible with the xendomains script. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* tools+stubdom: install under /usr/local by default.Ian Campbell2013-04-122-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the hotplug scripts have been fixed to remove hardcoded paths lets try this again. From 26470:acaf29203cf9: This is the defacto (or FHS mandated?) standard location for software built from source, in order to avoid clashing with packaged software which is installed under /usr/bin etc. I think there is benefit in having Xen's install behave more like the majority of other OSS software out there. The major downside here is in the transition from 4.2 to 4.3 where people who have built from source will innevitably discover breakage because 4.3 no longer overwrites stuff in /usr like it used to so they pickup old stale bits from /usr instead of new stuff from /usr/local. Packages will use ./configure --prefix=/usr or whatever helper macro their package manager gives them. I have confirmed that doing this results in the same list of installed files as before this patch was applied. The hypervisor remains in /boot/ and there is no intention to move it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
* libxl: regenerate libxlu cfg parser after 9e14c516b6cbIan Campbell2013-04-122-30/+30
| | | | | | Fixup whitespace alignment while I'm there. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* Switch to poll() in cxenstored's IO loopWei Liu2013-04-112-60/+133
| | | | | | | | | | | | | | | | | Poll() can support more file descriptors than select(). We've done this for xenconsoled, now do this for cxenstored as well. The code is taken from xenconsoled and modified to adapt to cxenstored. Note that poll() semantic is a bit different from select(). In Linux, if a fd is set in IN/OUT fd_set and error occurs inside select(), this fd is still considered readable / writable, and it is set in the returned IN/OUT fd_set. So in later handle_input / handle_output, the connection will eventually be talloc_free'ed(). After switching to poll(), we should take care of any error right away, making the code clearer. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hotplug/Linux: Remove hardcoded pathsIan Campbell2013-04-114-22/+28
| | | | | | | Use xen-hotplugpath.sh (as NetBSD does) which allows PREFIX etc to change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monne <roger.pau@citrix.com>
* Merge branch 'staging' of xenbits.xen.org:/home/xen/git/xen into stagingIan Jackson2013-04-1119-369/+1442
|\
| * ocaml: eventchn: remove the unused exception 'Eventchn.Error'David Scott2013-04-112-6/+0
| | | | | | | | | | Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
| * ocaml: eventchn: add ocamldoc strings to the interfaceDavid Scott2013-04-111-0/+29
| | | | | | | | | | | | | | | | Also add a reference to tools/libxc/xenctrl.h, which is where the underlying C functions are defined. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
| * ocaml: eventchn: in the interface, we don't have to give implementation detailsDavid Scott2013-04-111-10/+9
| | | | | | | | | | | | | | | | Remove the mention of the C function names from the .mli -- this is only needed in the implementation .ml Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
| * ocaml: eventchn: add a 'type t' to represent an event channelDavid Scott2013-04-115-18/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a common OCaml convention to add a 'type t' in a module to represent the main "thing" that the module is about. We add an opaque type t and to_int/of_int functions for those who really need it, in particular: 1. to_int is needed for debug logging; and 2. both to_int and of_int are needed for anyone who communicates a port number through xenstore. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
| * Merge branch 'xenstore-syslog' of git://github.com/djs55/xen into stagingIan Campbell2013-04-116-52/+257
| |\
| | * oxenstored: Allow oxenstored to use syslog at levels other than DebugDavid Scott2013-03-191-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now log different kinds of events at different levels. The convention is now: new/end_connection: Debug coalesce: Debug conflict: Debug commit: Debug regular ops: Info start/end_transaction: Debug error (ENOENT): Debug error (any other): Warn watch: Info Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
| | * oxenstored: enable logging via syslog, if specified in the config file.David Scott2013-03-192-34/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To log to files the config file should contain: xenstored-log-file = /var/log/xenstored.log access-log-file = /var/log/xenstored-access.log (These two files are still the built-in defaults. The log format is unchanged.) To log to syslog the config file should contain: xenstored-log-file = syslog:<facility> access-log-file = syslog:<facility> where <facility> is the syslog facility to use (e.g. 'daemon' 'local2') Signed-off-by: David Scott <dave.scott@eu.citrix.com>
| | * oxenstored: Re-add ocaml syslog bindingDavid Scott2013-03-194-2/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was lost in the OCaml xenstored log merge of 10/Oct/2011. The binding isn't exported as a shared "log" library, instead it is kept local to xenstored. Signed-off-by: David Scott <dave.scott@eu.citrix.com>
| * | tools: memshr: arm64 supportIan Campbell2013-04-111-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not mad keen on propagating these sorts of asm atomic operations throughout our code base. Other options would be: - use libatomic-ops, http://www.hpl.hp.com/research/linux/atomic_ops/, although this doesn't seem to be as widespread as I would like (not in RHEL5 for example) - use a pthread lock. This is probably the simplest/best option but I wasn't able to figure out the locking hierarchy of this code So I've copped out and just copied the appropriate inlines here. I also nuked some stray ia64 support and fixed a coment in the arm32 version while I was here. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | tools: libxc: arm64 supportIan Campbell2013-04-112-1/+5
| | | | | | | | | | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
| * | tools: only check for Python devel tools if not cross-compiling.Ian Campbell2013-04-112-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | tools/python and tools/pygrub are already skipped in tools/Makefile when cross-compiling, so no point in checking for the prerequisites either. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * | tools: only build blktap1 on x86Ian Campbell2013-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | It does not cross-compile for ARM and no sane new port is going to use it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * | blktap2: use sys/eventfd.h if it is availableIan Campbell2013-04-114-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arm64 only has the eventfd2 system call and using the libc wrapper when available hides this from us. eventfd() has been in libc since glibc 2.8. This code is already Linux specific. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * | tools: Use AC_SYS_LARGEFILE instead of calling getconf(1)Ian Campbell2013-04-114-273/+1040
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getconf is not cross-compile friendly since it reports the features of the host and not the target. There doesn't appear to be a $triplet-getconf. AC_SYS_LARGEFILE arranges for #defines to appear in config.h however Xen's build system expects these to be part of C{PP}FLAGS. Since I'm not confident that everything in Xen includes config.h I instead arrange for the result of running AC_SYS_LARGERFILE to end up in CFLAGS. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | | xl: fix xl config parserChoonho Son2013-04-111-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Bug: xl lexical analyzer cannot parse keyword which has .(dot) character like vif.default.script ref: 733b9c524dbc2bec318bfc3588ed1652455d30ec Error log: /etc/xen/xl.conf:28: config parsing error near `.default.script="vif-bridge"': lexical error Signed-off-by: Choonho Son <choonho.son@gmail.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Roger Pau Monne <roger.pau@citrix.com>
* | xl: Accept a list for usbdevice in config fileGeorge Dunlap2013-04-081-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the "usbdevice" key to accept a list of USB devices, and pass them in using the new usbdevice_list domain build element. For backwards compatibility, still accept singleton values. Also update the xl.cfg manpage, adding information about how to pass through host devices. as applied: - Fix trailing whitespace and wrap some lines in xl_cmdimpl.c -iwj v2: - Add some verbiage to make it clear that "usb" is for emulated devices - Reference qemu manual for more usbdevice options Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: Allow multiple USB devices on HVM domain creationGeorge Dunlap2013-04-083-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows an HVM domain to be created with multiple USB devices. Since the previous interface only allowed the passing of a single device, this requires us to add a new element to the hvm struct of libxl_domain_build_info -- usbdevice_list. For API compatibility, the old element, usbdevice, remains. If hvm.usbdevice_list is set, each device listed will cause an extra "-usbdevice [foo]" to be appended to the qemu command line. Callers may set either hvm.usbdevice or hvm.usbdevice_list, but not both; libxl will throw an error if both are set. In order to allow users of libxl to write software compatible with older versions of libxl, also define LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST. If this is defined, callers may use either hvm.usbdevice or hvm.usbdevice_list; otherwise, only hvm.usbdevice will be available. as applied: - Fix whitespace errors -iwj v3: - Duplicate functionality in both "new" and "old", since we're not unifying the two anymore. v2: - Throw an error if both usbdevice and usbdevice_list are set - Update and clarify definition based on feedback - Previous patches means this works for both traditional and upstream Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | xl: default autoballoon option to "auto"David Vrabel2013-04-081-2/+4
| | | | | | | | | | | | | | | | In xl.conf, autoballoon="auto" will do the right thing for most people. Make it the default (instead of "on"). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | xl: extend autoballoon xl.conf option with an "auto" optionDavid Vrabel2013-04-082-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | autoballoon=1 is not recommened if dom0_mem was used to reduce the amount of dom0 memory. Instead of requiring users to change xl.conf if they do this, extend the autoballoon option with a new choice: "auto". With autoballoon="auto", autoballooning will be disabled if dom0_mem was used on the Xen command line. For consistency, accept "on" and "off" as valid autoballoon options (1 and 0 are still accepted). The default remains "on" for now. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | tools/ocaml: Correct META for libxl bindingsAndrew Cooper2013-04-081-2/+2
| | | | | | | | | | | | | | | | | | This was missed by c/s 23936:cdb34816a40a which renamed xl -> xenlight [ 23936:cdb34816a40a is 7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b in git -iwj ] Reported-by: alien@rmail.be Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
* | remus: init sch_plug module based on kernel versionShriram Rajagopalan2013-04-082-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remus: init sch_plug module based on kernel version sch_plug module, for network buffering, is available as part of linux kernel (from 3.4 onwards), as opposed to an out-of-tree module. The netlink message format to talk to the in-kernel module is different from that of the old version. So, before initializing the Plug Qdisc, check the kernel version and use the appropriate message format. Also change the names of the constants to reflect the format used by the mainline module [CHECKPOINT -> BUFFER , RELEASE -> RELEASE_ONE ]. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
* | libxl: run libxl__arch_domain_create() much earlier.Tim Deegan2013-03-284-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other things, arch_domain_create() sets the shadow(/hap/p2m) memory allocation, which must happen after vcpus are assigned (or the shadow op will fail) but before memory is allocated (or we might run out of p2m memory). libxl__build_pre(), which already sets similar things like maxmem, semes like a reasonable spot for it. That needed a bit of plumbing to get the right datastructure from the caller. As a side-effect, the return code from libxl__arch_domain_create() is no longer ignored. This bug was analysed in: From: "Jan Beulich" <JBeulich@xxxxxxxx> "Re: [Xen-devel] [xen-unstable test] 16788: regressions - FAIL" Date: Mon, 04 Mar 2013 16:34:53 +0000 http://lists.xen.org/archives/html/xen-devel/2013-03/msg00191.html Reported-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: Tim Deegan <tim@xen.org> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com>
* | tools/blktap2: Handle read/write interrupts in blktap2 control plane.Dr. Greg Wettstein2013-03-281-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch: tools: Retry blktap2 tapdisk message on interrupt. Addressed a long standing regression with the blktap2 control plane. An interruption of the select system call would prematurely terminate the message sequence needed to properly shutdown a blktap2 tapdisk instance. Ian Jackson correctly noted that the read and write systems calls responsible for receiving and sending the control messages could also return EINTR resulting in similar effects. While this regression was not noted in field testing this patch adds support to re-start the calls to provide a technically complete implementation of control plane management in the presence of signals. Signed-off-by: Dr. Greg Wettstein <xen@wind.enjellic.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | trace: Add reason for NMI exit TRAPKonrad Rzeszutek Wilk2013-03-251-0/+1
| | | | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* | trace: Add the other variant of do_blockKonrad Rzeszutek Wilk2013-03-251-0/+1
| | | | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* | trace: Add trace events for IRQ activitiesKonrad Rzeszutek Wilk2013-03-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This expands the format to include the class of TRC_HW_IRQ. This means that instead of: CPU28 1753521436727 (+ 3252) unknown (0x0000000000802008) [ 0x0000006c 0x4605709c 0x4605b682 0x00000000 0x00000000 0x00000000 0x00000000 ] we now see: CPU28 1753521436727 (+ 3252) do_irq [ irq = 108, began = 1174761628us, ended = 1174779522us ] Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* | trace: Use correct trace class for power management changesKonrad Rzeszutek Wilk2013-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous to this patch we would see in the trace file: CPU28 1753503175371 (+ 8496) unknown (0x0000000000801002) [ 0x00000004 0x4158a498 0x000003a1 0x000027e6 0x00000000 0x00000000 0x00000000 ] CPU28 1753505321239 (+ 2145868) unknown (0x0000000000801003) [ 0x00000004 0x4166dca7 0x000000fa 0x00000000 0x00000000 0x00000000 0x00000000 ] CPU28 1753505343756 (+ 22517) unknown (0x0000000000801002) [ 0x00000004 0x41670fe5 0x00001284 0x00003766 0x00000000 0x00000000 0x00000000 ] CPU28 1753521413711 (+16069955) unknown (0x0000000000801003) [ 0x00000004 0x41d1e02c 0x000000ab 0x00000000 0x00000000 0x00000000 0x00000000 ] instead of: CPU28 1753503175371 (+ 8496) cpu_idle_entry [ C0 -> C4, acpi_pm_tick = 1096328344, expected = 929us, predicted = 10214us ] CPU28 1753505321239 (+ 2145868) cpu_idle_exit [ C4 -> C0, acpi_pm_tick = 1097260199, irq = 250 0 0 0 ] CPU28 1753505343756 (+ 22517) cpu_idle_entry [ C0 -> C4, acpi_pm_tick = 1097273317, expected = 4740us, predicted = 14182us ] CPU28 1753521413711 (+16069955) cpu_idle_exit [ C4 -> C0, acpi_pm_tick = 1104273452, irq = 171 0 0 0 ] The patch that added the cpu_idle_[entry|exit] was using the TRC_HW_IRQ class (0x00802000) instead of TRC_HW_PM (0x00801000) as a base. Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* | xenconsoled: use array index to keep track of pollfdWei Liu2013-03-251-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | If we use pointers to reference elements inside array, it is possible that we get wild pointer after realloc(3) copies array and returns a new pointer. Keep track of element indexes inside the array can solve this problem. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Marcus Granado <marcus.granado@citrix.com> Tested-by: Marcus Granado <marcus.granado@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: Streamline vnc argument generation codeGeorge Dunlap2013-03-251-29/+50
| | | | | | | | | | | | | | | | | | | | Makes the following changes to the vnc generation code: * Simplifies and comments it, making it easier to read and grok * Throws an error if duplicate values of display are set, rather than the current very un-intuitive behavior. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | tools: Retry blktap2 tapdisk message on interrupt.Dr. Greg Wettstein2013-03-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-start blktap2 IPC select call on interrupt. We hunted this miserable bug for a long time. The teardown of a blktap2 tapdisk instance is being carried out inconsistently up to and including the 4.2.1 release. The problem appears to be a classic 'Heisenbug' which disappears if a single function call is added to the tapdisk shutdown path. It is likely this bug has been in existence for the life of the blktap2 code. Control messages to manipulate a tapdisk instance are sent over a UNIX domain socket. A select call is used on both the read and write paths to wait on I/O and to set a timeout for the transmission and reception of the control plane messages. The existing code fails receipt or transmission of the control message on any type of error return from the select call. The xl control process receives an interrupt while waiting in the select call which in turn causes an error return with SIGINT as the return code. This prematurely terminates the teardown of the tapdisk instance leaving it in various states of shutdown. Since multiple messages are needed to implement a full teardown the tapdisk instance can be left in various states ranging from fully connected to only the minor being left allocated. The fix is straight forward. Check the return code from the select call and re-try read or write of the control message if errno is sent to EINTR. The problem manifests itself in the read path but there appears to be little reason to not add the fix to the write path as well. Both paths appear to be cut-and-paste copies of each other. Signed-off-by: Dr. Greg Wettstein <greg@enjellic.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | tools/firmware: Fix ovmf build with gcc version different from 4.4fantonifabio@tiscali.it2013-03-251-1/+1
|/ | | | Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
* xl: add vif.default.scriptRoger Pau Monne2013-03-151-1/+10
| | | | | | | | | | | Replace vifscript with vif.default.script. The old config option is kept for backwards compatibility. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: George Dunlap <george.dunlap@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: add vif.default.bridgeRoger Pau Monne2013-03-152-2/+14
| | | | | | | | | | | This is a replacement for defaultbridge xl.conf option. The now deprecated defaultbridge is still supported. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: George Dunlap <George.Dunlap@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: allow specifying a default gatewaydev in xl.confRoger Pau Monne2013-03-154-0/+23
| | | | | | | | | | | | | | This adds a new global option in the xl configuration file called "vif.default.gatewaydev", that is used to specify the default gatewaydev to use when none is passed in the vif specification. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de> Cc: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: George Dunlap <george.dunlap@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl/libxl: add gatewaydev/netdev to vif specificationRoger Pau Monne2013-03-154-2/+28
| | | | | | | | | | | | | | | | | | This option is used by the vif-route hotplug script. A new more descriptive name is used, "gatewaydev", but "netdev" is also supported as a deprecated backwards compatible option. This option was supported in the past, according to http://wiki.xen.org/wiki/Vif-route, so we should also support it in libxl. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de> Cc: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: George Dunlap <george.dunlap@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: libxl: unbreak build after ec41430ef6a7Ian Campbell2013-03-141-2/+2
| | | | | | | | | | | | | | | | | | libxl_create.c: In function ‘libxl__domain_build_info_setdefault’: libxl_create.c:109: error: ‘info’ undeclared (first use in this function) libxl_create.c:109: error: (Each undeclared identifier is reported only once libxl_create.c:109: error: for each function it appears in.) cc1: warnings being treated as errors libxl_create.c:108: error: suggest explicit braces to avoid ambiguous ‘else’ libxl_create.c: At top level: libxl_create.c:141: error: expected identifier or ‘(’ before ‘if’ ... Fix is to insert the missing opening brace and s/info/b_info/ in one spot. 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>
* libxl: use qemu-xen (upstream QEMU) as device model by defaultStefano Stabellini2013-03-134-3/+19
| | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: move check for existence of qemuu device modelIan Jackson2013-03-131-5/+8
| | | | | | | | | | | | | | The stat in libxl__domain_build_info_setdefault's default device model logic works to fall back to qemu-xen-traditional whenever the executable for qemu-xen is not found. We are going to use qemu-xen-traditional in more cases, so break this check out into its own if statement. Also add a pair of braces to make the if() statement symmetrical. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: move libxl_device_action to idlRoger Pau Monne2013-03-136-24/+25
| | | | | | | | Move to idl for ease of expansion and auto-generated functions. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: remove double check in NetBSD hotplugRoger Pau Monne2013-03-131-4/+0
| | | | | | | | | Remove a duplicated check performed in libxl__get_hotplug_script_info for NetBSD Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: don't launch more than one tapdisk process for each diskRoger Pau Monne2013-03-131-7/+10
| | | | | | | | | | | When adding a disk don't launch multiple tapdisk instances for the same disk, if transaction fails in device_disk_add reuse the same tapdisk for further tries instead of creating a new instance each time a transaction fails. Reported-by: Darren Shepherd <darren.s.shepherd@gmail.com> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Tested-by: Darren Shepherd <darren.s.shepherd@gmail.com>
* tools/xenconsoled: Initialise pointers before trying to use themAndrew Cooper2013-03-071-11/+1
| | | | | | | | | | | | | | | | This is a regression introduced by "Switch from select() to poll() in xenconsoled's IO loop." hg c/s 26405:7359c3122c5d git cc5434c933153c4b8812d1df901f8915c22830a8 which results in reliable segfaults during VM power operations. Switch to calloc(3) in an effort to avoid similar problems with changes in the future. Signed-off-by: Marcus Granado <marcus.granado@citrix.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
* tools/xentoollog: update tty detection in stdiostream_progressOlaf Hering2013-02-281-1/+3
| | | | | | | | | As suggested by IanJ: Check isatty only once to preserve the errno of ->progress users, and to reduce the noice in strace output. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Made it possible to use 'timer='delay_for_missed_ticks'Konrad Rzeszutek Wilk2013-02-261-1/+1
| | | | | | | | | | The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 0 (delay_for_missed_ticks) for the timer configuration option. Acked-by: Ian Campbell <ian.cambell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>