]> xenbits.xensource.com Git - xen.git/log
xen.git
19 years agoAdd new hypercall "set_callback" taking a callback identifier and the
Ian.Campbell@xensource.com [Thu, 6 Apr 2006 11:03:53 +0000 (12:03 +0100)]
Add new hypercall "set_callback" taking a callback identifier and the
callback address.

This new hypercall incorporates the functionality of the existing set_callbacks
hypercall in a more flexible manner. set_callbacks is retained for compatibility.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoMore simplifications to blkback:
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 10:34:14 +0000 (11:34 +0100)]
More simplifications to blkback:
 1. Remove blkif->status field as it's really not needed.
 2. Simplify connection logic.
 3. Get rid of atomic_t io_pending. There's no need for
    atomic r-m-w updates to the work-to-do flag, so replace
    with an integer and add barriers where serialisation is
    required.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoStupidly forgot there is a separate waitqueue for free pending request
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 10:13:33 +0000 (11:13 +0100)]
Stupidly forgot there is a separate waitqueue for free pending request
structures in blkback. Fix my changes to blkif_schedule().

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix the blkif_schedule() kthread loop. Much simpler; much more correct.
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 09:20:32 +0000 (10:20 +0100)]
Fix the blkif_schedule() kthread loop. Much simpler; much more correct.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAllow CONFIG_DEBUG_INFO to be specified when building
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:47:58 +0000 (09:47 +0100)]
Allow CONFIG_DEBUG_INFO to be specified when building
x86/64 XenLinux. Builds and boots fine. Leave the option
disabled by default, as with all other defconfigs.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoRemove some unnecessary code from the vTPM hotplug scripts.
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:40:15 +0000 (09:40 +0100)]
Remove some unnecessary code from the vTPM hotplug scripts.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix a problem that was caused by recent changes to the xenbus's
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:39:30 +0000 (09:39 +0100)]
Fix a problem that was caused by recent changes to the xenbus's
behavior that cause the .remove function not to be called anymore
during suspend. Due to that the driver allocated one more interrupt on
every suspend/resume cycle.  Otherwise some code reformatting,
cleanups and improvements on allocation and freeing of data structure.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoUpdate the user manual appendix to describe bow to get a mouse working
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:36:54 +0000 (09:36 +0100)]
Update the user manual appendix to describe bow to get a mouse working
properly in a VNC window. Also add 'pae' configuration introduction for
HVM guests.

Signed-off-by: You, Yongkang <yongkang.you@intel.com>
Signed-off-by: Dugger, Donald D <donald.d.dugger@intel.com>
19 years agoRemove unused code in netback's net_rx_action():
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:34:30 +0000 (09:34 +0100)]
Remove unused code in netback's net_rx_action():
new_mfn and old_mfn are set in the end half of the function
but they are not used.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoUse PAGE_OFFSET instead of __PAGE_OFFSET in netfront.c.
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:32:55 +0000 (09:32 +0100)]
Use PAGE_OFFSET instead of __PAGE_OFFSET in netfront.c.
__PAGE_OFFSET is not defined on all platforms.
Linux/ia64 and Linux/ppc don't have __PAGE_OFFSET definition.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoRemove unused teardown_irq() definition. Removes two files from sparse tree.
kaf24@firebug.cl.cam.ac.uk [Thu, 6 Apr 2006 08:22:00 +0000 (09:22 +0100)]
Remove unused teardown_irq() definition. Removes two files from sparse tree.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 5 Apr 2006 23:59:18 +0000 (00:59 +0100)]
Merged.

19 years agoFurther workarounds for the broken string marshalling in xmlrpclib. Regardless
emellor@leeni.uk.xensource.com [Wed, 5 Apr 2006 23:59:06 +0000 (00:59 +0100)]
Further workarounds for the broken string marshalling in xmlrpclib.  Regardless
of the encoding used, one still may not include non-printable characters in an
XML document.  When a dmesg contains a ^D character, something seen on one of
our test machines, an invalid XML document is generated.

