Commit Graph
3194 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com c0693d2c6e Workaround bug in xmlrpclib's string escaping. That library outputs invalid
UTF-8 if given a string containing high-bit characters, so instead pass in
Unicode strings, for which the escaping is correct.

This fixes a bug seen when the dmesg of a machine contains high bit characters,
but I'm sure there are other ways in which it might be triggered.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-04 11:08:20 +01:00
emellor@leeni.uk.xensource.com cb52e35a60 Merged. 2006-04-03 23:58:40 +01:00
emellor@leeni.uk.xensource.com 2df295f268 Lookup backend by name _or_id_. This is important for domain 0, for example!
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-03 23:57:42 +01:00
emellor@leeni.uk.xensource.com d0263f0fa4 Fix cpus string parsing, wrt use of ^ to remove elements.
Patch from Satoshi Uchida <s-uchida@ap.jp.nec.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-03 18:39:21 +01:00
mip@xencore04.1virtual.net ea0ce2d439 Improve pygrub error reporting when opening ext2 fs is not possible
As reported in the thread:
http://lists.xensource.com/archives/html/xen-users/2006-03/msg00721.html,
pygrub does not open ext2 file systems in partitioned images or sub
partitions on e.g. CentOS/RHEL 4, because e2fsprogs ext2fs_open does not
support an offset into the file to be opened.

With this patch, the error is correctly reported instead of a generic
"unable to open file" (and leaving the user searching in the dark).

Signed-off-by: Michael Paesold <mpaesold@gmx.at>
2006-04-03 18:28:54 +01:00
tkuik@tkuik-lnx2.cisco.com d2a5e52e8c Allow a domain other than Domain-0 to be a backend.
Signed-off-by: Tim Kuik tkuik@cisco.com
2006-04-03 18:23:00 +01:00
kaf24@firebug.cl.cam.ac.uk 6daae768eb Remove some dead code from the consoled client.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-04-03 17:48:39 +01:00
kaf24@firebug.cl.cam.ac.uk 9cf21925de This patch fixes several issues related to vmxassist:
1) AP bring up;
2) RHEL4 IA32e installation;
3) SLES10 IA32e installation;

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-04-01 14:59:12 +01:00
kaf24@firebug.cl.cam.ac.uk d057bf8506 When dom0 fails to balloon enough memory to allow a new domain to start,
an exception is thrown.  The test that decides which exception to throw
is backwards, resulting in strange error messages.  The attached patch
fixes the problem.

Signed-off-by:  Charles Coffing <ccoffing@novell.com>
2006-04-01 10:52:47 +01:00
kaf24@firebug.cl.cam.ac.uk 85c024b331 Fix makefiles for hvmloader and vmxassist for FC5 on x86_64
systems.

In FC5, gcc has issues with the command lines used to build
hvmloader and vmxassist.  Basically, the compiler doesn't
like the combination of -m64 and -m32.  As these are 32 bit
apps, and intended to be, take a modified approach and simply
define XEN_TARGET_ARCH for 32 bits.  This cleans up the
command line and builds the images correctly.

From: Ben Thomas <ben@virtualiron.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-01 10:49:42 +01:00
kaf24@firebug.cl.cam.ac.uk e5829dcbe1 Plumb network vif credit-based rate limiting thorugh xenbus
and xend into xm guest config files.

A new vif parameter 'rate' is supported, with an optional time window
paremeter for specifying granularity of credit replenishment. The default
window is 50ms. For example:

 'rate=10Mb/s'  'rate=250KB/s'  'rate=1MB/s@20ms'

From: Chris Clark <christopher.w.clark@gmail.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-31 15:34:52 +01:00
kaf24@firebug.cl.cam.ac.uk f8253f9f48 Currently, xm & xend allow an XAUTHORITY to be specified in the config
file.  If that is not specified, then xm will pass the XAUTHORITY
environment variable back to xend instead.  This is not sufficient,
since it is possible that XAUTHORITY is not set at all.  This doesn't
cause a problem for most X apps, because xlib will use the fall-back of
$HOME/.Xauthority.  But the viewer is started from xend, which almost
certainly doesn't have a reasonable HOME variable.

We fix this by always passing some value for
XAUTHORITY.  In order of preference, that value is:
1.  Use the value from the config file, if specified.
2.  Use the value from the XAUTHORITY env variable, if set.
3.  Use $HOME/.Xauthority, if HOME is set.
4.  Look up the user's home directory via getpwuid, and append
"/.Xauthority"

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-31 13:51:19 +01:00
kaf24@firebug.cl.cam.ac.uk 3d95d58003 Enable the setting and trapping of breakpoints for hvm guest.
Catch Ctrl-C for gdbserver and let gdb break from continue command.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2006-03-31 10:07:55 +01:00
emellor@leeni.uk.xensource.com 0464aecf6c Better formatting of error messages for xmlrpclib.Faults, matching similar code
in main.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:15:12 +01:00
emellor@leeni.uk.xensource.com 6b914525af Print error messages to stderr. Remove unused handle_xend_error.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:14:09 +01:00
emellor@leeni.uk.xensource.com 8d3271b7cc Set the permissions correctly on the XML-RPC UDP socket, so that non-root users
cannot use the socket.

