aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* stubdom: 'file' based disk sharingKeir Fraser2009-05-261-3/+3
| | | | | | | | | | Allow 'file' based disks, that are blkback based disks, to be shared between the guest domain and the stubdom. It does so exploiting the same exception introduced in the previous patch "stubdoms phy disks sharing". Now we can remove the hack in stubdom-dm that forces "file" disks to be opened using blktap instead of blkback. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xend: Fix typo in usage of new auxbin.xen_configdir() functionKeir Fraser2009-05-211-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
* tools: get rid of hardcoded config dirsKeir Fraser2009-05-2018-45/+46
| | | | | | | | | Remove *all* hardcoded "/etc/xen" strings in python code. Additionally, it removes pygrub_path from osdep.py. Its use has been replaced with auxbin.pathTo("pygrub"). Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xend: remove spurious pci_len from getDeviceSxprsKeir Fraser2009-05-201-1/+0
| | | | | | | Cc: Zhai Edwin <edwin.zhai@intel.com> Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Cc: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* ocaml-xenstored: Allow to build ocaml xenstored instead of C versionKeir Fraser2009-05-192-2/+31
| | | | | | | | To use, set CONFIG_OCAML_XENSTORED=y at build time. Then the build system will automatically download the remote repo to tools/ocaml-xenstored. Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
* tools: Fix an obvious xgettext build typo.Keir Fraser2009-05-191-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xend: Fix xm pci commands for inactive managed domains.Keir Fraser2009-05-192-11/+36
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Make hotplug script timeouts configurableKeir Fraser2009-05-193-2/+26
| | | | | | | | | | | | | | In some configurations, when dom0 is busy with I/O, it may take several minutes to complete all hotplug scripts required when a new domain is being created. As device create timeout is set to 100 seconds, users get "hotplug scripts not working" error instead of a new domain. This patch makes both DEVICE_CREATE_TIMEOUT and DEVICE_DESTROY_TIMEOUT configurable in xend-config.sxp to allow users to easily adapt hotplug timeouts to their environment. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* python: get rid of hardcoded search pathes in python code.Keir Fraser2009-05-192-31/+21
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xentrace: Trace IRQs and entry/exit timestamps.Keir Fraser2009-05-192-0/+18
| | | | | From: Dulloor <dulloor@gmail.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: adjust relocation buffer sizeKeir Fraser2009-05-191-1/+1
| | | | | | | This can greatly improve ssl relocation performance (to about 1/3 compared with buffersize 1024). Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
* tools: clean up handling of xen config and scripts directories.Keir Fraser2009-05-199-25/+14
| | | | | | | For now hardcode /etc w/o a prefix as there are hardcoded config paths in the code which would break otherwise. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xend: solve issues with xm block-configure command.Keir Fraser2009-05-191-5/+32
| | | | | | | | | | | | | | | | | In the case of inactive managed domains: The following error occurs currently. We cannot change the configuration of the VBD by using xm block-configure. Of course, using xm block-detach and xm block-attach instead of xm block-configure, we can change it. However, I'd like to change it by using xm block-configure. In the case of active domains: Another problem occurs after a domain was rebooted. Even if we change a configuration of a VBD in the domain by using xm block-configure, the configuration of the VBD is reverted to previous configuration after the domain was rebooted. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Avoid deprecation warnings with Python 2.6.Keir Fraser2009-05-192-8/+21
| | | | Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* ioemu: Export PREFIX variable to ioemu build environment.Keir Fraser2009-05-191-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: fix issue with phy disksKeir Fraser2009-05-191-2/+3
| | | | | | Add an exception for stubdoms in the same_vm hotplug script function. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* passthrough: Fix PCI hot-plug option parsingKeir Fraser2009-05-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a PCI function is passed-through extra options may be passed through. In the case of boot-time PCI pass-through the documented format is: [dom:]bus:dev.slot[@vslot][[,opt]...] e.g. 00:01.00.1@7,msitranslate=3D1 In the case of PCI hot-plug the xm pci-attach command take the following arguments: [-o opt[,opt]...] [dom:]bus:dev.slot [vslot] e.g. -o msitranslate=3D1 00:01.00.1 7 These xm ends up passing these to xem-qemu as: [dom:]bus:dev.slot[[,opt]...][@vslot] e.g. 00:01.00.1,msitranslate=3D1@7 Note that the option and the vslot have are transposed when compared to the format used by boot-time PCI pass-through. The parser inside qemu-xen can only handle the format used by boot-time PCI pass-through and because of this ignores any options passed by hot-plug. This patch alters format used by hot-plug to match the parser. Signed-off-by: Simon Horman <horms@verge.net.au>
* stubdom docs: Update to reflect the new way of configuring stubdom domains.Keir Fraser2009-05-113-26/+5
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Permit user to suppress passing --prefix to setup.pyKeir Fraser2009-05-073-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | We change all invocations of setup.py as follows: * use $(PYTHON) instead of `python' so that the user can specify an alternative python version if they need to. If not set it defaults to `python' in Config.mk. * pass --prefix=$(PREFIX) via a new make variable $(PYTHON_PREFIX_ARG). This allows a user to suppress the --prefix=... argument entirely by setting PYTHON_PREFIX_ARG=''. This will work around the bug described here https://bugs.launchpad.net/ubuntu/+bug/362570 where passing --prefix=/usr/local (which ought to have no effect as /usr/local is the default prefix) changes which subdirectory distutils chooses, and results in the files being installed in site-packages which is not on the default search path. Users not affected by this python packaging bug should not set PYTHON_PREFIX_ARG and their builds will not be affected. (Provided PREFIX did not contain spaces. People who put spaces in PREFIX are being quite optimistic.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: fix the pci BDF format stringKeir Fraser2009-05-071-1/+1
| | | | | | Fix the typo introduced by changeset 19446:2ef77b4bdf58. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* xenstore: Add brief notice regarding xenstore protocol limits to xs.h.Keir Fraser2009-04-301-0/+5
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Fix for op_pincpu in SrvDomain.pyKeir Fraser2009-04-273-5/+4
| | | | | | | | | | | | | | | | | | | | | op_pincpu method in SrvDomain.py does not currently work because op_pincpu method gives string objects to a cpumap argument of domain_pincpu method in XendDomain.py though the cpumap argument expects list objects. This patch solves the above problem as follows. op_pincpu method gives string objects to the cpumap argument as is, because op_pincpu method cannot give list objects to the cpumap argument. Instead, domain_pincpu method expects that the cpumap argument is string objects, then domain_pincpu method converts the cpumap argument into list objects. Also, the patch modifies two methods (except for op_pincpu method) calling domain_pincpu method. The methods give string objects to the cpumap argument instead of list objects. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: fix cset 19547:b2c43b0fba71 (a managed domain may not shutdown)Keir Fraser2009-04-271-0/+1
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xentrace: Clean up HVM I/O tracing.Keir Fraser2009-04-241-2/+4
| | | | | Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: modify the order of resetting/deassigning device.Keir Fraser2009-04-241-8/+10
| | | | | | | | | | | When guest OS shutdowns or a device is hotremoved. 1. Xend resets devices. 2. Xend deassigns devices. Because if devices are deassigned before the reset, dom0 memory may be overwritten by DMA. Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* xm: Fix hot-unplug of statically-assigned devicesKeir Fraser2009-04-233-5/+6
| | | | | | | | | | | | | | | | | | | | | | Prior to changset 19510:5c69f98c348e - 'xm, xend: Replace "vslt" with "vslot"', both vslt and vslot were used in the xm code, often fairly arbitrarily. However, in the dictionary that describes a pci function both vslt and vslot were present. vslt stored the slot assigned to the function. And vslot stored the slot the user requested for the function, or AUTO_PHP_SLOT if no slot was requested. With the renaming these two values got merged into a single entry. This patch un-merges them by renaming the what was vslot to requested_vslot. So an out of chronological order list of name changes is: 'vslot' -> 'requested_vslot' 'vslt' -> 'vslot' Signed-off-by: Simon Horman <horms@verge.net.au>
* xend: Do not overwrite xauthority and display with empty valuesKeir Fraser2009-04-231-2/+2
| | | | | | | | | | | | Display and xauthority vars are read from vmConfig['platform'] first, then they are read again from dev_info. However if the user does not set those variable in the config file, dev_info won't contain them, hence we are going to overwrite the current significant values with null. This patch fixes the problem setting display and xauthority to the current values if dev_info does not contain them. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdoms: generate stubdom config fileKeir Fraser2009-04-231-1/+6
| | | | | | | | | | | | | | | | | | This patch removes the need for a second configuration file for stubdoms: it is going to be automatically generated by the script stubdom-dm using command line options and xenstore to find any needed information. The configuration script will be placed under /etc/xen/stubdoms and automatically removed when the domain is destroyed. The only change needed in xend is not to write on xenstore sdl, opengl and serial command line options for qemu, because stubdoms do not support them. It is safe to remove those two options from xenstore because qemu does not use xenstore to read commans line options. Finally this patch fixes blkfront disconnections from backends and display and xauthority variables for pv guests. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xc_save: fixes typo in error message.Keir Fraser2009-04-221-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* network-bridge: Fix for bondingKeir Fraser2009-04-221-0/+9
| | | | | | | | | | | If ${netdev} is bonding, brctl addif ${bridge} ${pdev} fails: can't add ${pdev} to bridge ${bridge}: Invalid argument Because ${pdev} has no slaves at this point.=20 # Notice that ifdown ${netdev} clears slaves of ${netdev}. This patch restores slaves before add_to_bridge2 ${bridge} ${pdev}. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* xenconsoled: Fixes to domain management.Keir Fraser2009-04-201-4/+12
| | | | | | | | | | | | | Event-channel setup: Re-bind if the connection becomes unbound (e.g., due to 'slow' domain suspend cancellation), even if the remote port identifier has not changed. Domain logging: Only open log file once (don't leak fds) and fix a small memory leak. Evtchn changes based on a patch by Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: The method union_update on a set was renamed to update in Python 2.3Keir Fraser2009-04-201-1/+5
| | | | | From: Ruben Kerkhof <ruben@rubenkerkhof.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: clean up qemu-dm related items on domain destroyKeir Fraser2009-04-171-18/+18
| | | | | | | | | Some qemu-dm related stuffs might be left behind after the domain is destroyed. - xenstore entry, /local/domain/0/device-model/<domid> - named pipes, /var/run/tap/qemu-{read,write}-<domid> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xend: serialise domain restart threadsKeir Fraser2009-04-151-1/+5
| | | | | | | | I observed from xend.log that several domain restart threads run simultaneously. This patch make it singleton. Without this, several coredump of a domain might be created. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xend: fix avoidance to restart domain on crashKeir Fraser2009-04-151-15/+7
| | | | | | | | | | | | | | | | If a qemu-dm dies immediately (probably by wrong setting), xend repeats to restart a domain so many times.=20 That causes system overload. There is already a logic to avoid too early restarting, however, it might not work. Since xenstore entry 'xend/previous_restart_time' is volatile. XendDomainInfo.destroy() which removes the entry from xenstore is called in some places. Also, this patch prevents too early restarting even at the first domain creation. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* tools: dom0 iptables rule ordering changeKeir Fraser2009-04-141-6/+9
| | | | | | | | | | | | | | | | | | | This patch makes two small changes to dom0 iptables rules that permit (and revoke) domU network access. First: Currently, a rule intended to allow domU network access is appended to the end of the FORWARD chain, where it can be preempted by other =20 rules. This patch causes the rule to be inserted at the top, where it's more likely to have the intended effect. Second: In some cases (e.g. Fedora 9's default iptables configuration), the first rule alone is insufficient to permit two-way packet flow. This patch adds a second rule to the FORWARD chain that permits replies to domU network requests to reach the domU vif. Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
* xenpmd: Explicit build rule.Keir Fraser2009-04-091-0/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Fix xm pci-attach/detach for inactive managed domainsKeir Fraser2009-04-091-45/+103
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* sbdf2devicepath: converts SBDF into device path.Keir Fraser2009-04-091-0/+82
| | | | | | | | | | | | | | 'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#" ex) 0000:0a:1f.3 Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]" ex) PNP0A08:0-2.0-0.0 The command can be executed as follows. # sbdf2devicepath 0a:1f.3 PNP0A08:0-2.0-0.0 Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* xend: fix a typo in pciif so PciController.unwatchAerState() worksKeir Fraser2009-04-091-2/+2
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* tools: Always use sane upstream (`native') python pathsKeir Fraser2009-04-0817-89/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, by default we would install our python modules into /usr/lib/python/xen, for example /usr/lib/python/xen/__init__.py. Upstream python's standard install location (a) includes the Python version number and (b) puts things in site-packages by default. Our best conjecture for the reason for this was an attempt to make the installs portable between different python versions. However, that doesn't work because compiled python modules (.pyc), and C python extensions corresponding to one version of python, are not compatible across different versions of python. This is why upstream include the version number. site-packages is the standard location for locally-installed packages and is automatically included on the python search path. In this change, we abandon our own unusual python path setup: * Invoke setup.py in an entirely standard manner. We pass PREFIX and DESTDIR using the appropriate options provided by setup.py for those purposes (adding them to setup.py calls which were previously lacking them). * Since the installation locations are now on the standard python path, we no longer need to add anything to the path in any of our python utilities. Therefore remove all that code from every python script. (Many of these scripts unconditionally added /usr/lib/python and /usr/lib64/python which is wrong even in the old world.) * There is no longer any special `Xen python path'. xen-python-path is no longer needed. It is no longer called by anything in our tree. However since out-of-tree callers may still invoke it, we retain it. It now prints a fixed string referring to a directory which does not to exist; callers (who use it to augment their python path) will thus add a nonexistent directory to their python path which is harmless. * Remove various workarounds including use of setup.py --home (which is intended for something completely different). * Remove tests for the XEN_PYTHON_NATIVE_INSTALL build-time environment variable. The new behaviour is the behaviour which we should have had if this variable had been set. That is, it is now as if this variable was always set but also bugs in the resulting install have been fixed. This should be a proper fix for the bug addressed by c/s 19515. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* restore: sign extend p2m when restoring on a host with pfn width <Keir Fraser2009-04-081-1/+1
| | | | | | | | | | | guest pfn width (i.e. 32on64 domain 0 and 64 bit guest domain). Otherwise P2M entries which were INVALID_P2M_ENTRY (==0xffffffffffffffff) become 0xffffffff after a migrate. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* network-nat: add domain info for nat-dhcpdKeir Fraser2009-04-081-1/+5
| | | | Signed-off-by: Wei Kong <weikong.cn@gmail.com>
* xend: Give domain-ID 0 to xc.test_assign_deviceKeir Fraser2009-04-081-3/+3
| | | | | | | | | | | | | When xend calls xc.test_assign_device, xend does not have to give the domain-ID of a guest domain. This patch gives domain-ID 0 to xc.test_assign_device. The following methods give domain-ID 0 to xc.test_assign_device currently. - setupDevice@xend/server/pciif.py - pciinfo@xend/XendNode.py Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: fix c/s 19510Keir Fraser2009-04-081-4/+4
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* tools: fix python installationKeir Fraser2009-04-072-4/+2
| | | | | | | | | | | attached patch lets python install the modules into DESTDIR/PREFIX as before, but lets python search the modules in PREFIX rather DESTDIR/PREFIX. This prevents failures about not finding python modules after files have been installed into PREFIX. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xm: handle error in auxbin gracefullyKeir Fraser2009-04-071-1/+5
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xm, xend: Replace "vslt" with "vslot"Keir Fraser2009-04-076-47/+47
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: fix leak of /local/domain/* in xenstoreKeir Fraser2009-04-071-1/+7
| | | | | | | xenwatch thread _storeChanged() may create /local/domain/<domid> entries in xenstore even after the domain has shutdown. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* tools/misc: Remove some obsolete scripts.Keir Fraser2009-04-064-125/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>