aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* xenstored: Fix processing of zero-length messagesDaniel De Graaf2011-11-011-1/+0
| | | | | | | | | | | When a message with zero length is sent to xenstore, the body of the message was not processed until the socket or ring had more data to read; this will cause deadlocks if the requestor is waiting on a response to continue. 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: add a flags argument to libxl_ctx_alloc.Ian Campbell2011-10-186-6/+9
| | | | | | | | | Currently unused but gives us scope for expansion in an ABI compatible manner in the future. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert PCI device handling to device APIIan Campbell2011-10-188-106/+165
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: reorder device functions to put functions for each device together.Ian Campbell2011-10-181-209/+211
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert VFB handling to device APIIan Campbell2011-10-185-20/+66
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert VKB handling to device APIIan Campbell2011-10-185-34/+61
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: remove libxl_device_console_add.Ian Campbell2011-10-184-33/+0
| | | | | | | | | | | | It has no callers, the only code which adds consoles in internal to libxl and uses libxl__device_console_add directly. Rather than worrying about what the public API should look like in this case simply remove it, adding new APIs is much easier than fixing broken ones... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert NIC handling to device APIIan Campbell2011-10-185-46/+66
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert disk handling to device APIIan Campbell2011-10-185-56/+104
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: use more descriptive variable names in libxl__devices_destroy.Ian Campbell2011-10-181-13/+14
| | | | | | | | | | It's not immediately clear that "l1" iterates over device types and "l2" iterates over individual devices. Name things in a way which makes this more obvious. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: merge libxl__device_del into libxl__device_removeIan Campbell2011-10-183-62/+60
| | | | | | | | | | | Note that the "wait" parameter added to libxl_device_remove is different to the wait paramter previously used by similar functions. In the past not-wait meant forced whereas now in means wait for a graceful shutdown, as opposed to setting off a graceful shutdown but not waiting. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: use libxl__device in libxl_devices_destroy etc.Ian Campbell2011-10-183-24/+58
| | | | | | | | | | | Use libxl__device in libxl_devices_destroy and libxl__device_pci_remove_xenstore. Doing this allows us to use the common functions for removing devices. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: do not remove unidentified frontend paths in libxl__devices_destroyIan Campbell2011-10-181-2/+0
| | | | | | | | | | | Currently this appears to only include "/local/domain/<domid>/device/suspend". Ultimately the caller will nuke the whole guest directory anyway but not having this function remove things which don't look like devices seems less surprising. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: use IDL to define device front- and back-end kindsIan Campbell2011-10-185-57/+38
| | | | | | | | I'd like to use the from_string functionality... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: split forced and non-forced uses of libxl__device_delIan Campbell2011-10-184-25/+40
| | | | | | | | | | | | | | | | | Most forced users can now simply call libxl__device_destroy directly. libxl__devices_destroy is something of a special case, it is really just iterating over an opaque set of xenstore directories and removing them. Until this can be refactored just do the force-remove case manually, doing otherwise led to too much entanglement with the other callers of libxl__device_destroy which do know about specific device types. For the time being do the same in libxl__device_pci_remove_xenstore. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: separate forced and non-forced device remove.Ian Campbell2011-10-183-13/+25
| | | | | | | | | | | | | | | | | | | | | | | The function libxl__device_destroy currently takes a force parameter however: * in the forced case we initiate a graceful shutdown and then immediately nuke the backend directory, quite likely before anyone got a chance to react. * the callers all have a "wait" variable and pass in "!wait" as the force argument which is confusing since not waiting is not really the same thing as forcing the destroy. Therefore split the function into libxl__device_remove and libxl__device_destroy. The former initiates a graceful shutdown which the latter simply nukes the backend directory. This makes some of the callers look a bit odd but that should fall out as I continue to pull this piece of string. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: libxl_devid_to_* should take an integer device idIan Campbell2011-10-183-10/+10
| | | | | | | | Currently takes a string. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: reimplement devid->disk in terms of from_xs_be function.Ian Campbell2011-10-182-44/+27
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: reimplement devid->nic in terms of from_xs_be function.Ian Campbell2011-10-182-36/+27
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: update nic list API to use common device API styleIan Campbell2011-10-185-71/+154
| | | | | | | | | libxl_device_nic_list returns an array of libxl_device_nic and libxl_device_nic_getinfo retrieves further information. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: do not read f.e. xenstore dir in disk list functionIan Campbell2011-10-181-4/+3
| | | | | | | | | | | Instead store a duplicate of the "device-type" node in the backend dir and use that instead. This maintains the invariant that the list function is always "safe". Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: refactor code to construct disk from xenstore backendIan Campbell2011-10-181-29/+52
| | | | | | | | Temporarily retain unsafe behaviour of reading f.e. directory. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: various fixes to libxl_device_disk_list (and internals)Ian Campbell2011-10-181-12/+32
| | | | | | | | | | - handle realloc errors - remove redundancy of libxl__append_disk_list_of_type return value and ndisks paramter. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: add a comment describing the device interfaces.Ian Campbell2011-10-181-0/+59
| | | | | | | | | Subsequent patches will endeavour to make reality match this defined interface. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: libxl_destroy_cpumap becomes libxl_cpumap_destroyIan Campbell2011-10-183-4/+4
| | | | | | | | | Now that IDL type destructors are no longer libxl_*_destroy we can use the more common libxl_NOUN_VERB structure here. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: idl: use "dispose" rather than "destroy" for function to free IDL typesIan Campbell2011-10-1813-95/+95
| | | | | | | | | | | Destroy is an overloaded term which would commonly like to be used for actual destructive operations, such as destroying a domain etc. Dispose isn't a great term but it does the job. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: remove generated file testidl.c on cleanIan Campbell2011-10-181-0/+1
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* hvmloader: Load DSDT table from parameterAnthony PERARD2011-10-284-20/+44
| | | | | | | | | In order to have two different DSDT tables for rombios and SeaBIOS, this patch introduce a new parameter to acpi_build_tables() which contain the DSDT table to load. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi/dsdt: Fix PCI hotplug with the new qemu-xen.Anthony PERARD2011-10-282-60/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACPI PIIX4 device in QEMU upstream as not the same behavior to handle PCI hotplug. This patch introduce the necessary change to the DSDT ACPI table to behave as expceted by the new QEMU. To switch to this new DSDT table version, there is a new option --dm-version to mk_dsdt. Change are inspired by SeaBIOS DSDT source code. There is few things missing with the new QEMU: - QEMU provide the plugged/unplugged status only per slot (and not per func like qemu-xen-traditionnal. - I did not include the _STA ACPI method that give the status of a device (present, functionning properly) because qemu-xen does not handle it. - I did not include the _RMV method that say if the device can be removed, because the IO port of QEMU that give this status always return true. In SeaBIOS table, they have a specific _RMV method for VGA, ISA that return false. But I'm not sure that we can do the same in Xen. So, the only way to remove a device is from outside of the guest (like with xl pci-detatch), and can not be initiated from inside. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: In mk_dsdt, Use __attribute__ format.Anthony PERARD2011-10-281-1/+2
| | | | | | | | Use __attribute__((format(printf,..))) for the function _stmt to prevent any mistake. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi/dsdt: Move IO port range reservationAnthony PERARD2011-10-282-14/+13
| | | | | | | | | | This patch move the IO port range reservation from the dsdt.asl to mk_dsdt. This IO port range need to be generated by mk_dsdt, because qemu-xen use different port. The IO port for qemu-xen will be added in a later patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi: Introduce --maxcpu option to mk_dsdtAnthony PERARD2011-10-282-8/+47
| | | | | | | | With this new option, there is no need to compile mk_dsdt for each DSDT table that we want. The Makefile is a bit reorganize to handle this new option and to prepare more change in a coming patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
* pygrub: example grub2 configuration file (fedora-16-with-xen.grub2)Michael Young2011-10-251-0/+112
| | | | | | | | | Sample grub2 configuration file (some duplication removed) from Fedora 16 with a xen hypervisor installed Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pyrgrub: cope with configurations with set default="${saved_entry}" lineMichael Young2011-10-251-0/+2
| | | | | | | | | | Fedora 16 grub2 configuration file can have lines like set default="${saved_entry}" and a string containing an integer is expected Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: cope with configurations with submenusMichael Young2011-10-251-2/+11
| | | | | | | | | | | | | | | | | The grub2 configuration file in Fedora 16 can have one or more menuentrys in a submenu, with configuration of the form submenu "Xen 4.1" { menuentry ... { ... } } (this example occurs when the xen hypervisor is installed on the guest) Ignore the submenu line and the corresponding } Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: Allow GPT partition referencesMichael Young2011-10-251-0/+2
| | | | | | | | The grub2 configuration file in Fedora 16 can have GPT partition references like (hd0,gpt2) so remove the "gpt" string where necessary Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: look in /boot/grub2 (for eg Fedora 16)Michael Young2011-10-251-1/+2
| | | | | | | | Fedora 16 puts grub configuration files in /boot/grub2/grub.cfg so pygrub should look there as well Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: check all GPT partitionsMichael Young2011-10-251-4/+13
| | | | | | | | | | | | | On Fedora 16 the first GPT partition is a boot partition for grub2 with the grub2 configuration in the second partition. Check all GPT partitions for grub configuration, not just the first. [ Also remove now-inaccurate comment. -iwj ] Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Tested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: add missing "break;" to do_pci_removeIan Campbell2011-10-251-0/+1
| | | | | | | | | | | Otherwise we erroneously fall through the LIBXL_DOMAIN_TYPE_PV case into the "default: abort()". (I'm sure we fixed this once already...) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Dario Faggioli <dario.faggioli@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86 pm: provide CC7/PC2 residencyYang Zhang2011-10-253-4/+18
| | | | | | | | | Sandy bridge introduces new MSR to get cc7/pc2 residency (core C-state 7/package C-state 2). Print the cc7/pc2 residency when on sandy bridge platform. Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* xenpaging: disallow paging in a PoD guestOlaf Hering2011-10-201-0/+3
| | | | | | | | | Disallow xenpaging in a PoD guest until coexistance between the two features is properly implemented. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* libxl: remove QMP warning when no pty style serial device is configuredIan Campbell2011-10-131-1/+1
| | | | | | | | | | | | If the serial device is not "pty" then there is nothing to do but this is not an error. Removes a spurious warning if e.g. serial="file:/tmp/serial.log" is used: libxl: error: libxl_qmp.c:137:register_serials_chardev_callback: Failed to store serial port information in xenstore: No such file or directory Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: report missing backends in common codeIan Campbell2011-10-133-6/+16
| | | | | | | | | | | Backends were inconsistent about reporting and it's a pain to edit them all when adding a new class of osdep. Signed-off-by: Ian Campbell <Ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- Requires Daniel De Graaf's "libxc: add xc_gntshr_* functions"
* libxl: libxl__e820_alloc must take a libxl__gc.Ian Campbell2011-10-133-3/+4
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: correctly propagate errors from libxl_domain_resumeIan Campbell2011-10-131-1/+1
| | | | | | | | currently it return success no matter what. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* ocaml: align build outputIan Campbell2011-10-171-3/+3
| | | | | | | | | | | | | Fix: MLI op.mli MLI op.cmi MLI partial.mli MLI partial.cmi MLI packet.mli Signed-off-by: Ian Cmpabell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: probe disk backend type in libxl_device_disk_addIan Campbell2011-10-131-0/+3
| | | | | | | | | Without this "xl block-attach" does not work. On create do_domain_create already catches this. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: add a test case for correct parsing of disk "backendtype" fieldIan Campbell2011-10-071-0/+16
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xl: use libxl_device_disk_to_json to pretty print disk configurationIan Campbell2011-10-072-29/+27
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> 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>
* xl: allow check-xl-disk-parse to run against installed xl as well as build dirIan Campbell2011-10-071-2/+8
| | | | | | | | | | | | | I can't run from the current directory since my build box isn't running Xen so if ./xl doesn't exist use the installed version on the assumption that I've copied the script to a test host. I think running from the build dir needs the blktap2 libraries, so update LD_LIBRARY_PATH as appropriate. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>