Commit Graph
9033 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com 06d17943f0 Added a basic integrity checker, and some basic ability to recover from store
corruption, rather than just spewing error messages and exiting.

Added a xenstore-control executable, which sends commands to xenstored.
Currently, the only command is 'check', which triggers an integrity check.
(The integrity check is also triggered whenever a corrupted store is detected).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 02:09:23 +01:00
emellor@leeni.uk.xensource.com 8920f45cc8 Silence the messages that are emitted when removing nodes that already have
been removed.  This is fine, in a cleanup script.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 02:01:17 +01:00
emellor@leeni.uk.xensource.com 4749c682b0 Avoid a race between Xend removing the vm entries corresponding to a domain,
and the hotplug scripts checking whether that domain is still alive.  This
triggers the "xenstore-read: couldn't read path /local/domain/107/vm" message
in /var/log/xen-hotplug.log, followed by "Device XYZ is mounted in a guest
domain and so cannot be mounted now".

Closes bug #514.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 01:59:28 +01:00
kaf24@firebug.cl.cam.ac.uk af77e81a1c Fix problems with HVM PAE guests with >4GB memory.
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2006-03-01 23:41:43 +01:00
kaf24@firebug.cl.cam.ac.uk 4a8c3511f1 Add SVM 32bit msr support (combined both 32bit with 64bit functions)
and enable vlapic for 64bit.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-03-01 23:39:43 +01:00
kaf24@firebug.cl.cam.ac.uk 7595516fa0 Clean up SVM 32-bit exits.S file (remove all tsc/fpu).
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-03-01 23:38:18 +01:00
kaf24@firebug.cl.cam.ac.uk 2c1a8a16e5 Revert two uses of CONFIG_PAGING_LEVELS to CPP rather than C predicate.
Fixes PAE and 64-bit builds.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-01 23:35:55 +01:00
kaf24@firebug.cl.cam.ac.uk 71a0b53a1a map_domain_page() now handles running on idle page tables.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-01 18:34:06 +01:00
kaf24@firebug.cl.cam.ac.uk 8c52f78fc5 Disallow cmpxchg8b ptwr emulation for non-pae. Also a few cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-01 18:33:36 +01:00
emellor@leeni.uk.xensource.com 3ef81423e2 Remove unused #include <sys/ioctl.h>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-01 17:52:37 +01:00
kaf24@firebug.cl.cam.ac.uk c9c1967cb0 Clean wrpt state when emulating CR3 write.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-01 14:49:31 +01:00
kaf24@firebug.cl.cam.ac.uk 10a6fd541c SVM patch to add 64bit hv support.
This patch only modifies svm files.
Tested with c/s 9015 with 32bit hv using UP Dom0, with UP linux and
winxpsp1 unmodified guests.
Tested with c/s 9015 with 64bit hv using UP Dom0, with 32bit and 64bit
UP linux and 32bit winxpsp1.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 22:57:38 +01:00
kaf24@firebug.cl.cam.ac.uk cc12ca26b5 Allow tpmfront/tpmback to be built as modules.
From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 19:00:15 +01:00
kaf24@firebug.cl.cam.ac.uk a7361f672b Allow netback to be built as a module.
From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 18:59:24 +01:00
kaf24@firebug.cl.cam.ac.uk 8df09a9d15 Allow blkback to be built as a module.
From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 18:56:00 +01:00
kaf24@firebug.cl.cam.ac.uk 43e75330bf Avoid using unexported add_timer_on() function in netback driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 18:15:18 +01:00
kaf24@firebug.cl.cam.ac.uk 99cab9a778 Sketch a new interface for transferring hypercall arguments in memory.
Instead of manipulating guest virtual addresses, 'guest handles' are
passed across the hypercall interface, which may only be manipulated
via the interface exported by guest_access.h.

So far this has only been applied to the memory_op hypercall. The
interfaces are still subject to change. Other hypercalls can be updated
after the interface is agreed upon.