Use a trick by David Mertz to work around this -- escape the string using
Python's repr function.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoBacktrack on the new interface for reserved event-channel
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 18:30:02 +0000 (19:30 +0100)]
Backtrack on the new interface for reserved event-channel
ports, as binding them in user space via the evtchn driver
would be a pain. Instead extend VIRQs so they can be
classified as 'global' or 'per vcpu'. The former can only
be allocated once per guest, but can be re-bound to
an arbitrary VCPU.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAdd new interface for allocating reserved event-channel
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 16:41:51 +0000 (17:41 +0100)]
Add new interface for allocating reserved event-channel
ports to arbitrary Xen subsystems.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoClean up build system some more. No need to explicitly
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 16:15:34 +0000 (17:15 +0100)]
Clean up build system some more. No need to explicitly
include Rules.mk/Post.mk all over the place.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoClean up HDRS Makefile variable.
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 14:46:01 +0000 (15:46 +0100)]
Clean up HDRS Makefile variable.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAdd support for XCHG instruction accessing LAPIC device model.
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 14:42:01 +0000 (15:42 +0100)]
Add support for XCHG instruction accessing LAPIC device model.

Signed-off-by: Boris Ostrovsky <bostrovsky@virtualiron.com>
19 years agoRename update_dom_time() to update_vcpu_system_time().
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 14:00:42 +0000 (15:00 +0100)]
Rename update_dom_time() to update_vcpu_system_time().
Introduce new generic function update_domain_wallclock_time().

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoExtend the 'badpage' boot option to parse inclusive
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 12:38:54 +0000 (13:38 +0100)]
Extend the 'badpage' boot option to parse inclusive
ranges of bad panges '<start_page>-<end_page>'.

Signed-off-by: Erik Bosman <ebosman@gmail.com>
19 years agoFix a regression in hvm_pio_assist() when booting Windows
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 11:23:49 +0000 (12:23 +0100)]
Fix a regression in hvm_pio_assist() when booting Windows
on VT-x. Clean up the function also.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agogdbserver readme update.
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 09:54:29 +0000 (10:54 +0100)]
gdbserver readme update.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
19 years agoThere are a couple of bugs with the current handling of reads and writes
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 09:52:10 +0000 (10:52 +0100)]
There are a couple of bugs with the current handling of reads and writes
in the configuration space overlay functions. The wrong offset is passed
to the virtual field handlers. This patch uses the variable which
contains the correct offset. This patch also fixes the logic which
generates the actual value to write to a given virtual configuration
space field.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
19 years agoDefine Xen interface version for tools build.
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 09:41:11 +0000 (10:41 +0100)]
Define Xen interface version for tools build.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix checksum-offload problems introduced in c/s 9514, due to
kaf24@firebug.cl.cam.ac.uk [Wed, 5 Apr 2006 09:37:37 +0000 (10:37 +0100)]
Fix checksum-offload problems introduced in c/s 9514, due to
data_validated flag not being properly specified on the
device channel.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoWe had reports of reboot not working on certain machines (specifically
kaf24@firebug.cl.cam.ac.uk [Tue, 4 Apr 2006 14:20:12 +0000 (15:20 +0100)]
We had reports of reboot not working on certain machines (specifically
Compaq/HP notebooks), where Linux already has code to deal with
that. Apparently that code was either deleted during the original port
or got added to Linux after the original port was done. Anyway, this
patch adds the respective Linux code (slightly adjusted) to deal with
the same systems in Xen.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoWith the standard (XEN) prefix and the setting of 8 words per line,
kaf24@firebug.cl.cam.ac.uk [Tue, 4 Apr 2006 14:06:38 +0000 (15:06 +0100)]
With the standard (XEN) prefix and the setting of 8 words per line,
stack dumps on i386 came out at 81 characters per line. The change to
xen/arch/x86/traps.c makes this 80 (without changing the look on the
screen), and the change to xen/drivers/char/console.c arranges for
soft line breaks not getting duplicated by hard line breaks, so
displaying 80 characters per line doesn't result in a subsequent blank
line.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoHVM patch to add pio IOREQ_WRITE OVERLAP/REPZ support in hvm io.c
kaf24@firebug.cl.cam.ac.uk [Tue, 4 Apr 2006 14:05:17 +0000 (15:05 +0100)]
HVM patch to add pio IOREQ_WRITE OVERLAP/REPZ support in hvm io.c
hvm_pio_assist().  Also, cleaned up a bit of duplicate code in the
functions.  Simple guest tests (ide pio) pass now for overlapped/rep
write operations.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
19 years agoSimplify the Xen genapic code. Many genapic hooks have been
kaf24@firebug.cl.cam.ac.uk [Tue, 4 Apr 2006 14:00:41 +0000 (15:00 +0100)]
Simplify the Xen genapic code. Many genapic hooks have been
replaced with unconditional static 'sane' implementations.
Functions relating to interrupt/IPI delivery have been
grouped into two sets: physical delivery and logical-flat
delivery. All subarchitectures use physical delivery except
the basic default subarchitecture.

The main behavioural changes are:
 1. Summit no longer uses logical-clustered delivery mode
 2. Physical mode no longer makes any pretence to set the
    LDR sanely. We never deliver interrupts in logical mode
    so this really should not matter.
 3. Sanity checking of phys_cpu_present_map is enabled
    for all subarchitectures. Really we should have a sane
    set of APIC IDs in the system, as we rely on them for
    physical delivery mode.
 4. We enable 'bigsmp' mode on any system with more than
    eight CPUs. The previous xAPIC check was unnecessary,
    since our bigsmp mode uses physical delivery, not
    logical-clustered.

This all obviously needs testing on some big systems.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agofix mfn check of gnttab_transfer().
sos22@douglas.cl.cam.ac.uk [Tue, 4 Apr 2006 13:04:32 +0000 (14:04 +0100)]
fix mfn check of gnttab_transfer().

Signed-off-by: Steven Smith, sos22@cam.ac.uk
From: Isaku Yamahata <yamahata@valinux.co.jp>

19 years agoWorkaround bug in xmlrpclib's string escaping. That library outputs invalid
emellor@leeni.uk.xensource.com [Tue, 4 Apr 2006 10:08:20 +0000 (11:08 +0100)]
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>
19 years agoBuild a few more common network options into the i386 -xen kernel.
kaf24@firebug.cl.cam.ac.uk [Tue, 4 Apr 2006 08:53:53 +0000 (09:53 +0100)]
Build a few more common network options into the i386 -xen kernel.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 3 Apr 2006 22:58:40 +0000 (23:58 +0100)]
Merged.

