Commit Graph
7515 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 7429bfd50d This patch provide local APIC support for vmx guest.
A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-10-28 09:48:46 +01:00
kaf24@firebug.cl.cam.ac.uk a3cdca7914 xm help notes that domid can be used in place of domname.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2005-10-27 18:22:45 +01:00
kaf24@firebug.cl.cam.ac.uk e2e0774656 No side effects in BUG_ON statements in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-27 18:21:57 +01:00
kaf24@firebug.cl.cam.ac.uk 8fa033460a To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
2005-10-27 17:47:53 +01:00
kaf24@firebug.cl.cam.ac.uk ca068fad60 I've created a patch to get the mini-os to compile in Xen-unstable. The patch
is pretty big, but this is mostly because I've replaced hypervisor.h with the
hypercalls.h header file from Linux (which seems easier to maintain
anyway). I've ignored X86_64.

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
2005-10-27 17:43:29 +01:00
kaf24@firebug.cl.cam.ac.uk ac266cafda Originally in qemu when a IDE dma transfer is started which is triggered
by access to 0xc000 port in VMX, qemu will blocked there until it
finished. And during that block, there are extra dom switches between
dom0 and idle domain, and VMX can't be resumed. By making real IDE dma
tranfer run in another thread, qemu will return and VMX resume on time
and there are fewer cycle wasted.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2005-10-27 17:29:39 +01:00
kaf24@firebug.cl.cam.ac.uk a7da7a4ecb The attached patch fixes 2 issues with the scripts written for the Xen
access control module and makes the tools more self-explanatory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-27 17:27:04 +01:00
kaf24@firebug.cl.cam.ac.uk 2b41ca6037 This patch
* adapts the Xen access control module to recent changes in the "unbound 
event channel" interface and its usage
* adds checks that became necessary because of domain structures "hanging 
around" in the domain list after domain destruction

This patch is tested on today's xen-unstable with Null, CHWALL, STE, 
CHWALL_STE policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2005-10-27 17:24:06 +01:00
kaf24@firebug.cl.cam.ac.uk 41ae27972e Remove all binaries on make clean. 2005-10-27 17:20:33 +01:00
kaf24@firebug.cl.cam.ac.uk ce57ab29ff Remove a non-portable and unused error.h, and use signal.h not
sys/signal.h (in tools/misc).
2005-10-27 17:16:48 +01:00
kaf24@firebug.cl.cam.ac.uk 9485da60b7 Use standard int typedefs.
Signed-off-by: John Levon <levon@movementarian.org>
2005-10-27 17:16:12 +01:00
kaf24@firebug.cl.cam.ac.uk 650fa32a00 BUG_ON() is a macro very very similar to assert(), and it's a really bad
idea in general to put statements with side-effects inside such a construct
(for example the BUG_ON() could be compiled away for non-debug builds).

The patch below fixes this for the drivers/xen tree.

I chose the general construct to store the respective return values in a
local var instead of an if (...) BUG(); because it looks like most of these
BUG_ON()'s need to be replaced by real error handling when going towards
production releases anyway, and then the local variable is going to be
needed anyway. (and besides the if construct tends to get unreable due to
the unlikely() etc).

Please apply.

Greetings,
   Arjan van de Ven
2005-10-27 17:09:01 +01:00
emellor@leeni.uk.xensource.com f76bd5cf5e Fix Jerone Young's xenstat / xenstore patch:
Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-27 10:53:02 +01:00
jeroney@localhost.localdomain 740401a4f8 * Enable xenstat to use xenstore
* Have xentop display names instead of DomIDs
  as requested in Bugzilla#311 filed by Ian
2005-10-27 10:19:58 +01:00
emellor@leeni.uk.xensource.com 6ee89dae79 Fix the check for non-existence of the save/restore directories, by using &&
rather than -a.  The former shortcuts at the script level, whereas the latter
does not, which means that the backtick-enclosed arguments are evaluated
regardless of the success of preceding tests.

Tidy the aforementioned test into a function of its own.

Add an implementation of usleep for those systems that only have sleep (Debian,
for example).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 16:59:13 +01:00
emellor@leeni.uk.xensource.com 0edd55be19 Move exception handler for sxp.ParseError above that for Exception, as the
latter subsumes the former.  Minor tidy-ups.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:59:29 +01:00
emellor@leeni.uk.xensource.com a8a1d48e4c Break the write_dev function out from block into new block-common.sh, where it
can also be used by block-enbd and block-nbd.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:58:13 +01:00
emellor@leeni.uk.xensource.com 902a84f59f Added copyright notice.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:57:16 +01:00
emellor@leeni.uk.xensource.com b043099b44 New xendomains init script, courtesy of Kurt Garloff:
It now allows the user to configure what he wants to be done on
xendomains stop: sysrq, migrate, save, or shutdown.
For this to be safe, a timeout has been introduced (optional).
On start, saved domains may be restored, and not yet started
domains from the auto start dir will be started in addition.
status reports missing domains, restart and reload work as well.

The init script is somewhat SUSE-ish, but it should work on LSB
compliant and on RH based distros as well.

