aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl
Commit message (Collapse)AuthorAgeFilesLines
* libxl: only set b_info->u.hvm.bios if type if HVMIan Campbell2012-03-021-17/+23
| | | | | | | | | | | This fixes a PV guest breakage causes by 24932:6eac4a1ee646 "libxl: Select BIOS using libxl_domain_build_info_setdefaults". I have also included a sanity check on b_info->type. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Implement libxl_sched_credit_param_[gs]etGeorge Dunlap2012-03-013-0/+70
| | | | | | | | Implement functions to set credit scheduler global parameters. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: autogenerate libxl_FOO_init and libxl_FOO_init_FIELDIan Campbell2012-03-0110-83/+173
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: idl: generate KeyedUnion key member as part of the KeyedUnionIan Campbell2012-03-012-2/+3
| | | | | | Rather than specifying it twice in the IDL. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Make IDL KeyedUnion keyvar an idl.FieldIan Campbell2012-03-014-8/+8
| | | | | | | This is more logical than having keyvar_name and keyvar_type members. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: add libxl_domain_build_info_init_typeIan Campbell2012-03-014-9/+18
| | | | | | | | | 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-015-10/+18
| | | | | | | | 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: do not explicitly initialise members of build info to zeroIan Campbell2012-03-011-7/+0
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Select BIOS using libxl_domain_build_info_setdefaultsIan Campbell2012-03-012-16/+27
| | | | | | | | | 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-016-89/+112
| | | | | | | 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: switch generation id control to libxl_defbool.Ian Campbell2012-03-015-9/+11
| | | | | | | | | | | This allows it to be set via the _init/_setdefault methods. Also switch the sense of the variable in the libxl API, since once you add defbool to the mix the double negatives become even more confusing. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Paul Durrant <Paul.Durrant@citrix.com>
* libxl: make boolean members of libxl_domain_build_info into libxl_defboolIan Campbell2012-03-018-101/+100
| | | | | | | | | 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 boolean members of libxl_domain_create_info into libxl_defboolIan Campbell2012-03-015-14/+17
| | | | | | | 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: add new "defbool" built in type.Ian Campbell2012-03-017-1/+90
| | | | | | | | This type is a but like a "boolean" but with a third state "default" (so really I suppose it's a tristate). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: pci: use _init/_setdefaultIan Campbell2012-03-014-2/+16
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: make libxl_device_console internalIan Campbell2012-03-016-31/+32
| | | | | | | | | | | | | | 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-016-12/+30
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: nic: use _init/_setdefaultIan Campbell2012-03-014-25/+40
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: disk: use _init/_setdefaultIan Campbell2012-03-015-12/+20
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: introduce a descriminating default value for memkb fields.Ian Campbell2012-03-016-19/+43
| | | | | | | | | | Consitently make such fields 64 bit values as used by dominfo. It is not clear if ->video_memkb and/or shadow_memkb shouldn't be part of ->u.hvm but I have not changed that here. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: drop 8M slack for PV guests.Ian Campbell2012-03-011-1/+1
| | | | | | | | | | | | | This serves no purpose. It relates to the old 8M to "account for backend allocations" which we used to add. This leaves a bit of unpopulated space in the Pseudo-physical address space which can be used by backends when mapping foreign memory. However 8M is not representative of that any more and modern kernels do not operate in this way anyway. I suspect an argument could be made for removing this from the libxl API altogether but instead lets just set the overhead to 0. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: use an explicit LIBXL_TIMER_MODE_DEFAULT valueIan Campbell2012-03-012-2/+6
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: provide _init and _setdefault for libxl_domain_build_info.Ian Campbell2012-03-017-26/+73
| | | | | | | 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-015-10/+20
| | | | | | | | | | 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: Document _init/_dispose/_setdefault functions.Ian Campbell2012-03-012-6/+60
| | | | | | Subsequent patches will transition to them. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: generate a _dispose function for all Aggregate typesIan Campbell2012-03-015-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't special case types which we happen to know do not contain allocated data such that in the future if this changes we do not need to add an API. Although there is likely to be latent bugs in callers due to this having the API in old libraries mean that when callers are fixed they will not need to make special arrangements to handle old and new versions of the library. Adds dispose functions for: - libxl_dominfo - libxl_cpupoolinfo - libxl_physinfo - libxl_sched_credit - libxl_sched_credit2 I have attempted to fix any latent bugs in xl by inspection but have not bothered with libxl (on the basis that internally the library is allowed to make these sorts of assumptions and because it was looking like a very invasive job and that more would only creep in anyway). Several callsites use libxl_domain_info to check for the presence of a domain and throw away the actual info. As a convenience accept a NULL info pointer and just return the status. Also fix a memory leak in libxl_domain_list. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: allow specification of testidl random seed.Ian Campbell2012-03-011-1/+2
| | | | | | | | Useful if you are interested in before/after results of changing the IDL or generator. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Remove xen/sched.h from public interfaceIan Campbell2012-03-014-16/+25
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: remove sysctl.h from public interfaceIan Campbell2012-03-016-74/+47
| | | | | | | | | Using sysctl.h is restricted to "node control tools only" and requires magic defines. Therefore make its use internal to libxl. Also removes an indirect include of domctl.h which has the same restrction. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl, xl: Add the bios option to specify the bios to loadAttilio Rao2012-02-294-0/+16
| | | | | | 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: use libxl wrapper for yajl_gen_allocOlaf Hering2012-02-292-4/+3
| | | | | | | | | | | | To fix compile errors with libyajl2: * use libxl_yajl_gen_alloc() * use libxl_yajl_length * link xl with -lyajl for yajl_gen_string() Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: rename libxl__yajl_gen_allocOlaf Hering2012-02-293-4/+4
| | | | | | | | | libxl__yajl_gen_alloc() is called by generic code, rename it to libx_yajl_gen_alloc(). Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Rename libxl_sched_* to include _domainGeorge Dunlap2012-02-234-27/+29
| | | | | | | | | | | | | In preparation for introducing a schedule parameter-based structure, rename libxl_sched_{credit,credit2,sedf} to libxl_sched_{}_domain. No functional changes. v2: Wrap long lines while I'm at it Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* build: add autoconf to replace custom checks in tools/checkIan Jackson2012-02-222-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added autotools magic to replace custom check scripts. The previous checks have been ported to autoconf, and some additional ones have been added (plus the suggestions from running autoscan). Two files are created as a result from executing configure script, config/Tools.mk and config.h. conf/Tools.mk is included by tools/Rules.mk, and contains most of the options previously defined in .config, that can now be set passing parameters or defining environment variables when executing configure script. config.h is only used by libxl/xl to detect yajl_version.h. [ tools/config.sub and config.guess copied from autotools-dev 20100122.1 from Debian squeeze i386, which is GPLv2. tools/configure generated using the included ./autogen.sh which ran autoconf 2.67-2 from Debian squeeze i386. autoconf is GPLv3+ but has a special exception for the autoconf output; this exception applies to us and exempts us from complying with GPLv3+ for configure, which is good as Xen is GPL2 only. - Ian Jackson ] Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Tested-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Export libxl_event.hBamvor Jian Zhang2012-02-211-1/+1
| | | | | | | | This fixes a compile error in libvirt. Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: cleanup: Remove pointless ERRNOVALGeorge Dunlap2012-02-211-2/+2
| | | | | | | | Just call LIBXL__LOG rather than passing a meaningless ERRNOVAL. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: add missing includesChristoph Egger2012-02-211-0/+2
| | | | | | | | | | | | include <poll.h> for struct pollfd include <sys/time.h> for struct timeval Fixes gcc complaints about implicit declaration. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Set VNC password through QMPAnthony PERARD2012-02-204-12/+47
| | | | | | | | | | 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-202-4/+6
| | | | | | | | 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_qmp: Use GC instead of CTX as parameter for _initialize.Anthony PERARD2012-02-203-18/+15
| | | | | | | | This make things a bit easier. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xl: fix xl create/cpupool-create -f help outputOlaf Hering2012-02-201-2/+2
| | | | | | | | xl create -f domU.cfg does not need an equal sign. This applies also to xl cpupool-create. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl_qmp: Handle unexpected end-of-socketAnthony PERARD2012-02-201-1/+4
| | | | | | | | | | | When read() return 0, the current code just tries again. But this leads to an infinite loop if QEMU died too soon. Also, retry select if a signal was caught. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Fix yajl-related build error due to missing error valueAllen Kay2012-02-201-1/+1
| | | | | | | | | Some versions of yajl lack yajl_gen_no_buf. Signed-off-by: Allen Kay <allen.m.kay@intel.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Add defaultbridge config option for xl.confStefan Bader2012-02-133-0/+10
| | | | | | | | | | | | | | Currently guests created with the xl stack will have "xenbr0" written as their default into xenstore. It can be changed in the individual guest config files, but there is no way to have that default globally changed. Add a config option to xl.conf that allows to have a different default bridge name. Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Add -F to usage for xl shutdown/rebootIan Campbell2012-02-131-2/+9
| | | | | | 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>
* xl: remove duplicate lineZhigang Wang2012-02-131-2/+0
| | | | | | Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: fix bootloader args settingZhigang Wang2012-02-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | When bootloader_args = ['foo', 'bar'], then info->u.pv.bootloader_args = foo\0 bar\0 \0 Before this patch, 'p++' points to the next character of 'foo\0' and never comes to 'bar\0' (because of the '\0' in 'foo\0'), so the args will be: args[0] = 'oo\0' args[1] = 'o\0' After this patch, 'p++' points to the next string of pv.bootloader_args, so we get the correct args: args[0] = 'foo\0' args[1] = 'bar\0' Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* lib{xc,xl}: Seed grant tables with xenstore and console grantsAlex Zeffertt2012-02-091-3/+15
| | | | | | | | | | | | | | | | | | This patch claims one reserved grant entry for the console and another for the xenstore. It modifies the builder to fill in the grant table entries for the console and the xenstore. Previous versions of this patch have been sent to xen-devel. See http://lists.xensource.com/archives/html/xen-devel/2008-07/msg00610.html http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01491.html Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* tools/libxl: pull xenstore/console domids from xenstoreDaniel De Graaf2012-02-092-2/+14
| | | | | | | | | | | Instead of assuming that xenstored and xenconsoled are running in dom0, pull the domain IDs from xenstore. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Add device_model_stubdomain_seclabelDaniel De Graaf2012-02-093-0/+17
| | | | | | | | 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>