19 years agoLookup backend by name _or_id_. This is important for domain 0, for example!
emellor@leeni.uk.xensource.com [Mon, 3 Apr 2006 22:57:42 +0000 (23:57 +0100)]
Lookup backend by name _or_id_.  This is important for domain 0, for example!

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFix cpus string parsing, wrt use of ^ to remove elements.
emellor@leeni.uk.xensource.com [Mon, 3 Apr 2006 17:39:21 +0000 (18:39 +0100)]
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>
19 years agoThe attached patch fixes a race condition that occurs if after the
emellor@leeni.uk.xensource.com [Mon, 3 Apr 2006 17:32:43 +0000 (18:32 +0100)]
The attached patch fixes a race condition that occurs if after the
backend has been removed there are still requests pending. This patch
flushed all the pending requests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoImprove pygrub error reporting when opening ext2 fs is not possible
mip@xencore04.1virtual.net [Mon, 3 Apr 2006 17:28:54 +0000 (18:28 +0100)]
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>
19 years agoAllow a domain other than Domain-0 to be a backend.
tkuik@tkuik-lnx2.cisco.com [Mon, 3 Apr 2006 17:23:00 +0000 (18:23 +0100)]
Allow a domain other than Domain-0 to be a backend.

Signed-off-by: Tim Kuik tkuik@cisco.com
19 years agoRemove some dead code from the consoled client.
kaf24@firebug.cl.cam.ac.uk [Mon, 3 Apr 2006 16:48:39 +0000 (17:48 +0100)]
Remove some dead code from the consoled client.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
19 years agoClean up subarch 'mach-foo' header files. No need for
kaf24@firebug.cl.cam.ac.uk [Mon, 3 Apr 2006 16:47:42 +0000 (17:47 +0100)]
Clean up subarch 'mach-foo' header files. No need for
subarch apicdef.h and ipi.h can be much simplified.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoRemove send_IPI_all, send_IPI_allbutself and send_IPI_self
kaf24@firebug.cl.cam.ac.uk [Mon, 3 Apr 2006 15:35:06 +0000 (16:35 +0100)]
Remove send_IPI_all, send_IPI_allbutself and send_IPI_self
shortcutting IPI functions. They're either unused or used so
frequently that we may as well simplify things and always use
send_IPI_mask.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAdded tag 3.0.2-branched for changeset d0d3fef37685be264a7f52201f8ef44c030daad3
kaf24@firebug.cl.cam.ac.uk [Mon, 3 Apr 2006 14:52:58 +0000 (15:52 +0100)]
Added tag 3.0.2-branched for changeset d0d3fef37685be264a7f52201f8ef44c030daad3

