Commit Graph
9501 Commits
Author SHA1 Message Date
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 68b564efee Various softirq cleanups:
1. Make __softirq_pending a long, since PPC borrows the file
    hardirq.h from us and they only do atomic ops on longs.
 2. do_softirq() explicitly takes a void param list.
 3. Remove idle_timestamp field from irq_cpustat. It's unused
    and lets us simplify the idle loop a little bit.

Part 1 based on a patch from Hollis Blanchard at IBM.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-31 12:03:42 +01:00
Ian.Campbell@xensource.com 5a5d245c8c Disable xen bus and grant tables when supervisor_mode_kernel is enabled.
Neither of these features are useful/available in this mode since only a
single domain is supported.

Do not attempt to initialise xen bus when supervisor_mode_kernel is
enabled.

Do not BUG_ON() failure to setup grant tables, future versions
of supervisor_mode_kernel may return -ENOSYS here. 

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-03-31 11:04:42 +01:00
kaf24@firebug.cl.cam.ac.uk 6601a234d1 See panic messages before the post message processing.
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
2006-03-31 10:24:17 +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
kaf24@firebug.cl.cam.ac.uk f651bf191b The ia64 build doesn't yet include drivers/xen/Kconfig directly so we
need to replicate the new XEN_INTERFACE_VERSION option in the arch
Kconfig.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-03-31 10:06:20 +01:00
emellor@leeni.uk.xensource.com 62b8bcaf48 Merged. 2006-03-31 00:26:07 +01:00
emellor@leeni.uk.xensource.com f207095aac Remove the transaction parameter from xenbus_switch_state and move the state
switch out of a transaction, in the few cases where it is inside one.

In order to behave properly, it is necessary for a driver to know its own
xenbus state (see changeset 9469:b3cb19d2b07f, for example).  This
value is stored as xenbus_device.state and updated by xenbus_switch_state.

If xenbus_switch_state occurs within a transaction, then there is a possibility
that the transaction would be aborted, leaving the state field dangerously out
of sync with the value currently in the store.

This fixes recent problems seen whereby bringing multiple devices up at the
same time results in some devices not coming up (often all of the even-numbered
ones, because of the pattern of transaction conflict).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:24:54 +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
cl349@firebug.cl.cam.ac.uk 13678d4465 Remove __HYPERVISOR_sched_op_new in favour of a header file interface version number system.
Define interface version in Kconfig and define it through CPPFLAGS for
C and assembly file compilation.
Add HYPERVISOR_{yield,block,shutdown} to remove direct use of sched_op
from guest code.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-30 17:50:44 +01:00
cl349@firebug.cl.cam.ac.uk 811ca618e3 Change how we add the include asm override to CPPFLAGS.
Add to CPPFLAGS instead of entirely redefining it.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-30 17:50:40 +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
smh22@firebug.cl.cam.ac.uk e0d7fab70f Fix comment.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-03-30 15:28:53 +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
kaf24@firebug.cl.cam.ac.uk 4734f49106 Use AFLAGS for assembly files so we can "+=" more flags.
From: Jimi Xenidis <jimix@watson.ibm.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 14:31:57 +01:00
kaf24@firebug.cl.cam.ac.uk 31903a3370 Include the E7520 (e.g., Dell 1850) irqbalance quirk fix even when
building a non-SMP kernel. The underlying hypervisor may still be SMP.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 14:06:11 +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
kaf24@firebug.cl.cam.ac.uk 919a239a3c Same panic() behaviour as native Linux when running as domain 0.
That is, no reboot: just sit there and flash the keyboard LEDs.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 00:11:53 +01:00
kaf24@firebug.cl.cam.ac.uk 5ed66abe17 Xen waits 5 seconds to reboot when domain 0 crashes, giving
time to read crash messages.

From: Chris Wright <chrisw@sous-sol.org>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-30 00:07:23 +01:00
emellor@leeni.uk.xensource.com 4b4593251a Revert accidental commit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-29 18:46:51 +01:00
emellor@leeni.uk.xensource.com f61bc4e0b8 Merged. 2006-03-29 18:41:30 +01:00
smh22@firebug.cl.cam.ac.uk f9bdf89a1b Fix save/restore on 64-bit.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-03-29 18:07:36 +01:00
smh22@firebug.cl.cam.ac.uk 473e020902 Fix save/restore bug; further rationalization of xenbus state machine
logic deferred until post 3.0.2.