Also cleaned up the hypercall_create_continuation() interface to take
a format string and different-typed varargs (they do not all need to
be castable to longs).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 17:45:20 +01:00
kaf24@firebug.cl.cam.ac.uk ec42d0fc1a Clean up management of 'initial images' temporary buffers.
Avoid double-freeing boundary pages.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 11:58:45 +01:00
kaf24@firebug.cl.cam.ac.uk dfd53f76ba Fix tools Makefiles to respect CFLAGS. Disable stack-smash
protection when building vmxassist/hvmloader.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 11:41:54 +01:00
kaf24@firebug.cl.cam.ac.uk efc061e453 Add 'm' debug key to print free-memory info.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 11:07:18 +01:00
kaf24@firebug.cl.cam.ac.uk f9ef80600b Fix a multi HVM domain issue (bugzilla bug #542):
This issue can be reproduced on SMP platform, while the domain 0
is UP. The reason is, after finishing a dma request, the dma thread will
trigger the interrupt and then clear the call back function. When guest
get the interrupt , it will try to check the call back function, if it
is set, then it will trigger a dma request again. So if the checking for
the callbackfunction happens between trigger interrupt and clear
callback function on dma thread, it will cause NULL function calling.
After with domain 0 UP and smp platform, this situation can be
reproduced easily.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2006-02-28 10:18:34 +01:00
kaf24@firebug.cl.cam.ac.uk cd39504aca Fix SVM cr0 handling.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 10:14:32 +01:00
kaf24@firebug.cl.cam.ac.uk e7a6ad4927 Fix SVM PAE support.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 10:14:10 +01:00
kaf24@firebug.cl.cam.ac.uk 2e9e5c7ead Fix SVM guest pin timer migration logic.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 10:13:26 +01:00
kaf24@firebug.cl.cam.ac.uk a68cc879d9 Fix SVM vlapic logic.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 10:12:29 +01:00
kaf24@firebug.cl.cam.ac.uk 42900bec7f Removing hvm_safe_block() from the SVM hlt function avoids SVM guest problems.
This is a temporary solution.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
2006-02-28 10:11:33 +01:00
emellor@leeni.uk.xensource.com 902bd89eeb Merged. 2006-02-27 18:44:38 +01:00
Ian.Campbell@xensource.com a6f599555c Add support for configuring feature flags when starting guests.
Guest configuration files may now contain a features= declaration
listing the features which should be enabled in a | separated
list.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-02-27 17:27:52 +00:00
cl349@firebug.cl.cam.ac.uk 9d77d697b1 Update to Linux 2.6.16-rc5.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-27 16:56:08 +00:00
kaf24@firebug.cl.cam.ac.uk 444c98e4a7 Check feature flag supervisor_mode_kernel in dom0 builder.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-27 17:55:22 +01:00
emellor@leeni.uk.xensource.com 637c719f00 Reconstitute the ip parameter correctly. Closes bug #491.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 17:26:16 +01:00
kaf24@firebug.cl.cam.ac.uk 53fcd3bb76 Allow a guest to switch pagetables 'atomically'. That is, the new pagetables
do not need to be read-only in the old pagetables, and the old pagetables do
not need to be read-only in the new pagetables.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-27 17:18:58 +01:00
emellor@leeni.uk.xensource.com 3775cfcd81 Use cleverer sed pattern to avoid use of head -1.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 17:16:28 +01:00
emellor@leeni.uk.xensource.com f32e156c0e Break out the hotplug cleanup code into xen-hotplug-cleanup. Claim the block
script's lock before doing the cleanup, to avoid a race that causes the message
"xenstore-list: could not list path backend/vbd/40" in /var/log/hotplug.log,
with a subsequent refusal to create the domain, after a domain reboot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 17:16:04 +01:00
emellor@leeni.uk.xensource.com 1b2fcd85a0 Merged. 2006-02-27 16:29:03 +01:00
emellor@leeni.uk.xensource.com 7aa86f0d35 Move files that have appeared in the wrong place due to incorrect patch -p setting.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 16:28:57 +01:00
kaf24@firebug.cl.cam.ac.uk 5a64892ddd xen/ia64 uaccess is still linux style with different declaration as
common xen. It's meaningless to patch original file with many #ifdef
XEN, and so instead copy that file to create a new xen specific
uaccess file, with unused lines removed. May need render later.

Or else it breaks compilation on xen-unstable.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-02-27 16:22:02 +01:00
kaf24@firebug.cl.cam.ac.uk a531692b45 Fix a missed unmap in __entry().
On x86_32p, after several creation/destroy of VMX domain, xen crashes
because we forget to unmap phys_table.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-02-27 16:20:23 +01:00
emellor@leeni.uk.xensource.com 975a49cb6e While testing TCP & UDP tests (coming soon), I tracked down a bug in the
IP addressing scheme
used by xm-test: each machine running network tests is using the same IP
addresses, so two machines
in the same network can cross-pollinate/interfere with each other's tests.

This patch changes the IP addressing scheme to add some randomness. It's
gone through a couple of dozen
passes of xm-test, some on -bridge and some on -route, while xm-test was
running on another box on the same network.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
2006-02-27 16:14:11 +01:00
emellor@leeni.uk.xensource.com d8a4248e02 The attached patch does the following:
- introduces two basic tests for the virtual TPM (skipped on hardware
where a TPM is not available or vtpm manager has not been started
manually before)
- adapts the Makefiles to make the test cases available
- splits up the hotplug files into two files where the vtpm-common.sh
can be sourced by 'other' scripts as well
- uses echo "$var" to return variables from functions
- gets rid of the 'set +e" work-around
- introduces a script (vtpm-delete) to delete entries from the virtual
TPM directory in /etc/xen/vtpm.db

The xm-tests will skip over the 2nd test on most systems and the patch
has otherwise no effect on existing tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-27 16:13:05 +01:00
emellor@leeni.uk.xensource.com 46ede6808b The attached patch breaks out
- log() function from xen-hotplug-common.sh -> logging.sh
- locking-related functions from xen-hotplug-common.sh  -> locking.sh

- xen-hotplug-common.sh 'sources' both those files now to not loose
these functions (which should make the break-out atomic)

- adapts the Makefile to install locking.sh and logging.sh at the right
place.

I ran the xm-tests over it and no (additional) errors appear due to this
change.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-27 16:11:01 +01:00
kaf24@firebug.cl.cam.ac.uk 79e4b2910a Add a compile time option to enable domain 0 running in ring 0.
In this mode only a single guest kernel is supported.

This mode only works for x86/32 (not x86/64).

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-27 15:52:43 +01:00
Ian.Campbell@xensource.com d521323da3 merge 2006-02-27 11:02:00 +00:00
Ian.Campbell@xensource.com 002d669228 List pae_pgdir_above_4gb in features for x86/32 Linux kernel.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-02-27 11:01:06 +00:00
Ian.Campbell@xensource.com abc0b290e7 merge. 2006-02-27 10:59:31 +00:00
Ian.Campbell@xensource.com ebc9e1ccdb Support XENFEAT_supervisor_mode_kernel in x86/64 HYPERVISOR_IRET macro
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-02-27 10:58:17 +00:00
Ian.Campbell@xensource.com 0fd06de05a Only panic() if the dom0 kernel requires an unknown feature flag.
It is acceptable for a guest kernel to support (but not require)
a feature which the hypervisor does not understand.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-02-27 10:55:13 +00:00
emellor@leeni.uk.xensource.com 5c0eb80b10 Merged. 2006-02-27 11:55:11 +01:00
cl349@firebug.cl.cam.ac.uk 0a28c5336a Fix non-xen build for: Make the fixmap area moveable in kernel address space.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-27 10:34:03 +00:00
cl349@firebug.cl.cam.ac.uk 99e35ca051 Add arch/i386/mm/pgtable.c to sparse tree.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-27 10:31:30 +00:00