This closes a security hole, and fixes the intermittent failure
of xm-test/06_list_nonroot.test.

c.f. xen-unstable changeset 9205:faa1eb1621b9 (same bug, different socket).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:13:33 +01:00
emellor@leeni.uk.xensource.com 7a6ee342c3 Further attempts to recover from a corrupt store, this one triggered when a
tdb_store fails.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:10:54 +01:00
emellor@leeni.uk.xensource.com 26c829aa89 Don't use abbreviated ip subcommands -- these are not accepted by iproute2.
Closes bug #478.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:09:42 +01:00
emellor@leeni.uk.xensource.com a638cd3e89 Merged. 2006-03-30 17:26:19 +01:00
emellor@leeni.uk.xensource.com 78b637ac77 Added medium-length (around 20 minute run-time) test group.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-30 17:25:03 +01:00
kaf24@firebug.cl.cam.ac.uk 20603fcf9a The attached trivial patch fixes cases where a block device is mounted
read-only in domain 0, but still fails to be shared with a domU, because
it is mis-identified as being mounted writable.  (On SUSE, CDs and DVDs
are auto-mounted not with merely permissions "ro", but
"ro,nosuid,nodev", hence the mis-identification.)

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-30 16:53:37 +01:00
kaf24@firebug.cl.cam.ac.uk ce0dc718f2 More fixes to gdbserver for HVM guest debugging. Also fix
writing back of register state for HVM guests.

From: Nitin A Kamble <nitin.a.kamble@intel.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 14:37:22 +01:00
emellor@leeni.uk.xensource.com ecaa88857f Merged. 2006-03-30 11:55:07 +01:00
emellor@leeni.uk.xensource.com 51260a849c Check the return value of domain_lookup_by_name_or_id_nr for None (i.e. no
such domain) inside each of the public-facing functions.  This fixes the
Internal errors seen when specifying an invalid domain.

domain_pincpu takes cpumap, which is a list, not a string, so there's no need
to try and split it up.  Fixes xm vcpu-pin.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-30 11:54:07 +01:00
emellor@leeni.uk.xensource.com c705b05a31 Fix the ProtocolError seen when the server throws an exception and running
under Python 2.3; traceback.format_exc was introduced in 2.4, so we can't use
it.

Added some exception logging.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-30 11:51:44 +01:00
kaf24@firebug.cl.cam.ac.uk 5707afc46f Fix xenconsoled when sending lots of console data to a domU.
Fixes bug #477.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 11:38:56 +01:00
anthony@rhesis.austin.ibm.com bf95282732 Remove vcpu_avail from the public S-Expression that's passed over the wire.
This trips up the XML-RPC layer on large SMP systems and isn't actually used
by xm.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-03-29 14:50:57 +01:00
emellor@leeni.uk.xensource.com 81094db8cb Merged. 2006-03-28 11:52:47 +01:00
emellor@leeni.uk.xensource.com 158e559443 Mention uClibc and buildroot configs.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-28 11:51:06 +01:00
emellor@leeni.uk.xensource.com 472238a5e2 Added README for the XenSource-hosted initrd.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-28 11:47:58 +01:00
emellor@leeni.uk.xensource.com 394bbf04f5 Download the initrd from xm-test.xensource.com, unless otherwise specified.
Don't download it again if it's already present.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-28 11:47:20 +01:00
emellor@leeni.uk.xensource.com 5be19e898d Watch for @introduceDomain, for symmetry with the existing watch on
@releaseDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-28 11:26:29 +01:00
emellor@leeni.uk.xensource.com d4a55b4a44 Have TCPXMLRPCServer inherit from SocketServer.ThreadingMixIn. This allows
Xend to handle more than one request simultaneously once again.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-28 11:25:22 +01:00
kaf24@firebug.cl.cam.ac.uk 3ad72f8da8 Fix 64-bit HVM guest debug via gdbserver:
1. gdb_regs for 64bit, and macros to transfer regisers between ptrace
    registers to gdb registers
 2. xc_ptrace code building for 64bit
 3. Implementation of new map_domain_va for 64bit
 4. gdbserver-xen build configuration fixes for 64bit

From: Nitin Kamble
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-26 11:50:39 +01:00
kaf24@firebug.cl.cam.ac.uk ac58fadfa5 The attached patch to the qemu emulation of the pcnet hardware fixes
several problems.  It will now only read and write a transmit or receive
descriptor once.  It will correctly handle transmitting frames with more
than two fragments.  It will discard oversize frames instead of
corrupting memory.  I have tested all the changes I have made and even
seen an improvement in receive performance from 1.7MB/s to 3.3MB/s.
Your mileage will vary.