19 years agoHandle failure to register the xen store event channel instead of 3.0.2-branched
Ian.Campbell@xensource.com [Mon, 3 Apr 2006 13:34:20 +0000 (14:34 +0100)]
Handle failure to register the xen store event channel instead of
just not initialising xenbus/store when the supervisor_mode_kernel
feature flag is enabled.

When initialising grant tables only -ENOSYS is a valid reason
to fail so BUG_ON anything else like we did prior to changeset
9498.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoMake checksum handling in the virtual network drivers more robust.
kaf24@firebug.cl.cam.ac.uk [Sun, 2 Apr 2006 15:16:53 +0000 (16:16 +0100)]
Make checksum handling in the virtual network drivers more robust.
Largely this involves making the logic symmetrical: for example,
not only should netfront be able to tell netback that a packet has
an empty protocol checksum field, but the reverse must also be true.

Another change is that the drivers only advertise IP checksum
offload functionality. There is currently no information
propagated across the device channel about the offset of the
protocol-specific checksum field. Therefore it is not safe to
defer checksum calculation for protocols the remote end may not
understand -- it will end up dropping having to drop the packet.

Yet another change is to allow netback to disable tx checksum
offload, just as we already could for netfront. Currently there is
no support for disabling rx checksum offload -- that would seem
to require some way of propagating the checksum-offload advertisement
(or lack of it) across the device channel, as it really ought to be
the transmitter that acts on it.

Thanks to Ian Jackson for pointing out some of the problems with
our checksum-offload handling. Several of the changes here are
due to his comments.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoEnable HYPERVISOR_sched_op() and HYPERVISOR_sched_opt_compat() for ia64.
kaf24@firebug.cl.cam.ac.uk [Sun, 2 Apr 2006 08:49:17 +0000 (09:49 +0100)]
Enable HYPERVISOR_sched_op() and HYPERVISOR_sched_opt_compat() for ia64.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years agoDefine __XEN_INTERFACE_VERSION__ when building Xen.
kaf24@firebug.cl.cam.ac.uk [Sun, 2 Apr 2006 08:48:04 +0000 (09:48 +0100)]
Define __XEN_INTERFACE_VERSION__ when building Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoThis patch fixes several issues related to vmxassist:
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 13:59:12 +0000 (14:59 +0100)]
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>
19 years agoRename sched_op->sched_op_compat and sched_op_new->sched_op
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 10:08:50 +0000 (11:08 +0100)]
Rename sched_op->sched_op_compat and sched_op_new->sched_op
after Christian's interface cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoWhen dom0 fails to balloon enough memory to allow a new domain to start,
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:52:47 +0000 (10:52 +0100)]
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>
19 years agoChanged deprecated "set-vcpus" to "vcpu-set" in the xm man page.
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:50:58 +0000 (10:50 +0100)]
Changed deprecated "set-vcpus" to "vcpu-set" in the xm man page.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
19 years agoFix makefiles for hvmloader and vmxassist for FC5 on x86_64
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:49:42 +0000 (10:49 +0100)]
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>
19 years ago[SVM] Do not update seg.base in realmode while obtaining the io
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:40:54 +0000 (10:40 +0100)]
[SVM] Do not update seg.base in realmode while obtaining the io
addr for ins/outs.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years agoMinor minios traps.c fix for x86/64.
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:39:31 +0000 (10:39 +0100)]
Minor minios traps.c fix for x86/64.

Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>

