aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* mini-os: remove per-fd evtchn limitAlex Zeffertt2012-02-091-66/+74
| | | | | | | | | | | | | This changes the minios evtchn implementation to use a list instead of an array which ahis allows it to grow as necessary to support any number of ports, only limited by Xen (NR_EVS is 1024, should be enough for now). 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: Stefano Stabellini <stefano.stabellini@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-097-7/+211
| | | | | | | | | | | | | | | | | | 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>
* flask/policy: add device model types to example policyDaniel De Graaf2012-02-092-1/+23
| | | | | | | This adds an example user for device_model_stubdomain_seclabel. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> 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>
* libxl: helper function to send commands to traditional qemuShriram Rajagopalan2012-02-094-10/+16
| | | | | | | | | | | | Introduce a helper function to send commands to traditional qemu. qemu_pci_add_xenstore, qemu_pci_remove_xenstore, libxl__domain_save_device_model and libxl_domain_unpause have been refactored to use this function. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-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: bugfix: create_domain() return to caller if !daemonizeShriram Rajagopalan2012-02-091-1/+1
| | | | | | | | | | Currently the create_domain function does not honor the daemonize flag properly. It exits irrespective of the value of the flag. This patch fixes the issue. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Tools: Make xen-access test compile in 32 bits modeAndres Lagar-Cavilla2012-02-092-12/+13
| | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Keir Fraser <keir@xen.org>
* tools/python: remove references to removed libflask from setup.pyOlaf Hering2012-02-091-5/+3
| | | | | | | | | | | | | | | Build in SLES11 SP1/2 fails after libflask removal. > building 'flask' extension > error: ../../tools/flask/libflask/libflask.so: No such file or > directory > make[3]: *** [install] Error 1 > make[3]: Leaving directory > `/usr/src/packages/BUILD/xen-4.2.24701/non-dbg/tools/python' > make[2]: *** [subdir-install-python] Error 2 Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* libxc: Replace malloc with alloca in hot pathSantosh Jodh2012-02-071-5/+2
| | | | | | | | Replace malloc with alloc in hot paths for improved performance. Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: extlinux parsing correctnessRoger Pau Monne2012-02-071-1/+1
| | | | | | | | | | | | The "in" operator should be used instead of the find method, since we are only interested in knowing whether the line contains "initrd=", but we don't care about it's position. Also fixes an error that happens when initrd= it's at the start of the line, since find returns 0 and is evaluated as False. 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>
* libxl: remove shebang from bash_completion helperOlaf Hering2012-02-071-1/+0
| | | | | | | | | | | Fix rpmlint warning: xen-tools.x86_64: W: sourced-script-with-shebang /etc/bash_completion.d/xl.sh /bin/bash This text file contains a shebang, but is meant to be sourced, not executed. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: use json output by defaultIan Campbell2012-02-079-182/+462
| | | | | | | | | | | | | | | | | | | | | Move the sxp producing code off into a separate file. It is supported for legacy reasons and needn't be updated other than the improve compatibility with xm. libxl_domain_config is not currently generated by the IDL (adding the necessary support for Array types is on my to do list) so hand code the json generation function for now. Since this rather directly exposes a libxl data structure it's not clear what sort of forward compatibility guarantees we can make. However it seems like it should be as stable as libxl's own API (which we are looking to stabilise) (Gratuitous string.h include needed for memset in libxl_util.h) 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: Drop -l option to xl cpupool-listIan Campbell2012-02-071-6/+1
| | | | | | | | | | The implementation (which was a nop) was removed back in 22838:aab67c1c6b87 but this now causes "set but not used" warnings from some compilers. Might as well just nuke the option entirely. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86/AMD: Add support for AMD's OSVW feature in guests.Boris Ostrovsky2012-02-071-0/+1
| | | | | | | | | | | | | | | | | | In some cases guests should not provide workarounds for errata even when the physical processor is affected. For example, because of erratum 400 on family 10h processors a Linux guest will read an MSR (resulting in VMEXIT) before going to idle in order to avoid getting stuck in a non-C0 state. This is not necessary: HLT and IO instructions are intercepted and therefore there is no reason for erratum 400 workaround in the guest. This patch allows us to present a guest with certain errata as fixed, regardless of the state of actual hardware. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* 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>