I would appreciate this to be put into tools/examples/init.d/

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-26 14:55:32 +01:00
emellor@leeni.uk.xensource.com 5c8eb3b727 Check whether dom is NULL when we handle a watch. This might occur if the
domain has recently been removed from our list, but with a watch still in
flight.  This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 13:41:00 +01:00
emellor@leeni.uk.xensource.com ccbd11acd6 Added comment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 12:06:58 +01:00
jeroney@localhost.localdomain 22d8d7060f Remove second decleration of .PHONY & cleanup formating 2005-10-25 17:37:00 +01:00
emellor@leeni.uk.xensource.com e4ba1fec3e Fix format spec for tracing.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-25 16:00:49 +01:00
emellor@leeni.uk.xensource.com 617482f058 NBD scripts, courtesy of Kurt Garloff:
For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-25 11:52:56 +01:00
emellor@leeni.uk.xensource.com 655b6990ad Merged. 2005-10-25 11:24:01 +01:00
emellor@leeni.uk.xensource.com 1033d025c4 Moved SuSE-specific getcfg call into a preiftransfer call. The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-25 11:22:47 +01:00
chris@ubuntu.eng.hq.xensource.com be8604faf3 Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-24 19:04:30 -07:00
emellor@leeni.uk.xensource.com 31ad1c62b7 Change argument spec for introduce_domain argument parsing, as the MFN is a long.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 18:24:07 +01:00
emellor@leeni.uk.xensource.com 35b62f2630 Remove recently added uses of errno, as these cause trouble on ia64 builds.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 18:21:38 +01:00
emellor@leeni.uk.xensource.com 9f8f052650 Removed some unnecessary imports.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 15:18:31 +01:00
emellor@leeni.uk.xensource.com 8b6e8053b8 Added a timestamp to the logging output by trace_io.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 14:12:42 +01:00
emellor@leeni.uk.xensource.com 493b98bf23 Do not create the console tty until domain_create_ring has succeeded. This
means that any reads attempted on that tty will not cause handle_tty_read to
segfault looking for an interface that does not exist.

Move the writing of the tty node so that it happens after console/limit has
been read, as it is cleaner if the writing is the last thing that happens.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 14:11:07 +01:00
vhanquez@kneesa.uk.xensource.com 9b6fdc5d38 compute the correct totalram_pages when the balloon increase or decrease the
reservation. memory reports should be more correct now.

From: Satoshi Uchida <s-uchida@ap.jp.nec.com>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-10-24 12:57:37 +01:00
kaf24@firebug.cl.cam.ac.uk 7ce0fde009 Attached patch avoids "Bad L1 flags 80" for VMX domains. Thanks Ian for
the suggestions.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-10-24 08:04:38 +01:00
emellor@leeni.uk.xensource.com fea7782321 Change the semantics of GetDomainPath so that it always succeeds, regardless of
whether a domain has been introduced to the store.  Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced.  This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce.  Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.

No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.

Do not write the contents of the info block to the store.  All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:45:15 +01:00
emellor@leeni.uk.xensource.com 4384b3fc70 Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:34:13 +01:00
kaf24@firebug.cl.cam.ac.uk dab3d2969d Enable TSC-offsetting capability to ensure that VMX
guest's TSC remains in sync with virtual-PIT interrupts.
This avoids the following message from full-virt Linux:
       "Losing too many ticks!
        TSC cannot be used as a timesource. =20
        Possible reasons for this are:
          You're running with Speedstep,
        ......"

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-10-23 16:54:51 +01:00
kaf24@firebug.cl.cam.ac.uk 9329e6405d Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-23 16:51:47 +01:00
kaf24@firebug.cl.cam.ac.uk 74df472110 some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-23 11:51:15 +01:00
emellor@leeni.uk.xensource.com bacb111591 Reintroduce the changes made by changeset 7455:021324804fbd, which were
disabled by workaround 7468:17a9f111fa93.  We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-22 11:04:45 +01:00
kaf24@firebug.cl.cam.ac.uk 55179ce8a5 Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 10:33:26 +01:00
kaf24@firebug.cl.cam.ac.uk 900a11e8ed cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 08:35:03 +01:00
kaf24@firebug.cl.cam.ac.uk c6d83ccc90 Fix assertions in bitops.c.
Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>
2005-10-22 07:43:56 +01:00
kaf24@firebug.cl.cam.ac.uk db65a8e335 This patch is to make xentop able to print vcpu usage for out of order
enabled vcpus in a domain. This really isn't an issue anymore with the
changes made to dom0 ops and xm/xend. 

But, I provide it because:

- Josh noticed my previous patch called getvcpuinfo twice for each vpcu,
which was completely silly.

- this patch would be useful in the remote chance that domain vpcus are
enabled out of order. 

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2005-10-22 07:37:15 +01:00
kaf24@firebug.cl.cam.ac.uk 44d95809c5 Two patches were applied to pygrub's setup.py to work around python2.2
limitations and only one is needed. Revert one of them.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-22 07:35:36 +01:00
kaf24@firebug.cl.cam.ac.uk 3eeb704112 Disable Xen verbosity by default. At this point I think it
is best to disable 'scary' warning messages by default,
even though this will also quieten down genuine error
paths.

The ideal solution would be to introduce DPRINTK levels
(e.g., info, warning, error) and allow these to be selected
at compile and/or boot time. We could then enable error
messages until things have stabilised some more.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-21 20:07:54 +01:00
jrb44@plym.cl.cam.ac.uk 1bd54c9db6 Temporary workaround to xend start problem.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-21 18:51:42 +01:00
kaf24@firebug.cl.cam.ac.uk 3f450621b6 This is a follow up of PIC device model by Xiaofeng and me to move to
hypervisor using virtual weired interrupt line.  With this patch the
performance of CPU2K improves 7%, kernel kuild improves 14% and
cyclesoak improves 12%. It is quite amazing!

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
2005-10-21 18:29:26 +01:00
kaf24@firebug.cl.cam.ac.uk 7ebcb094f9 Tweak to pygrub build config detection.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-21 18:19:38 +01:00
kaf24@firebug.cl.cam.ac.uk 73e4aa4e2b Fix allocation of phys_to_machine_mapping array during
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-21 16:22:09 +01:00