19 years ago[IA64] Include features header in xenbus_probe and build features.c
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:37:36 +0000 (10:37 +0100)]
[IA64] Include features header in xenbus_probe and build features.c

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years agoAdd new boot parameter 'lowmem_emergency_pool' which creates
kaf24@firebug.cl.cam.ac.uk [Sat, 1 Apr 2006 09:20:10 +0000 (10:20 +0100)]
Add new boot parameter 'lowmem_emergency_pool' which creates
an emergency pool of pages below 4GB (i.e., in Xen's DMA pool)
which will ever be used to satisfy normal allocation requests.

This is particularly useful in an i386 PAE environment to ensure
that pages will always be available for allocation as
page-table base directories.

Usage, for example (to reserve 16MB):
 lowmem_emergency_pool=16M

In a PAE environment, each reserved megabyte guarantees you should
be able to create up to 256 processes (counted across all guests).
16MB means you're good for 4096 processes.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix do_IRQ high bit masking.
cl349@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 16:44:26 +0000 (17:44 +0100)]
Fix do_IRQ high bit masking.
Instead of setting the highest bit (which isn't easily done on native x86_64),
negate the interrupt vector stored in orig_{e,r}ax.
Also add patch for native build.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoPlumb network vif credit-based rate limiting thorugh xenbus
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 14:34:52 +0000 (15:34 +0100)]
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>
19 years agoCurrently, xm & xend allow an XAUTHORITY to be specified in the config
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 12:51:19 +0000 (13:51 +0100)]
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>
19 years agoVarious softirq cleanups:
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 11:03:42 +0000 (12:03 +0100)]
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>
19 years agoDisable xen bus and grant tables when supervisor_mode_kernel is enabled.
Ian.Campbell@xensource.com [Fri, 31 Mar 2006 10:04:42 +0000 (11:04 +0100)]
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>
19 years agoSee panic messages before the post message processing.
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 09:24:17 +0000 (10:24 +0100)]
See panic messages before the post message processing.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
19 years agoEnable the setting and trapping of breakpoints for hvm guest.
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 09:07:55 +0000 (10:07 +0100)]
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>
19 years agoThe ia64 build doesn't yet include drivers/xen/Kconfig directly so we
kaf24@firebug.cl.cam.ac.uk [Fri, 31 Mar 2006 09:06:20 +0000 (10:06 +0100)]
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>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:26:07 +0000 (00:26 +0100)]
Merged.

19 years agoRemove the transaction parameter from xenbus_switch_state and move the state
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:24:54 +0000 (00:24 +0100)]
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>
19 years agoBetter formatting of error messages for xmlrpclib.Faults, matching similar code
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:15:12 +0000 (00:15 +0100)]
Better formatting of error messages for xmlrpclib.Faults, matching similar code
in main.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoPrint error messages to stderr. Remove unused handle_xend_error.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:14:09 +0000 (00:14 +0100)]
Print error messages to stderr.  Remove unused handle_xend_error.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoSet the permissions correctly on the XML-RPC UDP socket, so that non-root users
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:13:33 +0000 (00:13 +0100)]
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>
19 years agoFurther attempts to recover from a corrupt store, this one triggered when a
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:10:54 +0000 (00:10 +0100)]
Further attempts to recover from a corrupt store, this one triggered when a
tdb_store fails.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoDon't use abbreviated ip subcommands -- these are not accepted by iproute2.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 23:09:42 +0000 (00:09 +0100)]
Don't use abbreviated ip subcommands -- these are not accepted by iproute2.

Closes bug #478.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoRemove __HYPERVISOR_sched_op_new in favour of a header file interface version number...
cl349@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 16:50:44 +0000 (17:50 +0100)]
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>
19 years agoChange how we add the include asm override to CPPFLAGS.
cl349@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 16:50:40 +0000 (17:50 +0100)]
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>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 16:26:19 +0000 (17:26 +0100)]
Merged.