The code could be simplified if multi-fragment frames were deleted.  It
appears that both Linux and Windows XP don't use fragmented frames.

The mac crc computation code was deleted, since it has never been used.
The code was checking the wrong bit in the control register.

I tested type 3 descriptors by modifying the linux pcnet32 driver, but
did not see any difference in performance over type 2 currently used.

I have not made any change to type 0 (16-bit) transmit/receive
descriptors as I have no way to test the changes.

Please test this as soon as possible, as I will be on vacation next week
and in a class the following week.  I will check email from time to
time, but my ability to make changes to code will be greatly dimished.

One other thing I noticed in my testing, is that if I tell a linux domU
to reboot, it will reboot but not have any pcnet32 device after
rebooting.  By doing a shutdown, xm destroy and xm create, I was able to
get around that problem.

Signed-off-by:  Don Fry <brazilnut@us.ibm.com>
2006-03-26 11:39:04 +01:00
harry@localhost.localdomain 5ebad7be89 Fix bug 515 by adding a global lock around the hotplug scripts in the non-udev hotplug case only.
There are two possible root causes for 515, both of which are only problems in the non-udev hotplug case because udev uses udevsend which already implements the required serialisation.

1) Script concurrency.
2) Kernel reordering hotplug events.

This changeset fixes (1) but not (2).  Since (1) is the problem that seems to be happening this is probably OK.

A fix for (2) for the hotplug case might be to add extra serialisation using state changes in the store but this would impact all the drivers and the code and extra complexity would be redundant once everyone had moved to udev.  This doesn't seem worthwhile unless we actually start to see (2) happening.
2006-03-24 14:31:20 +01:00
anthony@rhesis.austin.ibm.com 76e09e8238 1) Introduce new exception type XendInvalidDomain that maps to the high level
XEND_INVALID_DOMAIN faultType.
2) Fix exception logic in XMLRPCServer
3) Fix TCP server
4) Remove catching of ProtocolError in main.py.  ProtocolErrors only occur
   when there is an exception in the exception handling code which shouldn't
   ever happen.  I've reproduced the error cases described by Ewan with
   xend_domain_setTargetMemory and once I fixed the exception logic, I get a
   normal faultType of 1 as would be expected.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-03-24 14:31:12 +01:00
kaf24@firebug.cl.cam.ac.uk 3e0dfe69c9 Create /var/xen/dump/ during tools installation, or core files
are not written even if we set (enable-dump yes) in xend-config.sxp.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-03-24 12:28:58 +01:00
kaf24@firebug.cl.cam.ac.uk 7e273af3ec This patch is mainly a cleanup of vmx related xentrace code. One minor
xentrace bug is fixed. 

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
2006-03-24 10:59:31 +01:00
kaf24@firebug.cl.cam.ac.uk 3095cdaf50 Update gdb documentation
* Kernel isn't 2.6.12 anymore
* ARCH=xen isn't needed for make anymore

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-24 10:57:52 +01:00
kaf24@firebug.cl.cam.ac.uk 2acf021310 Remove unnecessary zlib includes.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-03-23 18:57:21 +01:00
emellor@leeni.uk.xensource.com 0e84746cfd Remove undefined XFAIL_TESTS variable.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 17:27:48 +01:00
emellor@leeni.uk.xensource.com 88e458024c Remove undefined XFAIL_TESTS variable.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 17:25:55 +01:00
emellor@leeni.uk.xensource.com 98009c2ad0 Use *args inside FAIL and SKIP so that it is possible to call these functions
with multiple arguments, printf style.  This is already being done in some
cases (causing an exception of course).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 14:34:35 +01:00
emellor@leeni.uk.xensource.com 1bac3b49cd Import the current version of talloc from the Samba 3 source base. This gives
us greater confidence that our talloc implementation is "known good".  Remove
the OOM handling from consider_message: talloc_set_fail_handler is no longer
supported.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 14:32:15 +01:00
emellor@leeni.uk.xensource.com 64444a6982 Merged. 2006-03-23 14:26:38 +01:00
emellor@leeni.uk.xensource.com 88aea7e5a8 Improve error handling, in particular fixing the ProtocolError that is thrown
when a domain is specified by the user that does not exist.  Added a few
error codes -- many more to come, I expect.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 12:59:43 +01:00
emellor@leeni.uk.xensource.com 91c4832c49 Added exception handler for ProtocolError.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 11:58:19 +01:00
emellor@leeni.uk.xensource.com af19ef96d4 Added example config entries for xend-tcp-xmlrpc-server and
xend-unix-xmlrpc-server.  Deprecate the SXP-based servers, and disable them
by default.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 11:55:56 +01:00
emellor@leeni.uk.xensource.com cf2c1b2e25 Use the string Error: rather than Xend has generated an internal Fault:.
xm-test looks for this.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 11:42:19 +01:00