aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Tools: build testsAndres Lagar-Cavilla2012-02-062-0/+22
| | | | | | | | | | | | | Build tests as part of the tools build. It is enabled with CONFIG_TESTS in Config.mk Currently disabled build of tests/regressions and tests/xen-access (in 32-bit mode) as they fail. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* flask: Update flask_op hypercall structureDaniel De Graaf2012-02-063-257/+220
| | | | | | | | Instead of placing string parsing inside the hypervisor, use binary structures like other Xen hypercalls do. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* tools/flask: remove libflaskDaniel De Graaf2012-02-0615-717/+94
| | | | | | | | This library has been deprecated since July 2010; remove the in-tree users and library. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* flask/policy: Add boolean exampleDaniel De Graaf2012-02-021-1/+9
| | | | | | | | | This shows an example boolean (prot_doms_locked) which can be set at runtime to prevent dom0 from mapping memory of domains of type prot_domU_t. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* flask: add flask-{get,set}-bool toolsDaniel De Graaf2012-02-023-1/+169
| | | | | | | | | | | These utilities can be used to modify policy booleans, which allow minor policy changes without reloading the security policy. This can be used to make security policy change based on external information such as time of day, user physical presence, completion of system boot, or other relevant variables. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* libflask: Add boolean manipulation functionsDaniel De Graaf2012-02-022-0/+62
| | | | | | | Add wrappers for getting and setting policy booleans by name or ID. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* flask/policy: use declare_domain for dom0_tDaniel De Graaf2012-02-022-5/+3
| | | | | Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* flask/policy: Add user and constraint examplesDaniel De Graaf2012-02-023-18/+39
| | | | | | | | | These examples show how to use constraints and the user field of the security label to prevent communication between virtual machines of different customers in a multi-tenant environment. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* flask/policy: Policy build updatesDaniel De Graaf2012-02-023-63/+20
| | | | | | | | | | Eliminate temporary files used in creating FLASK policy to improve error reporting during policy build. Syntax errors now point to the file and line number visible to the user, not the intermediate temporary file. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* xl: allow enable automatic fallback to ACPI events if PV control not available.Ian Campbell2012-01-311-16/+39
| | | | | | | | | | | | | Add a -F (fallbacks) option to xl destroy|reboot to cause an ACPI shutdown or reset event to be sent to the guest in the event that the guest does not support the PV control interface. This is not the default because the response to these triggers is an guest-internal 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: add named enum for timer mode.Ian Campbell2012-01-314-4/+45
| | | | | | | | | | | | | | | | Unlike previous iterations of this patch the enum values now match the underlying domctl values. I looked at updating xl.cfg(5) for these while I was here but frankly, even after reading the comment in xen/include/public/hvm/params.h, I don't have a clue what they mean, no_missed_ticks_pending in particular might as well be written in klingon... For the same reason I didn't try and give the enum more user-friendly names. 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 libxl_cpuarray -- topology was the only user.Ian Campbell2012-01-317-97/+1
| | | | | | 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: expose cpu topology as a single list of cpu->{node,core,socket} maps.Ian Campbell2012-01-3110-128/+128
| | | | | | | | | Rather than the previous tripple list which is more complicated to work with and harder for language bindings. 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>
* ocaml: Topology.get returns an array not a single element.Ian Campbell2012-01-312-2/+2
| | | | | | | | The stub implementation appears to already be correct. 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>
* ocaml: add helpers for Some/None option types.Ian Campbell2012-01-311-3/+15
| | | | | | 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_button_press in favour of libxl_send_trigger.Ian Campbell2012-01-317-82/+58
| | | | | | | | | | | | | send_trigger already included all the operations covered by button_press. Rework send_trigger to take an enum instead of a string. I stopped short at removing the xl "button-press" command but instead have marked it as deprecated. 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: de-hard-tabbify idl.txtIan Campbell2012-01-311-22/+19
| | | | | | | | | | Hard tabs were in the minority, nuke them. Also we no longer supply the inaddr_ip builtin. 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: Rename libxl IDL infrastructure.Ian Campbell2012-01-319-89/+86
| | | | | | | | | | | | | | | | Originally libxltypes.py provided the infrastructure and libxl.idl provided the specific types. In 23887:a543e10211f7 libxl.idl became libxl_types.idl (to allow for libxl_types_internal.idl) which means we now have libxl_types.FOO and libxltypes.FOO providing different things and annoying people in tab completion. Rename the infrastructure as idl. 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: 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-319-148/+102
| | | | | | | | | 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-314-40/+47
| | | | | | | | 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-317-60/+65
| | | | | | 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-313-6/+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-314-14/+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-313-8/+6
| | | | | | | | | | 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-314-44/+53
| | | | | | 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-314-117/+157
| | | | | | 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-313-10/+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-314-20/+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-313-52/+39
| | | | | | 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-315-53/+64
| | | | | | | | 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-315-40/+39
| | | | | | 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-313-35/+47
| | | | | | 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-316-86/+91
| | | | | | | | | | | 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>
* ocaml: use libxl IDL type helpers for C argument passingIan Campbell2012-01-311-17/+11
| | | | | | | | | | | | Makes handling of nested structs more correct. Only change to the generated code right now is that the FOO_Val (C->ocamlC) function for Enumeration types now takes the C argument by value instead of reference. 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 keyword arguments for field definitions in aggregate types.Ian Campbell2012-01-312-5/+5
| | | | | | | | | | | The original code is not so bad now that the comments are gone but this is still a bit cleaner. No change in the generated code. 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 comment support from IDLIan Campbell2012-01-314-125/+92
| | | | | | | | | | | | | | | | People typically don't look for comments in generated source and the syntax for specifying them in the IDL makes things harder to follow. Instead just use source code comments in the IDL itself. I dropped a bunch of "foo bool # enable or disable foo" type comments. A lot of the remainder still aren't terribly useful though. No change to the generate code other than the comments being removed. 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 write/maintain "pool_name" in XenStoreIan Campbell2012-01-312-28/+0
| | | | | | | | Nothing that I can find ever reads this key. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: juergen.gross@ts.fujitsu.com Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: name libxl_create_cpupool consistent with other functions.Ian Campbell2012-01-313-4/+4
| | | | | | | | | The pattern for the other cpupool functions is libxl_cpupool_<ACTION> and in general we use libxl_<THING>_<ACTION> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: juergen.gross@ts.fujitsu.com Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: remove libxl_domain_create_info.poolnameIan Campbell2012-01-313-6/+5
| | | | | | | | | | It is redundant with poolid and allowing the user to specify both opens up the possibility of a disconnect. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: juergen.gross@ts.fujitsu.com [since v2 - correct default is 0 not -1] Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: add support for yajl 2.xRoger Pau Monne2012-01-315-21/+65
| | | | | | | | | This patch adds support for yajl versions 2.x, while retaining 1.x compatibility. All the needed ifdefs can be found in libxl_json.h. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* mini-os: use BSD sys/queue.h instead of Linux list.hIan Campbell2012-01-316-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter is GPL which makes the whole of mini-os GPL rather than BSD as intended. In tree users are all GPL or GPL-compatible but we should fix this so that mini-os is BSD. Do so by using the same BSD sys/queue.h as we use in libxl. Tested with the builtin mini-os test app and qemu stubdomain, both of which appear to still function as expected. Move tools/libxl/external and the associated sed script to tools/include/xen-external to allow more sensible access from mini-os. Also add s/NULL/0/ in the sed script due to NULL not always being defined in stubdom code when mini-os/wait.h is included. As well as the obvious ABI changes there are a few API updates associated with the change: - struct rw_semaphore.wait_list is unused - remove_waiter needs to take the wait_queue_head The latter requires a qemu update, so there is also a QEMU_TAG update in this changeset. I sprinkled some extra-emacs local variables around the files I edited which didn't have them. I think this should be backported to the stable branches since external users of mini-os may have been mislead into thinking they could safely link mini-os against GPL-incompatible code. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* tools/libxc: remove volatile keyword for bitmap operationsOlaf Hering2012-01-311-5/+5
| | | | | | | | | | | | All bitmaps maintained by xc_bitops.h are used in single threaded applications. So nothing will change the bitmaps content, adding volatile adds just unneeded memory reloads. xenpaging uses bitmaps alot and using non-volatile versions will slightly improve performance. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* tools/libxc: fix bitmap_alloc usage in xc_ia64_send_vcpumapOlaf Hering2012-01-311-2/+2
| | | | | | | | Changeset 23577:607474aeefe1 introduced an error in xc_ia64_send_vcpumap(), bitmap_alloc() was not used correctly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* mini-os: convert mlock macros to C functionsOlaf Hering2012-01-312-2/+2
| | | | | | | | | mlock and munlock are implemented as macros in mini-os. Their usage requires casting in common code. Convert them to C syntax and provide an empty dummy function. Remove the now unneeded (void) cast from two munlock calls. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* libxl: treat "dying" domains as destroyedIan Jackson2012-01-303-23/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the DOMAIN_DESTROY event to DOMAIN_DEATH and have it trigger when the domain goes into the state indicated by the domaininfo flag "dying". This fixes a race which could leak a daemonised xl process, which would have ignored the domain becoming "dying" and would then wait forever to be told the domain was destroyed. After the domain becomes "dying" we can't generate an event when it is actually destroyed because xenstored will eat the relevant VIRT_DOM_EXC virq and not generate an @releaseDomain, since xenstored discards its own record of the domain's existence as soon as it sees the domain "dying" and will not trigger @releaseDomain watches for domains it knows nothing about. Arguably this is a bug in xenstored, and the whole @releaseDomain machinery is rather poor, but let us not fix that now. Anyway, xl does not really want to know when the domain is ultimately destroyed. It is enough for xl to know that it is on the way out, in the "dying" state (which leads later to destruction by Xen). Also fix a bug where domain_death_xswatch_callback might read one domain beyond the valid data in its domaininfos array, by correctly ordering the checks for empty domain list, end of domain list, and our domain being missing. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: domain_death_xswatch_callback: add some debug loggingIan Jackson2012-01-301-2/+24
| | | | | | 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>
* xen: allow global VIRQ handlers to be delegated to other domainsDaniel De Graaf2012-01-283-0/+20
| | | | | | | | | | | | | | | | | This patch sends global VIRQs to a domain designated as the VIRQ handler instead of sending all global VIRQ events to dom0. This is required in order to run xenstored in a stubdom, because VIRQ_DOM_EXC must be sent to xenstored for domain destruction to work properly. This patch was inspired by the xenstored stubdomain patch series sent to xen-devel by Alex Zeffertt in 2009. 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> Committed-by: Keir Fraser <keir@xen.org>
* libxl: allow for specifying the CPU affinity in the config file.Dario Faggioli2012-01-277-60/+117
| | | | | | | | | Enable CPU affinity specification in a VM's config file with the exact syntax `xl vcpu-pin' provides. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>