aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* docs: check for documentation generation tools in docs/configure.Ian Campbell2013-01-254-25/+69
| | | | | | | | | | | | | | | | | | | | | It is sometimes hard to discover all the optional tools that should be on a system to build all available Xen documentation. By checking for documentation generation tools at ./configure time and displaying a warning, Xen packagers will more easily learn about new optional build dependencies, like markdown, when they are introduced. Based on a patch by Matt Wilson. Changed to use a separate docs/configure which is called from the top-level in the same manner as stubdoms. Rerun autogen.sh and "git add docs/configure" after applying this patch. Signed-off-by: Matt Wilson <msw@amazon.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> (For the change to introduce docs/configure) Acked-by: Roger Pau Monné <roger.pau@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: drop doxygen stuffIan Campbell2013-01-256-2793/+0
| | | | | | | | | In the 300+ page PDF this produces I couldn't see anything which wasn't the autogenerated doxygen boilerplate stuff. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Remove xen-api docsIan Campbell2013-01-2517-21843/+0
| | | | | | | | | | | | | | This document is about an old unmaintained version of the XenAPI, which bears little to no relation to what is implemented in xapi and which is only partially implemented in xend (which is deprecated). The doc hasn't seen much in the way of updates since 2009. Anyone who is actually interested can continue to use the version which was in 4.2. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* stubdom: Add autoconfMatthew Fioravante2013-01-181-17/+17
| | | | | | | | | | | | | | | | | | Stub domains now use autoconf to build. This configure script can enable or disable specific domains and also specify custom download locations for stubdom library packages. See ./configure --help for details. C and Caml are disabled by default. vtpm-stubdom is conditional on the presense of cmake. Rename vtpmmgrdom to vtpmmgr-stubdom Also update .*ignore Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Add vtpm documentationMatthew Fioravante2013-01-181-106/+251
| | | | | | | | See the files included in this patch for details Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xsm/flask: add distinct SIDs for self/target accessDaniel De Graaf2013-01-111-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the FLASK XSM module no longer checks IS_PRIV for remote domain accesses covered by XSM permissions, domains now have the ability to perform memory management and other functions on all domains that have the same type. While it is possible to prevent this by only creating one domain per type, this solution significantly limits the flexibility of the type system. This patch introduces a domain type transition to represent a domain that is operating on itself. In the example policy, this is demonstrated by creating a type with _self appended when declaring a domain type which will be used for reflexive operations. AVCs for a domain of type domU_t will look like the following: scontext=system_u:system_r:domU_t tcontext=system_u:system_r:domU_t_self This change also allows policy to distinguish between event channels a domain creates to itself and event channels created between domains of the same type. The IS_PRIV_FOR check used for device model domains is also no longer checked by FLASK; a similar transition is performed when the target is set and used when the device model accesses its target domain. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* IOMMU: add option to specify devices behaving like ones using phantom functionsJan Beulich2013-01-071-0/+10
| | | | | | | | | At least certain Marvell SATA controllers are known to issue bus master requests with a non-zero function as origin, despite themselves being single function devices. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
* libxl: introduce XSM relabel on buildDaniel De Graaf2012-12-132-0/+11
| | | | | | | | | | | | | | | | | | | | | | Allow a domain to be built under one security label and run using a different label. This can be used to prevent the domain builder or control domain from having the ability to access a guest domain's memory via map_foreign_range except during the build process where this is required. Example domain configuration snippet: seclabel='customer_1:vm_r:nomigrate_t' init_seclabel='customer_1:vm_r:nomigrate_t_building' Note: this does not provide complete protection from a malicious dom0; mappings created during the build process may persist after the relabel, and could be used to indirectly access the guest's memory. However, if dom0 correctly unmaps the domain upon building, a the domU is protected against dom0 becoming malicious in the future. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Check for duplicate vncdisplay options, and return an errorGeorge Dunlap2012-12-041-0/+6
| | | | | | | | | | | If the user has set a vnc display number both in vnclisten (with "xxxx:yy"), and with vncdisplay, throw an error. Update man pages to match. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: xl.conf(5): correct advice re autoballooning vs. dom0_mem.Ian Campbell2012-11-272-3/+8
| | | | | | | | | The advice was backwards, you should really disable autoballoon if you use dom0_mem. Also add a reference to the command-line docs. 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>
* xend: Remove old vtpm support from xmMatthew Fioravante2012-11-191-11/+0
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add vtpm supportMatthew Fioravante2012-11-132-0/+54
| | | | | | | | | | | | This patch adds vtpm support to libxl. It adds vtpm parsing to config files and 3 new xl commands: vtpm-attach vtpm-detach vtpm-list Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Introduce xl shutdown --all support for xm compatibilityIan Campbell2012-10-181-1/+6
| | | | | | | | | | Based on a patch by Sander Eikelenboom Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- fixed sizeof(foo) vs sizeof(*foo) issue pointed out by Ian J ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl/libxl: make shutdown accept the long option --wait for -wSander Eikelenboom2012-10-111-1/+1
| | | | | | | | | Make xl/libxl accept the long option --wait for -w to be compatible with xm. The long options are used in the default init and sysconfig scripts. Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs, build: Tolerate missing pod2textIan Jackson2012-10-091-1/+4
| | | | | | | | | | We gate the whole of the "txt" target on pod2text. I think this is better than gating only the pod-generated outputs; it avoids a partial output tree. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs, build: Tolerate missing fig2devIan Jackson2012-10-091-1/+3
| | | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl/libxl: add iomem supportMatthew Fioravante2012-10-051-0/+11
| | | | | | | | | | This patch adds a new option for xen config files for directly mapping hardware io memory into a vm. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Add a new pvdrivers header to serve as the register of product numbers.Paul Durrant2012-10-011-1/+1
| | | | | | | | | | | | | These product numbers are used by the QEMU blacklisting protocol in traditional QEMU and are currently coded directly into the xenstore.c source module. Since there are now multiple QEMUs this information should be pulled into a public header to avoid duplication/conflict. hvm-emulated-unplug.markdown has also been adjusted to reference the new header. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xen: Remove sched_credit_default_yield optionGeorge Dunlap2012-10-011-3/+0
| | | | | | | | | | | The sched_credit_default_yield option was added when the behavior of "SCHEDOP_yield" was changed in 4.1, to allow any users who had problems to revert to the old behavior. The new behavior has been in Xen.org xen since 4.1, and in XenServer even longer, and there is no evidence of anyone having trouble with it. Remove the option. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* docs: initial documentation for xenstore pathsIan Campbell2012-10-013-0/+424
| | | | | | | | | This is based upon my inspection of a system with a single PV domain and a single HVM domain running and is therefore very incomplete. 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>
* docs: Document scheduler-related Xen command-line optionsGeorge Dunlap2012-10-011-0/+22
| | | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: network network diagrams for the wiki (figs)Ian Jackson2012-09-252-0/+198
| | | | | | | Add the figs in hg as well as git. Sorry (again)! Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: network network diagrams for the wiki (Makefile)Ian Jackson2012-09-251-0/+15
| | | | | | | Add the Makefile in hg as well as git. Sorry. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: network diagrams for the wikiIan Jackson2012-09-251-1/+6
| | | | | | | | | | | | | | We provide two new diagrams docs/figs/network-{bridge,basic}.fig which are converted to pngs by the Makefiles and intended for consumption by http://wiki.xen.org/wiki/Xen_Networking. This is perhaps not the ideal location for this source code but we don't have a better one. 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>
* x86: introduce MWAIT-based, ACPI-less CPU idle driverJan Beulich2012-09-211-0/+8
| | | | | | | This is a port of Linux'es intel-idle driver serving the same purpose. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* docs: flesh out xl.cfg documentation, correct typos, reorganizeMatt Wilson2012-09-141-230/+256
| | | | | | | | | | | | | | | | | | | | | | | | | Some highlights: * Correct some markup errors: Around line 663: '=item' outside of any '=over' Around line 671: You forgot a '=back' before '=head3' * Add documentation for msitranslate, power_mgnt, acpi_s3, aspi_s4, gfx_passthru, nomigrate, etc. * Reorganize items in "unclassified" sections like cpuid, gfx_passthru to where they belong * Correct link L<> references so they can be resolved within the document * Remove placeholders for deprecated options device_model and vif2 * Remove placeholder for "sched" and "node", as these are options for cpupool configuration. Perhaps cpupool configuration deserves a section in this document. * Rename "global" options to "general" * Add section headers to group general VM options. Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: error if vif backend!=0 is used with run_hotplug_scriptsRoger Pau Monne2012-09-141-2/+4
| | | | | | | | | | | | | Print an error and exit if backend!=0 is used in conjunction with run_hotplug_scripts. Currently libxl can only execute hotplug scripts from the toolstack domain (the same domain xl is running from). Added a description and workaround of this issue on xl-network-configuration. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86-64/EFI: allow chaining of config filesJan Beulich2012-09-121-0/+7
| | | | | | | | | | | | | | | | | | | Namely when making use the CONFIG_XEN_COMPAT_* options in the legacy Linux kernels, newer kernels may not be compatible with older hypervisors, so trying to boot such a combination makes little sense. Booting older kernels on newer hypervisors, however, has to always work. With the way xen.efi looks for its configuration file, allowing individual configuration files to refer only to compatible kernels, and referring from an older- to a newer-hypervisor one (the kernels of which will, as said, necessarily be compatible with the older hypervisor) allows to greatly reduce redundancy at least in development environments where one frequently wants multiple hypervisors and kernles to be installed in parallel. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ns16550: command line parsing adjustmentsJan Beulich2012-09-111-1/+1
| | | | | | | | Allow intermediate parts of the command line options to be absent (expressed by two immediately succeeding commas). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* console: add EHCI debug port based serial consoleJan Beulich2012-09-111-1/+9
| | | | | | | | | | | Low level hardware interface pieces adapted from Linux. For setup information, see Linux'es Documentation/x86/earlyprintk.txt and/or http://www.coreboot.org/EHCI_Debug_Port. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: make the dom0_max_vcpus option more flexibleDavid Vrabel2012-09-111-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | The dom0_max_vcpus command line option only allows the exact number of VCPUs for dom0 to be set. It is not possible to say "up to N VCPUs but no more than the number physically present." Allow a range for the option to set a minimum number of VCPUs, and a maximum which does not exceed the number of PCPUs. For example, with "dom0_max_vcpus=4-8": PCPUs Dom0 VCPUs 2 4 4 4 6 6 8 8 10 8 Existing command lines with "dom0_max_vcpus=N" still work as before (and are equivalent to dom0_max_vcpus=N-N). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* docs: document "ucode=" hypervisor command line optionJan Beulich2012-09-101-0/+13
| | | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: correct formatting errors in xmdomain.cfgMatt Wilson2012-09-101-4/+2
| | | | | | | | | | | | | | | | | | This patch corrects the following errors produced by pod2man: Hey! The above document had some coding errors, which are explained below: Around line 301: You can't have =items (as at line 305) unless the first thing after the =over is an =item Around line 311: '=item' outside of any '=over' Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl.cfg: gfx_passthru documentation improvementsPasi Kärkkäinen2012-09-101-1/+38
| | | | | | | | | gfx_passthru: Document gfx_passthru makes the GPU become primary in the guest and other generic info about gfx_passthru. Signed-off-by: Pasi Kärkkäinen <pasik@iki.fi> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: remove WIP notice from command line docsIan Campbell2012-09-071-5/+0
| | | | | | | | | | I'm sure they aren't perfect but various people have done a pass over them recently and they are much improved. I don't think we need to continue to describe them so pessimistically. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl.cfg: videoram and stdvga documentation improvementsPasi Kärkkäinen2012-09-031-4/+13
| | | | | | | | | | | | | | | - videoram: Document that only qemu-xen-traditional device-model currently supports changing the amount of video memory for stdvga graphics device. - videoram: Better document the default amount of videoram for both stdvga and Cirrus. - stdvga: Add a note that stdvga allows bigger amount of videoram and bigger resolutions. Signed-off-by: Pasi Kärkkäinen <pasik@iki.fi> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs/command line: Clarify the behavior with invalid input.Andrew Cooper2012-09-031-2/+10
| | | | | | Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.de> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl/xl: implement support for guest ioport and irq permissions.Ian Campbell2012-09-031-0/+24
| | | | | | | | | | | | | | | | | | | | This is useful for passing legacy ISA devices (e.g. com ports, parallel ports) to guests. Supported syntax is as described in http://cmrg.fifthhorseman.net/wiki/xen#grantingaccesstoserialhardwaretoadomU I tested this using Xen's 'q' key handler which prints out the I/O port and IRQ ranges allowed for each domain. e.g.: (XEN) Rangesets belonging to domain 31: (XEN) I/O Ports { 2e8-2ef, 2f8-2ff } (XEN) Interrupts { 3, 5-6 } Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Dieter Bloms <dieter@bloms.de> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: improve documentation of Xen command line parametersMatt Wilson2012-08-311-28/+249
| | | | | | | | | | | | | | | | | | | This change improves documentation for several Xen command line parameters. Some of the Itanium-specific options are now removed. A more thorough check should be performed to remove any other remnants. I've reformatted some of the entries to fit in 80 column terminals. Options that are yet undocumented but accept standard boolean / integer values are now annotated as such. The size suffixes have been corrected to use the binary prefixes instead of decimal prefixes. Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: update xenpaging.txtOlaf Hering2012-08-301-23/+20
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* docs: console: correct example console type definitionIan Campbell2012-08-171-1/+1
| | | | | | | | I think this is intended to be under the specific console's directory. 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: support custom block hotplug scriptsIan Campbell2012-08-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are provided using the "script=" syntax described in docs/misc/xl-disk-configuration.txt. The existing hotplug scripts currently conflate two different concepts, namely that of making a datapath available in the backend domain (logging into iSCSI LUNs and the like) and that of actually connecting that datapath to a Xen backend path (e.g. writing "physical-device" node in xenstore to bring up blkback). For this reason the script support implemented here is only supported in conjunction with backendtype=phy. Eventually we hope to rework the hotplug scripts to separate the to concepts, but that is not 4.2 material. In addition there are some other subtleties: - Previously in the blktap case we would add "script = .../blktap" to the backend flex array, but then jumped to the PHY case which added "script = .../block" too. The block one takes precendence since it comes second. This was, accidentally, correct. The blktap script is for blktap1 devices and not blktap2 devices. libxl completely manages the blktap2 side of things without resorting to hotplug scripts and creates a blkback device directly. Therefore the "block" script is always the correct one to call. Custom script are not supported in this context. - libxl should not write the "physical-device" node. This is the responsibility of the block script. Writing the "physical-device" node in libxl basically completely short-cuts the standard block hotplug script which uses "physical-device" to know if it has run already or not. In the case of more complex scripts libxl cannot know the right value to write here anyway, in particular the device may not exist until after the script is called. This change has the side effect of re-enabling the checks for device sharing aspect of the default block script, which I have tested and which now cause libxl to properly abort now that libxl properly checks for hotplug script errors. There is no sharing check for blktap2 since even if you reuse the same vhd the resulting tap device is different. I would have preferred to simply write the "physical-device" node for the blktap2 case but the hotplug script infrastructure is not currently setup to handle LIBXL__DEVICE_KIND_VBD devices without a hotplug script (backendtype phy and tap both end up as KIND_VBD). Changing this was more surgery than I was happy doing for 4.2 and therefore I have simply hardcoded to the block script for the LIBXL_DISK_BACKEND_TAP case. - libxl__device_disk_set_backend running against a phy device with a script cannot stat the device to check its properties since it may not exist until the script is run. Therefore I have special cased this in disk_try_backend to simply assume that backend == phy is always ok if a script was configured. Similarly the other backend types are always rejected if a script was configured. Note that the reason for implementing the default script behaviour in device_disk_add instead of libxl__device_disk_setdefault is because we need to be able to tell when the script was user-supplied rather than defaulted by libxl in order to correctly implement the above. The setdefault function must be idempotent so we cannot simply update disk->script. I suspect that for 4.3 a script member should be added to libxl__device, this would also help in the case above of handling devices with no script in a consistent manner. This is not 4.2 material. - When the block script falls through and shells out to a block-$type script it used to pass "$node" however the only place this was assigned was in the remove+phy case (in which case it contains the file:// derived /dev/loopN device), and in that case the script exits without falling through to the block-$type case. Since libxl never creates a type other than phy this never happens in practice anyway and we now call the correct block-$type script directly. But fix it up anyway since it is confusing. - The block-nbd and block-enbd scripts which we supply appear to be broken WRT the hotplug calling convention, in that they seem to expect a command line parameter (perhaps the $node described above) rather than reading the appropriate node from xenstore. I rather suspect this was broken by 7774:e2e7f47e6f79 in November 2005. I think it is safe to say no one is using these scripts! I haven't fixed this here. It would be good to track down some working scripts and either incorproate them or defer to them in their existing home (e.g. if they live somewhere useful like the nbd tools package). - Added a few block script related entries to check-xl-disk-parse from http://backdrift.org/xen-block-iscsi-script-with-multipath-support and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html / http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and snuck in another interesting empty CDROM case) This highlighted two bugs in the libxlu disk parser handling of the deprecated "<script>:" prefix: - It was failing to prefix with "block-" to construct the actual script name - The regex for matching iscsi or drdb or e?nbd was incorrect - Use libxl__abs_path for the nic script too. Just because the existing code nearly tricked me into repeating the mistake I have tested with a custom block script which uses "lvchange -a" to dynamically add remove the referenced device (simulates iSCSI login/logout without requiring me to faff around setting up an iSCSI target). I also tested on a blktap2 system. I haven't directly tested anything more complex like iscsi: or nbd: other than what check-xl-disk-parse exercises. [ Recommit of correct version of 25727:a8d708fcb347, which was mangled during commit. Sorry. -iwj ] 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>
* Backed out changeset a8d708fcb347Ian Jackson2012-08-061-5/+2
| | | | | | | 25727:a8d708fcb347 was mangled during commit. Back it out so that we can commit it properly. Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: support custom block hotplug scriptsIan Campbell2012-08-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are provided using the "script=" syntax described in docs/misc/xl-disk-configuration.txt. The existing hotplug scripts currently conflate two different concepts, namely that of making a datapath available in the backend domain (logging into iSCSI LUNs and the like) and that of actually connecting that datapath to a Xen backend path (e.g. writing "physical-device" node in xenstore to bring up blkback). For this reason the script support implemented here is only supported in conjunction with backendtype=phy. Eventually we hope to rework the hotplug scripts to separate the to concepts, but that is not 4.2 material. In addition there are some other subtleties: - Previously in the blktap case we would add "script = .../blktap" to the backend flex array, but then jumped to the PHY case which added "script = .../block" too. The block one takes precendence since it comes second. This was, accidentally, correct. The blktap script is for blktap1 devices and not blktap2 devices. libxl completely manages the blktap2 side of things without resorting to hotplug scripts and creates a blkback device directly. Therefore the "block" script is always the correct one to call. Custom script are not supported in this context. - libxl should not write the "physical-device" node. This is the responsibility of the block script. Writing the "physical-device" node in libxl basically completely short-cuts the standard block hotplug script which uses "physical-device" to know if it has run already or not. In the case of more complex scripts libxl cannot know the right value to write here anyway, in particular the device may not exist until after the script is called. This change has the side effect of re-enabling the checks for device sharing aspect of the default block script, which I have tested and which now cause libxl to properly abort now that libxl properly checks for hotplug script errors. There is no sharing check for blktap2 since even if you reuse the same vhd the resulting tap device is different. I would have preferred to simply write the "physical-device" node for the blktap2 case but the hotplug script infrastructure is not currently setup to handle LIBXL__DEVICE_KIND_VBD devices without a hotplug script (backendtype phy and tap both end up as KIND_VBD). Changing this was more surgery than I was happy doing for 4.2 and therefore I have simply hardcoded to the block script for the LIBXL_DISK_BACKEND_TAP case. - libxl__device_disk_set_backend running against a phy device with a script cannot stat the device to check its properties since it may not exist until the script is run. Therefore I have special cased this in disk_try_backend to simply assume that backend == phy is always ok if a script was configured. Similarly the other backend types are always rejected if a script was configured. Note that the reason for implementing the default script behaviour in device_disk_add instead of libxl__device_disk_setdefault is because we need to be able to tell when the script was user-supplied rather than defaulted by libxl in order to correctly implement the above. The setdefault function must be idempotent so we cannot simply update disk->script. I suspect that for 4.3 a script member should be added to libxl__device, this would also help in the case above of handling devices with no script in a consistent manner. This is not 4.2 material. - When the block script falls through and shells out to a block-$type script it used to pass "$node" however the only place this was assigned was in the remove+phy case (in which case it contains the file:// derived /dev/loopN device), and in that case the script exits without falling through to the block-$type case. Since libxl never creates a type other than phy this never happens in practice anyway and we now call the correct block-$type script directly. But fix it up anyway since it is confusing. - The block-nbd and block-enbd scripts which we supply appear to be broken WRT the hotplug calling convention, in that they seem to expect a command line parameter (perhaps the $node described above) rather than reading the appropriate node from xenstore. I rather suspect this was broken by 7774:e2e7f47e6f79 in November 2005. I think it is safe to say no one is using these scripts! I haven't fixed this here. It would be good to track down some working scripts and either incorproate them or defer to them in their existing home (e.g. if they live somewhere useful like the nbd tools package). - Added a few block script related entries to check-xl-disk-parse from http://backdrift.org/xen-block-iscsi-script-with-multipath-support and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html / http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and snuck in another interesting empty CDROM case) This highlighted two bugs in the libxlu disk parser handling of the deprecated "<script>:" prefix: - It was failing to prefix with "block-" to construct the actual script name - The regex for matching iscsi or drdb or e?nbd was incorrect - Use libxl__abs_path for the nic script too. Just because the existing code nearly tricked me into repeating the mistake I have tested with a custom block script which uses "lvchange -a" to dynamically add remove the referenced device (simulates iSCSI login/logout without requiring me to faff around setting up an iSCSI target). I also tested on a blktap2 system. I haven't directly tested anything more complex like iscsi: or nbd: other than what check-xl-disk-parse exercises. [ reran flex/bison -iwj ] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Some automatic NUMA placement documentationDario Faggioli2012-08-011-0/+111
| | | | | | | | About rationale, usage and (some small bits of) API. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add option to choose who executes hotplug scriptsRoger Pau Monne2012-07-261-0/+8
| | | | | | | | | | | | | | | | | Add and option to xl.conf file to decide if hotplug scripts are executed from the toolstack (xl) or from udev as it used to be in the past. This option is only introduced in this patch, but it has no effect since the code to call hotplug scripts from libxl is introduced in a latter patch. This choice will be saved in "libxl/disable_udev", as specified in the DISABLE_UDEV_PATH constant. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: enable automatic placement of guests on NUMA nodesDario Faggioli2012-07-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a domain does not have a VCPU affinity, try to pin it automatically to some PCPUs. This is done taking into account the NUMA characteristics of the host. In fact, we look for a combination of host's NUMA nodes with enough free memory and number of PCPUs for the new domain, and pin it to the VCPUs of those nodes. Deciding which placement is the best happens by means of some heuristics. For instance, smaller candidates are better, both from a domain perspective (less memory spreading among nodes) and from the entire system perspective (smaller memory fragmentation). In case of candidates of equal sizes (i.e., with the same number of nodes), the amount of free memory and the number of domains' vCPUs already pinned to the candidates' nodes are both considered. Very often, candidates with greater amount of memory are the one we wants, as this is good for keeping memory fragmentation under control. However, we do not want to overcommit some node too much, just because it has a lot of memory, and that's why the number of vCPUs must be accounted for. This all happens internally to libxl, and no API for driving the mechanism is provided for now. This matches what xend already does. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Andre Przywara <andre.przywara@amd.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: support xend empty cdrom device syntaxIan Jackson2012-07-261-0/+11
| | | | | | | | | | | | | | | xend accepts `,hdc:cdrom,r' as an empty CDROM drive. However this is not consistent with the existing xl syntax in docs/misc/xl-disk-configuration.txt which requires `,,hdc:cdrom,r' (the additional positional paramter is the format). We fix this by spotting the case specially: when the target is empty and the format contains a colon, reinterpret the format as <vdev>:<devtype>. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: disk parsing preparation for empty cdrom devicesIan Jackson2012-07-261-5/+6
| | | | | | | | | | | | | | | | | | | | | Prepare the ground for parsing the xend empty cdrom syntax, by separating out some non-functional changes as this pre-patch: * Clarify the disk syntax documentation wording to refer to deprecated syntaxes too. * Make DPC in libxlu_disk_l.l useable in the helper functions as well as in lexer rules, by providing two definitions, each in force in the appropriate parts of the file. * Break the <vdev>[:<devtype>] parsing out into a helper function, `vdev_and_devtype'. No functional change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: support empty CDROM devicesIan Campbell2012-07-261-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | The important change here is to xlu_disk_parse to correctly set format == EMPTY for CDROM devices which are empty. Test cases are added which check for correctness here. xend accepts ',hdc:cdrom,r'[0] as an empty CDROM drive however this is not consistent with the xl syntax in docs/misc/xl-disk-configuration.txt which requires ',,hdc:cdrom,r' (the additional positional paramter is the format). I'm not sure if/how this can be fixed. Note that xend does not accept ',,hdc:cdrom,r' There are several incidental cleanups included the the cdrom-{insert,eject} commands: - add a dry-run mode - use the non-deprecated disk specification syntax - check for and report errors from libxl_cdrom_insert [0] http://wiki.xen.org/wiki/CD_Rom_Support_in_Xen Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>