aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_dm.c
Commit message (Collapse)AuthorAgeFilesLines
...
* libxl: Pass actual RAM amount to qemu-xenAnthony PERARD2012-04-031-4/+3
| | | | | | | | QEMU upstream need to kown the amount of RAM given to a guest. This patch give the correct value. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: log device model arguments to aid debuggingIan Campbell2012-03-191-1/+5
| | | | | | | At the moment the only easy way to get at these is to strace xl. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: add libxl_domain_build_info_init_typeIan Campbell2012-03-011-1/+2
| | | | | | | | | Use instead of parameterising libxl_domain_build_info_init. This allows callers to initialise a libxl_domain_build_info but not to commit to a particular type later on (e.g. after they've parsed the domain config) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: switch device model selection over to libxl_defboolIan Campbell2012-03-011-2/+2
| | | | | | | | This allows it to be set via the _init/_setdefault methods. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [since last v -- ERROR_INVAL on stubdomains + !traditional qemu]
* libxl: Select BIOS using libxl_domain_build_info_setdefaultsIan Campbell2012-03-011-16/+7
| | | | | | | | | Remove libxl__domain_bios -- it is no longer necessary. Also we appear to have been setting the xenstore key even for device models for PV guests -- stop doing that. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: use defbool for graphics related optionsIan Campbell2012-03-011-15/+15
| | | | | | | This allows them to be set via the _init/_setdefault methods. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: make boolean members of libxl_domain_build_info into libxl_defboolIan Campbell2012-03-011-5/+5
| | | | | | | | | This allows them to be set via the _init/_setdefault methods. This just covers the obvious ones. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: make libxl_device_console internalIan Campbell2012-03-011-5/+5
| | | | | | | | | | | | | | consoles are not directly exposed to users of the library and there are no API functions for manipluating them (only the console_exec function). Rather than commit to a particular API now make the type internal. When a user does come along it is much easier to add a completely new API rather than to fix an existing broken one. It's easier to do this in a manner which users of the library can cope with in a compatible way e.g. adding a new API is easier to check for with ./configure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: vfb/vkb: use _init/_setdefaultIan Campbell2012-03-011-2/+2
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: provide _init and _setdefault for libxl_domain_build_info.Ian Campbell2012-03-011-3/+4
| | | | | | | Some fields require further scaffolding before they can use the _init/_setdefault scheme and are handled in later patches. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: provide _init and _setdefault for libxl_domain_create_info.Ian Campbell2012-03-011-1/+4
| | | | | | | | | | Some fields require further scaffolding before they can use the _init/_setdefault scheme and are handled in later patches. It doesn't seem reasonable for the library to pick a default for the domain type so reject as invalid. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl, xl: Add the bios option to specify the bios to loadAttilio Rao2012-02-291-0/+2
| | | | | | Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Set VNC password through QMPAnthony PERARD2012-02-201-9/+15
| | | | | | | | | | This patch provide the code to set the VNC password to QEMU upstream through VNC. The password is still stored in xenstore but will not be used by QEMU upstream. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Provide dm_vnc() as a in libxl helper.Anthony PERARD2012-02-201-4/+4
| | | | | | | | Just to use this function in more than one file.c. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: Add device_model_stubdomain_seclabelDaniel De Graaf2012-02-091-0/+1
| | | | | | | | This allows the security label of stub domains to be specified. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: only write "disable_pf" key to xenstore when it makes senseIan Campbell2012-01-311-2/+6
| | | | | | | | This key is only used by the traditional qemu-dm when servicing an HVM domain. 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: remove libxl_device_model_info.Ian Campbell2012-01-311-83/+79
| | | | | | | | | All that is left here is the target domain's domid which we can pass around as a parameter. 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: move "saved_state" to libxl__domain_build_state.Ian Campbell2012-01-311-27/+34
| | | | | | | | This is internal to the library and need not be exposed to the user. 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: move device model selection variables to b_info.Ian Campbell2012-01-311-26/+31
| | | | | | 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: remove uuid from device model info.Ian Campbell2012-01-311-1/+1
| | | | | | | | This should be managed by libxl and need not be exposed to the user. 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: Remove libxl_device_model_info.type.Ian Campbell2012-01-311-10/+10
| | | | | | | | This is the type of the target guest which is part of the guest config. 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: move gfx_passthru setting to b_info->u.hvmIan Campbell2012-01-311-2/+2
| | | | | | | | | | Although xl parsed this value for both PV and HVM domains (and then a second time for HVM domains) inside libxl it only impacts HVM guests so I think this is the right place for it. 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: HVM device configuration info build_info->u.hvmIan Campbell2012-01-311-22/+28
| | | | | | 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: move HVM emulated GFX support into b_info->u.hvmIan Campbell2012-01-311-62/+103
| | | | | | 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 vfb[0] directly for xenpv device modelIan Campbell2012-01-311-47/+62
| | | | | | | | Rather than laundering it via dm info. 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: drop dm_info.dom_nameIan Campbell2012-01-311-8/+10
| | | | | | | | This is always the same as the c_info name which we now have available. 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: remove redundant info from dm info.Ian Campbell2012-01-311-11/+22
| | | | | | | | | | | Remove "target_ram", "acpi", "vcpus" and "vcpu_avail" from device model info and use domain_build_info instead. These must all be consistently specified to both the domain and the device model, there is no need (and a great deal of danger) in exposing a way for a user of libxl to set them differently. 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: now that dm creation takes domain_config stop passing down devices.Ian Campbell2012-01-311-45/+38
| | | | | | 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: plumb libxl_domain_config down into device model creation.Ian Campbell2012-01-311-47/+55
| | | | | | | | Creating the device model derives lots of bits from the guest configuration. 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: define libxl_sdl_info to hold all info about the SDL configIan Campbell2012-01-311-7/+7
| | | | | | 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: define libxl_spice_info to hold all info about the spice serverIan Campbell2012-01-311-11/+11
| | | | | | 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: define libxl_vnc_info to hold all info about the vnc infoIan Campbell2012-01-311-37/+33
| | | | | | | | | | | Reduces duplication in libxl_vfb and libxl_device_model. Updated bindings but the python ones in particular are unlikely to be useful until a user presents itself and fixes them up. 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: fix upstream qemu binary name to what we actually installIan Campbell2012-01-271-1/+1
| | | | | | | Binary is always qemu-system-i386 even for a 64 bit build. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: use new qemu at the location where xen-unstable installs it2012-01-241-1/+1
| | | | | | | From: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: drop vfs path -- fsback/front were deleted some time agoIan Campbell2012-01-161-2/+0
| | | | | | 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: move a lot more includes into libxl_internal.hIan Jackson2012-01-131-9/+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 hvm specific ro and rw nodes.Paul Durrant2011-12-161-3/+3
| | | | | | | | | | | The hvmloader node was created by libxl__create_device_model() but it needs to be moved earlier so that it can parent the new rw generation-id-address node. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: remove force parameter from libxl_domain_destroyRoger Pau Monne2011-12-151-1/+1
| | | | | | | | | | | Since a destroy is considered a forced shutdown, there's no point in passing a force parameter. All the occurences of this function have been replaced with the proper syntax. 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>
* libxl: remove stubdom device model save file when destroying stubdomIan Campbell2011-12-151-1/+23
| | | | | | | | | | /var/lib/xen/qemu-save.<domid> is created when the stub domain is started (connected to a stubdom console) and is used to save the device model state on suspend/migrate but never cleaned up. 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: do not leak qemu saved state on restoreIan Campbell2011-12-131-3/+16
| | | | | | | | In particular do not leak /var/lib/xen/qemu-resume.<domid>. 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: Rationalise #includesIan Jackson2011-12-121-3/+1
| | | | | | | | | | | | | | | | | | | | libxl_internal.h now #includes libxl.h and various system headers. This 1. makes the order of header inclusion more predictable 2. explicitly allows libxl_internal.h to use objects defined in libxl.h 3. removes the need for individual files to include these headers Also - remove some unnecessary #includes of libxl_utils.h, flexarray.h, etc. in some libxl*.c files, - include libxl_osdeps.h at the top of libxl_internal.h - add missing includes of libxl_osdeps.h to a couple of files - change libxl.h to libxl_internal.h in a couple of files 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: Introduce migrate with the new QEMU.Anthony PERARD2011-12-011-2/+4
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: open logs with O_APPENDIan Jackson2011-11-281-1/+1
| | | | | | | | Logfiles should always be opened for append. 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 libxl__spawn_confirm_offspring_startupOlaf Hering2011-10-271-15/+6
| | | | | | | | | | | libxl__spawn_confirm_offspring_startup() is a generic version of libxl__confirm_device_model_startup(). Use libxl__spawn_confirm_offspring_startup for device model. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: add pid path to libxl__spawner_startingOlaf Hering2011-10-271-0/+1
| | | | | | | | | | | libxl_spawner_record_pid() should be able to write the pid to arbitrary paths. v2: - use const char* for ->pid_path, and update comment Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: rename dm_xenstore_record_pid to libxl_spawner_record_pidOlaf Hering2011-10-271-26/+1
| | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: rename libxl__device_model_startingOlaf Hering2011-10-271-10/+10
| | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: fixup incorrect indentationIan Campbell2011-10-121-0/+8
| | | | | | | | | Several places which were previsously indented using hard tabs are now incorrectly indented. Fix them up. 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: Introduce a QMP clientAnthony PERARD2011-09-291-0/+10
| | | | | | | | | | | | | | | QMP stands for QEMU Monitor Protocol and it is used to query information from QEMU or to control QEMU. This implementation will ask QEMU the list of chardevice and store the path to serial ports in xenstored. So we will be able to use xl console with QEMU upstream. In order to connect to the QMP server, a socket file is created in /var/run/xen/qmp-libxl-$(domid). Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: correct allocation size in libxl_list_vmIan Campbell2011-09-281-3/+3
| | | | | | | | | | | | | | *ptr has type libxl_vminfo not libxl_domid, so correct calloc call. This the second instance of this bug I've noticed recently, I did a quick audit of other similar uses of sizeof(...) and all I spotted were a couple of harmlessly reversed calloc arguments. It's a pretty strong argument for "foo = ..alloc(sizeof(*foo))" rather than "alloc(sizeof(foos_type))" though... 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>