aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Fix some build system error handling.Keir Fraser2007-12-2011-33/+32
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvm: Fix TPMD and QEMU connectionKeir Fraser2007-12-201-0/+5
| | | | | | | | | | | | In HVM domain, MA_Transmit function in tcgbios sometimes become an error (TCG_NO_RESPONSE). The cause of the error is not to make connection of QEMU and TPMD instance within a timeout of MA_Transmit function. Before the MA_Transmit function was called, the attached patch corrected so that connection of QEMU and TPMD might be completed. Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
* ioemu: Do not close slave half of a pty.Keir Fraser2007-12-201-2/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools/examples/block better use of losetup -rKeir Fraser2007-12-191-3/+6
| | | | | | | | | | | | Use losetup -r when the vbd is specified to be readonly, but only if -r is supported (rather than always creating a writeable losetup mapping if possible). This was inspired by (but not derived from) a diff from the Fedora 8 patchset which uses -r iff the vbd is specified as readonly. We need to be cleverer upstream because not all systems have losetup -r. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: Fix device duplicate check.Keir Fraser2007-12-191-7/+10
| | | | Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
* xend: Fix PCI Device ConfigurationKeir Fraser2007-12-192-47/+44
| | | | | | | Xend doesn't correctly work after restart, when there is a domU which owns a pci device (driver domain). This patch fixes the problem. Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
* Fix master/slave handling in xenconsoled and qemuKeir Fraser2007-12-192-66/+141
| | | | | | | | | | | | | | | Fix a number of problems with the pty handling: - make openpty() implementation work on Solaris - set raw on the slave fd, not the master, as the master doesn't have a line discipline pushed on Solaris - make sure we don't leak the slave fd returned from openpty() - don't use the 'name' argument of openpty() as it's a security risk - note behaviour of a zero read of the master on Solaris - remove pointless tcget/setattr Signed-off-by: John Levon <john.levon@sun.com> Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* xend: Indicate a resume operationKeir Fraser2007-12-192-0/+5
| | | | | | | Indicate that the domain is created as part of a resume operation rather than a 'create'. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xend: Prevent XenD touching externally managed bridgesKeir Fraser2007-12-151-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With current XenD 3.0.4 or later try the following: brctl addbr demo ifconfig demo up /etc/init.d/xend start /etc/init.d/xend stop ifconfig demo down brctl delbr demo Now, start XenD again.... /etc/init.d/xend start And watch in horror as it re-creates your 'demo' bridge. The problem is that the 'XendNetwork' class does not distinguish between bridge devices that it is managing (ie those created via XenAPI) and those which it does not manage (ie those created by OS distro init scripts, or by apps like libvirt). While initially I thought I could just make XenD ignore externally-managed bridges completely, it seems to needs to know about them otherwise it can't hook up guest VIFs to them correctly. So the attached patch adds a 'managed' flag to the XendNetwork class. Externally managed bridges have this set to False. At startup XenD will now only re-create bridge devices which have the 'managed' flag set to 'True' - ie those created via XenAPI. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* merge with xen-unstable.hg (staging)Alex Williamson2007-12-1410-20/+64
|\
| * acm, xend: Serialize the execution of external scripts.Keir Fraser2007-12-141-13/+36
| | | | | | | | | | | | | | Instead of starting a thread per script, run a single thread and send orders to it. This serializes the execution of the scripts. Signed-off-by: Stefan Berger <stefanB@us.ibm.com>
| * xsm: Implement missing functions in XSM dummy moduleKeir Fraser2007-12-141-1/+9
| | | | | | | | | | | | | | I am implementing some missing interface functions in the XSM dummy module. Also deactivating some debugging output. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
| * tools: Some fixes for 'make clean'.Keir Fraser2007-12-144-4/+5
| | | | | | | | Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
| * xenstore size limitsKeir Fraser2007-12-144-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Documents the existing 4kby size limit on xenstore message payloads * Causes xs.c in libxenstore to fail locally rather than violating said limit (which is good because xenstored kills the client connection if it's exceeded). * Introduces some limits on path lengths in xenstored. I trust no-one is using path lengths >2kby. This is good because currently a domain client can create a 4kby relative path that the dom0 tools cannot access since they'd have to specify the somewhat longer absolute path. * Removes uses of the host's PATH_MAX (!) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | [IA64] Fix XenITP buildAlex Williamson2007-12-133-1/+3
|/ | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* ioemu/qemu vga: save and restore vram buffer (take 2)Keir Fraser2007-12-121-2/+14
| | | | | | | | | | | The existing stdvga driver from xen-unstable tools/ioemu/hw/vga* does not save the emulated VGA memory contents. The symptoms include video malfunction after restore, including black screen (which can often be fixed by asking the guest to redraw) but also missing font setup etc. The attached patch fixes this by saving the entire VGA memory buffer, just like the Xen ioemu Cirrus emulator does. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert 16579:0884e0a5ecc33afac8d60ea09652cf436d1a33ce.Keir Fraser2007-12-122-24/+9
|
* Fix build after I removed test_assign_device from domctl union.Keir Fraser2007-12-121-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* vt-d: Test device assignability in xend, but defer actual assignment to qemu-dm.Keir Fraser2007-12-125-11/+39
| | | | Signed-off-by: Weidong Han <weidong.han@intel.com>
* ia64, xend: Close nvram file when rebooting HVM domainKeir Fraser2007-12-121-2/+1
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Fix cleanup_domains() for suspending managed domainsKeir Fraser2007-12-121-7/+13
| | | | | | | | | When unmanaged domains with on_xend_stop="suspend" exist, managed domains are not suspended by xend stop command. The processing of cleanup_domains() is aborted by exception. This patch keeps suspending managed domains even if unmanaged domains exist. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* tools: Fix distutils installation of xsview.Keir Fraser2007-12-121-0/+0
| | | | | | | Distutils won't install xsview unless it has an __init__.py. This patch adds an empty one, which is all that is required. Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
* tools: Use os.system instead of exec to start xentop.Keir Fraser2007-12-121-1/+1
| | | | | | | | | This makes no difference to the visible behaviour of "xm top" but avoids the whole of xm from quitting if you're in "xm shell". This provides the more intuitive behaviour of returning to the xm shell interface after leaving xm top. Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
* tools: Remove references to USB paravirt driver. Doesn't affect qemu usb args.Keir Fraser2007-12-123-55/+1
| | | | | | | | | Some relics in the control tools still refer to the USB paravirt driver. Remove this as it's dead code and is in the history for anyone really interested. The Qemu device model has its own USB configuration, which should still work. Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
* xend, acm: Extend Xen-API with function to reset the policyKeir Fraser2007-12-128-61/+113
| | | | | | | | | | | | This patch extends the Xen-API and the legacy XML-RPC interface with a function to reset the policy on the system (through an update with the default policy). I adapted the code in 'xm resetpolicy' to use this now. This patch also extends libxen and the documentation to reflect the new function. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* ioemu/qemu vga: save and restore vram bufferKeir Fraser2007-12-122-9/+24
| | | | | | | | | | | | | | | | | The existing stdvga driver from xen-unstable tools/ioemu/hw/vga* does not save the emulated VGA memory contents. The symptoms include video malfunction after restore, including black screen (which can often be fixed by asking the guest to redraw) but also missing font setup etc. The attached patch fixes this by saving the entire VGA memory buffer, just like the Xen ioemu Cirrus emulator does. I have reinterpreted the `is_vbe' byte, which is related to CONFIG_BOCHS_VBE, as a general flags word. This enables my code to allow old images to be restored (albeit with loss of VGA memory), by using another bit in that word to indicate whether the VGA memory dump is present. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ioemu: Include mouse dz in xenfb event packetKeir Fraser2007-12-101-4/+7
| | | | | | Needed for mouse wheel support in a PV guest. Signed-off-by: Pat Campbell <plc@novell.com>
* xm-test: Don't run security test if ACM is not enabled.Keir Fraser2007-12-101-1/+10
| | | | | | | | | I forgot to put in the check to prevent this test case from running when ACM is not compiled into Xen. I am resetting the policy so that an update with the prepared policy can be done without changing that policy's header to match the current policy's version. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Revert 16560:822d4ec5cfb1.Keir Fraser2007-12-084-8/+8
| | | | | | | | | | | | | Preference seems to be to update library versions only when the ABI changes. Only libxenctrl/libxenguest have their version number changed to 3.2.0, as a reminder that they change on pretty much every major release. libfsimage/libxenstore/libblktap have not changed substantially recently, hence the ABI has not changed, and version number stays the same as in Xen 3.1 (and before). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xm-test, acm: fixes an API call due to recent changes.Keir Fraser2007-12-081-1/+2
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* qemu 16550 uart: Fast-drop bursts of transmitted characters to avoidKeir Fraser2007-12-081-6/+12
| | | | | stalling due to a disconnected pipe or pty. Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
* tools: Rationalise library soname versions.Keir Fraser2007-12-074-8/+8
| | | | | | | | | | | | | | | | * Arrange for the sonames of libxenstore, libxc, libfsimage and libblktap to be set from a single place in Config.mk. * Bumps the soname major version number to 3.2 in preparation for 3.2 rc1 after which we do not expect to have ABI changes. I have not done anything about libaio and libflask. The former is imported from elsewhere and if we're lucky will have sane versioning upstream. libflask has a very small interface and I'm hoping that the XSM authors have been keeping some ABI discipline. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ioemu: Include termios.h and sys/ioctl.h to get TIOCM_* definitions.Keir Fraser2007-12-071-7/+2
| | | | | | This is preferable to hard-coding them in the ioemu source file, or including a Linux-specific header. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xm: Fix help messages of xm vcpu-list/uptimeKeir Fraser2007-12-071-3/+4
| | | | | | | | We can give multiple domains to the following commands. But, the help messages of the commands are explained to be able to give a single domain. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* [IOEMU] Correct hu keymap definitionsKeir Fraser2007-12-071-15/+14
| | | | Signed-off-by: Pat Campbell <plc@novell.com>
* [IOEMU] Add latin2 key symbol definitions.Keir Fraser2007-12-071-0/+59
| | | | | | | Allows Hungarian users plus others to enter their language specific accented characters. Signed-off-by: Pat Campbell <plc@novell.com>
* Fix ioemu compile: serial.c was including a Linux-specific header.Keir Fraser2007-12-071-1/+7
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* libxc: Interface has changed a bit since Xen 3.1, so bump the majorKeir Fraser2007-12-061-1/+1
| | | | | number. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: buffered_ioreq does not need a 'df' field. Add explicit bitfieldKeir Fraser2007-12-061-1/+1
| | | | | padding to ioreq and buf_ioreq structs. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* ACM: Recover if XML policy representation is missing.Keir Fraser2007-12-062-0/+33
| | | | | | | Recover the system if the XML representation of the currently loaded policy is missing. Force the installation of the DEFAULT policy. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xm-test: An additional ACM security test case for the test suite.Keir Fraser2007-12-064-4/+479
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xc ptrace: Fix a couple of bugs in page-table walking.Keir Fraser2007-12-061-15/+2
| | | | Signed-off-by: John Zulauf <john.zulauf@intel.com>
* qemu-dm: Limit transmit retries from virtual UART FIFO.Keir Fraser2007-12-061-6/+9
| | | | Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
* xenstore: expanding_buffer variables are supposed to be static. ApartKeir Fraser2007-12-051-2/+2
| | | | | from anything else, this was guaranteeing they were initialised. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Check block file existence.Keir Fraser2007-12-051-0/+1
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* [QEMU-DM] Upgrade emulated UART to 16550A.Keir Fraser2007-12-051-199/+276
| | | | | | | | | | | | | | | | | | | | This patch adds 16550 emulation to qemu-dm. I still consider it a work in progress, but from my testing, it consistently performs better than the old code already, sometimes considerably so (on my laptop, dumping out data over serial from a HVM DomU -> pty in Dom0 was up to 5.3 times faster than with the old 16450 code). I can consistenly reach full 115200 baud speeds over physical serial lines when the virtual device is backed by a phys port, which I never could with the old code. There are still some things to be done. I want to add proper error handling, so that overflow/framing & parity errors on the physical port get detected and reported by the virtual port. Also, now that FIFOs are in place, I believe performance could be improved significantly by putting some code into the hypervisor so that reads & writes from the FIFOs don't have to exit into qemu-dm at all. I'm also reading up on the specs for newer uarts with deeper FIFOs. Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
* [QEMU-DM] Modem control line & msl/mcr register support.Keir Fraser2007-12-053-12/+144
| | | | | | | | | | | | | | | | | | | | | This patch enables handling of the modem/flow control lines of a serial port when the backend for the virtual port is a physical serial port. During initialization, it tries to load the msr with the detected status from the real port (this is consistent with physical uart, which starts with its msr values set according to the status of the modem status lines). If the ioctl returns -ENOTSUP, then the code assumes the backend is not a real serial port and will disable any further attempts to manipulate or read the physical port's line status. It's tries to be as "correct" as possible in its msr/msl handling, with the exception of modem line status change interrupts. A real 16550 uart apparently have a delay time of 250ns between when a modem status line changes and the IRQ line goes high. In this patch, an "idle" port is polled for line status changes only if the guest has enabled UART_IER_MSI is enabled, and only polled every 10 ms. Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
* xenstore: document the xenstore protocolKeir Fraser2007-12-051-3/+12
| | | | | | | | | | | | | | | | | The attached patch adds a new text file docs/misc/xenstore.txt which describes the actual protocol implemented by xenstored. This was reverse-engineered from the actual code in tools/xenstore. I didn't bother making any automatic arrangements to ensure that the implemented and documented protocols are kept in step (for example, automatic code generation, etc.) The protocol is rather messy unfortunately and unsuitable for an xdr approach, and in any case is not likely to change very quickly. Also in this patch are a couple of comments for xenstored_core.c which help clarify the behaviour of some payload parsing helper functions. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenstore-ls -f for find(1)-like outputKeir Fraser2007-12-051-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current output of xenstore-ls can be quite hard to read and it is not very intractable for postprocessing with sort|diff and the like. The patch below provides a -f option which produces output with the full key pathname on each line, and which disables the value truncation and the `.'-padding when used with -p (since these latter two aren't likely to be very useful when values are preceded by long pathnames). While I was at it I added the `-s' option to the usage message, where it was previously missing. The results looks like this: ... /local/domain/1 = "" /local/domain/1/vm = "/vm/8b5fd34a-e268-fab5-9cde-c06eda21df16" /local/domain/1/device = "" /local/domain/1/device/vbd = "" /local/domain/1/device/vbd/2049 = "" /local/domain/1/device/vbd/2049/virtual-device = "2049" /local/domain/1/device/vbd/2049/device-type = "disk" /local/domain/1/device/vbd/2049/protocol = "x86_32-abi" ... Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenstore: deprecating but \-quoting binary data.Keir Fraser2007-12-054-9/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently it's not clear what the allowable character set is for values in xenstore. The current command-line tools just pass values to printf("%s",...) so implicitly assume that it's 7-bit printable ASCII (since the interpretation of 8-bit characters would be unclear). However there are rumours of programs which dump binary data into xenstore and/or bugs involving nul bytes being added to the ends of xenstore values (and even of some drivers insisting on a spurious nul). There isn't all that much useful documentation about xenstore. There is a doc detailing which xenstore keys may be used and what their meanings are (interface.tex) but it is very out of date, amongst other reasons because it's in format which is not very easy to update when adding functionality to the code and because there is no way to check programs' behaviour in xenstore against the spec. I think the xenstore part of interface.tex should be replaced with a new document in a simpler format, which should amonst other things be sufficiently machine-readable that automatic testing could reveal at least basic out-of-spec behaviours like setting or using undocumented keys. This new document ought to specify the allowable character set of both keys and values, and ought to specify the xenstored protocol as well. It seems to me that the appropriate character set for xenstore values is 7-bit printing ASCII (0x20..0x7e). Values should not have a trailing nul byte `on the wire' but of course the xs library interface should continue to add an additional nul beyond the quoted length for the convenience of callers. That is consistent with nearly all of the existing uses and makes the whole system much more tractable compared to an explicit expectation that binary data will be stored. (For example, if we like binary data in xenstore, why are uuids represented in their printable hex encoding?) xenstore data is supposedly non-performance-critical metadata for use by control plane machinery so the overhead of printing and parsing text strings is hardly a problem. Applications which set binary values should be deprecated but to avoid breaking those applications xenstored should continue indefinitely to be binary-transparent. Under these circumstances it can only be regarded as a bug that the current command-line tools are lossy in the presence of binary data. Not only does this make them break for those now-deprecated uses, but it also prevents them from being used to detect and debug problems relating to the exact byte strings being recorded in xenstore. As a first step towards the utopia I describe above, this patch causes xenstore-read and -ls to \-escape the values of xenstore keys, and xenstore-write to un-\-escape them. The escaping is a subset of that permitted by C89; only \t \r \n \\ and hex and octal are used and recognised. (So no \f, \a etc.) This change will not change the representation by these tools of values which contain only 7-bit printing ASCII characters unless they contain \'s. Values which contain \'s will need to be quoted on entry and dequoted on exit if being manipulated by xenstore-*. The only values likely to be affected are paths in Windows guest filesystems and in practice we believe that any such filename which is actually relevant to anything will be set other than via xenstore-write. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>