aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* libxl: fix typo in libxl__hotplug_nic error checkingMatthew Daley2013-09-251-1/+1
| | | | | | Coverity-ID: 1055945 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Revert "libxl, hotplug/Linux: default to phy backend for raw format file"Ian Campbell2013-09-161-3/+3
| | | | | This reverts commit 11a63a1660453269ddd1893c15d0a98133b33ca7. The change causes issues with live migration.
* libxl, hotplug/Linux: default to phy backend for raw format fileWei Liu2013-09-131-3/+3
| | | | | | | | | | | | | | | | | Modify libxl to allow raw format file to use phy backend. For the hotplug script part, learn from NetBSD's block hotplug script -- test the path and determine the actual type of file (block device or regular file) then use the actual type to determine which branch to run. With these changes, plus the current ordering of backend preference (phy > qdisk > tap), we will use phy backend for raw format file by default. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl/libxl: add gatewaydev/netdev to vif specificationRoger Pau Monne2013-03-151-1/+8
| | | | | | | | | | | | | | | | | | 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>
* libxl: use qemu-xen (upstream QEMU) as device model by defaultStefano Stabellini2013-03-131-0/+5
| | | | | | 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 libxl_device_action to idlRoger Pau Monne2013-03-131-3/+4
| | | | | | | | 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: only read script once in libxl__hotplug_*Ian Campbell2012-08-031-12/+4
| | | | | | | | | instead of duplicating the error handling etc in get_hotplug_env just pass the script already read by the caller down. 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: call hotplug scripts for nic devices from libxlRoger Pau Monne2012-07-261-4/+104
| | | | | | | | | | | | | | | Since most of the needed work is already done in previous patches, this patch only contains the necessary code to call hotplug scripts for nic devices, that should be called when the device is added or removed from a guest. Added another parameter to libxl__get_hotplug_script_info, that is used to know the number of times hotplug scripts have been called for that device. This is currently used by IOEMU nics on Linux. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson<ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: call hotplug scripts for disk devices from libxlRoger Pau Monne2012-07-261-0/+97
| | | | | | | | | | | | | | | | Since most of the needed work is already done in previous patches, this patch only contains the necessary code to call hotplug scripts for disk devices, that should be called when the device is added or removed from a guest. We will chain the launch of the disk hotplug scripts after the device_backend_callback callback, or directly from libxl__initiate_device_{add,remove} if the device is already in the desired state. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: introduce libxl__alloc_vdevStefano Stabellini2012-05-291-0/+52
| | | | | | | | | Introduce libxl__alloc_vdev: find a spare virtual block device in the domain passed as argument. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: move a lot more includes into libxl_internal.hIan Jackson2012-01-131-1/+1
| | | | | | | | | | | | | | | | | Move a lot of #include <stdfoo.h> from individual files into libxl_internal.h. This helps avoid portability mistakes where necessary system headers are omitted from individual files, and is also of course a convenience when developing. Also add #include "libxl_osdeps.h" /* must come before any other headers */ to the top of most libxl*.c files, so that anyone who adds any headers before libxl_internal.h will put the in the right place. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: add support for image files for NetBSDRoger Pau Monne2011-09-301-0/+27
| | | | | | | | | | | Created a helper function to detect if the OS is capable of using image files as phy backends. Create two OS specific files, and changed the Makefile to choose the correct one at compile time. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxl: Revert broken NetBSD portability patchesIan Jackson2010-07-231-50/+0
| | | | | | | | | Revert df9d8319bd37 Fix blktap2 NetBSD build and also revert broken change e76befc7fe2d portability fixes from tools/console 24277e3237ca Fix linking error when creating the xl binary. Now it builds again.
* tools/libxl: Fix blktap2 NetBSD build and also revert broken changeChristoph Egger2010-07-231-0/+50
Fix e76befc7fe2d which broke the build. Also revert 24277e3237ca which was broken. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>