Signed-off-by: Steven Hand <steven@xensource.com>
2006-03-29 18:06:27 +01:00
cl349@firebug.cl.cam.ac.uk 4df87c91b1 Free shadows of any pages which are released by a domain back to Xen.
This should fix the "Assertion '! IS_INVALID_M2P_ENTRY(gpfn)'"-crash in
free_shadow_page on domain destruction.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-29 16:50:59 +01:00
cl349@firebug.cl.cam.ac.uk a10d8554f8 Re-arrange code for followup patch and remove extra shadow_lock in function which is only called with the lock already held.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-29 16:47:46 +01:00
kaf24@firebug.cl.cam.ac.uk 816b45f1c4 Compute actual baud rate from UART divisor latch contents
when no baud rate is specified. Generalise the divisor
calculation based on external clock rate.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-29 16:02:40 +01:00
kaf24@firebug.cl.cam.ac.uk 0f60ff7a3b Ensure curr_vcpu in domain.c is set correctly, even when
nr physical cpus is greater than max virtual cpus per domain.

Also do not initialise secondary CPU smp_processor_id() from
smpboot.c cpucount. It will be wrong if some CPUs fail to boot.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-29 15:39:22 +01:00
kaf24@firebug.cl.cam.ac.uk 54336cd685 Make maximum number of supported physical CPUs a compile-time
option via the 'max_phys_cpus=<nr>' compilation parameter.

Based on a patch from Aravindh Puthiyaparambil at Unisys.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-29 14:54:43 +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
kaf24@firebug.cl.cam.ac.uk fd24f14fe4 SVM patch to update guest time with latest hvm modifications.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-03-29 13:56:26 +01:00
kaf24@firebug.cl.cam.ac.uk 111ce84369 Some fixes to IRET hypercall and failsafe callback handlers:
1. IRET hypercall must restore the event callback mask. This
    was missing on x86/64, and both subarchitectures now restore
    from EFLAGS.IF.
 2. Failsafe callbacks are fixed to detect whether fault is due to
    bad segment or due to IRET. In the latter case we now
    immediatiately kill the process. This avoids infinite looping
    between IRET hypercall and failsafe callback handler in the guest.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-29 12:02:45 +01:00
cl349@firebug.cl.cam.ac.uk f73e4555d6 Initialise p2m entries to INVALID_MFN and disable debug printk in pfn to mfn lookup.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-29 10:46:36 +01:00
kaf24@firebug.cl.cam.ac.uk 57f82067cf Fix get_page_type() when passed PGT_va_mutable.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-28 21:21:26 +01:00
kaf24@firebug.cl.cam.ac.uk fd8719a931 Clean up and fix VCPU hotplug and SMP save/restore.
1. No longer hold xenbus_lock while taking down VCPUs
    in SMP suspend path. This allows block device hotplug
    to continue working and so we will not deadlock on
    paging in userspace hotplug code.
 2. Track xenbus and local-admin permitted cpumasks for 
    VCPUs to bring online. So, if a local admin takes a
    CPU down, that won't surprisingly get overridden next
    time the kernel interrogates xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-28 18:43:30 +01:00
cl349@firebug.cl.cam.ac.uk ee35c5fbf6 Change do_IRQ high bit masking.
Allow more than 256 interrupt vectors on native by only setting the
highest bit when marking orig_eax to indicate that we're not within
a system call.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-28 14:19:22 +01:00
kaf24@firebug.cl.cam.ac.uk 52c437a6da The introduction of the SMI handling code added in cset 9371 is
"reversed", as in it actually clears the SMI bit in the VMCB. If you
have a new enough chip (or new BIOS), the SMI bit HAS TO BE SET or it
gives exitcode -1. 

Signed-off-by: Mats Petersson <mats.petersson@amd.com>
2006-03-28 13:45:08 +01:00
kaf24@firebug.cl.cam.ac.uk 6deec31297 merge 2006-03-28 13:43:22 +01:00
kaf24@firebug.cl.cam.ac.uk 77cf652765 Add missing -xen ia64 config file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-28 13:42:28 +01:00
kaf24@firebug.cl.cam.ac.uk 91b2f8b8b2 SVM only patch to fix location of PIO request RIP update.
Fixes booting of win2003 server, and various CD installation failures.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-03-28 13:40:30 +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