19 years agoAdded medium-length (around 20 minute run-time) test group.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 16:25:03 +0000 (17:25 +0100)]
Added medium-length (around 20 minute run-time) test group.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoThe attached trivial patch fixes cases where a block device is mounted
kaf24@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 15:53:37 +0000 (16:53 +0100)]
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>
19 years agoFix comment.
smh22@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 14:28:53 +0000 (15:28 +0100)]
Fix comment.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years agoMore fixes to gdbserver for HVM guest debugging. Also fix
kaf24@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 13:37:22 +0000 (14:37 +0100)]
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>
19 years agoUse AFLAGS for assembly files so we can "+=" more flags.
kaf24@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 13:31:57 +0000 (14:31 +0100)]
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>
19 years agoInclude the E7520 (e.g., Dell 1850) irqbalance quirk fix even when
kaf24@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 13:06:11 +0000 (14:06 +0100)]
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>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 10:55:07 +0000 (11:55 +0100)]
Merged.

19 years agoCheck the return value of domain_lookup_by_name_or_id_nr for None (i.e. no
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 10:54:07 +0000 (11:54 +0100)]
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>
19 years agoFix the ProtocolError seen when the server throws an exception and running
emellor@leeni.uk.xensource.com [Thu, 30 Mar 2006 10:51:44 +0000 (11:51 +0100)]
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>
19 years agoFix xenconsoled when sending lots of console data to a domU.
kaf24@firebug.cl.cam.ac.uk [Thu, 30 Mar 2006 10:38:56 +0000 (11:38 +0100)]
Fix xenconsoled when sending lots of console data to a domU.
Fixes bug #477.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoSame panic() behaviour as native Linux when running as domain 0.
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 23:11:53 +0000 (00:11 +0100)]
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>
19 years agoXen waits 5 seconds to reboot when domain 0 crashes, giving
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 23:07:23 +0000 (00:07 +0100)]
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>
19 years agoRevert accidental commit.
emellor@leeni.uk.xensource.com [Wed, 29 Mar 2006 17:46:51 +0000 (18:46 +0100)]
Revert accidental commit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 29 Mar 2006 17:41:30 +0000 (18:41 +0100)]
Merged.

19 years agoFix save/restore on 64-bit.
smh22@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 17:07:36 +0000 (18:07 +0100)]
Fix save/restore on 64-bit.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years agoFix save/restore bug; further rationalization of xenbus state machine
smh22@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 17:06:27 +0000 (18:06 +0100)]
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>
19 years agoFree shadows of any pages which are released by a domain back to Xen.
cl349@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 15:50:59 +0000 (16:50 +0100)]
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>
19 years agoRe-arrange code for followup patch and remove extra shadow_lock in function which...
cl349@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 15:47:46 +0000 (16:47 +0100)]
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>
19 years agoCompute actual baud rate from UART divisor latch contents
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 15:02:40 +0000 (16:02 +0100)]
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>
19 years agoEnsure curr_vcpu in domain.c is set correctly, even when
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 14:39:22 +0000 (15:39 +0100)]
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>
19 years agoMake maximum number of supported physical CPUs a compile-time
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 13:54:43 +0000 (14:54 +0100)]
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>
19 years agoRemove vcpu_avail from the public S-Expression that's passed over the wire.
anthony@rhesis.austin.ibm.com [Wed, 29 Mar 2006 13:50:57 +0000 (14:50 +0100)]
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>
19 years agoSVM patch to update guest time with latest hvm modifications.
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 12:56:26 +0000 (13:56 +0100)]
SVM patch to update guest time with latest hvm modifications.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years agoSome fixes to IRET hypercall and failsafe callback handlers:
kaf24@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 11:02:45 +0000 (12:02 +0100)]
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>
19 years agoInitialise p2m entries to INVALID_MFN and disable debug printk in pfn to mfn lookup.
cl349@firebug.cl.cam.ac.uk [Wed, 29 Mar 2006 09:46:36 +0000 (10:46 +0100)]
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>
19 years agoFix get_page_type() when passed PGT_va_mutable.
kaf24@firebug.cl.cam.ac.uk [Tue, 28 Mar 2006 20:21:26 +0000 (21:21 +0100)]
Fix get_page_type() when passed PGT_va_mutable.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoClean up and fix VCPU hotplug and SMP save/restore.
kaf24@firebug.cl.cam.ac.uk [Tue, 28 Mar 2006 17:43:30 +0000 (18:43 +0100)]
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>