Commit Graph
7451 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 35658f8da5 Update one file from qemu 0.71 for Cirrus Logic VGA device model.
Using the older device model running pinball game on windows with
full screen can cause guest crash.

Signed-off-by: yunhong.jiang@intel.com
2005-10-21 10:24:35 +01:00
kaf24@firebug.cl.cam.ac.uk 9f202a0633 Send special keys that your graphical user interface intercepts at
low level, such as ctrl-alt-del in X Window.

Adds a command "sendkey" to deal with it in the monitor, you
can send keys to the vm. Use - to press several keys simultaneously.
Example:
sendkey ctrl-alt-f1

Signed-off-by:      Dan Xu <dan.d.xu@intel.com>
Signed-off-by:      Zhai, Edwin <edwin.zhai@intel.com>
Signed-off-by:      Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-21 10:20:38 +01:00
kaf24@firebug.cl.cam.ac.uk 5aa6b4306e Turn off some debug switches by default
These macros cause extra prints in /var/log/xend-debug, and
affect the performance.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-21 10:17:29 +01:00
kaf24@firebug.cl.cam.ac.uk cc677c9d4e This patch to the Xen access control module (ACM) and tools:
1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized 
domains to retrieve policy decisions regarding the sharing of resources 
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such 
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in 
domain 0; currently there is no enforcement in Dom0 and all packets flow 
freely
   *  the security policy in block device backends to control which 
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision 
ACM interface call, it is in tools/security/get_decision.c and will be 
compiled together with the policy tools. As usual, the ACM is unconfigured 
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>
2005-10-20 21:37:15 +01:00
jrb44@plym.cl.cam.ac.uk d52306f795 Avoid specifying bogus DISPLAY=None when spawning device model.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-20 19:37:41 +01:00
emellor@leeni.uk.xensource.com 739b1e205e Merged. 2005-10-20 12:35:57 +01:00
emellor@leeni.uk.xensource.com dd319571b5 Fix the recently-introduced failure to preserve uuid across a guest reboot.
Store the uuid in string form inside XendDomainInfo, to aid this.

Add restart-squelching logic to ensure that runaway domains to restart
indefinitely.  The logic here could be cleverer, say including a backoff for
retrying, in case a network block device has gone away, but for now this will
do to stop the pathological behaviour.  Fixes bug #275.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-20 12:34:50 +01:00
kaf24@firebug.cl.cam.ac.uk 36e3401c27 New function direct_kernel_remap_pfn_range(). Like
direct_remap_pfn_range but doesn't take a vma and implicitly
maps into init_mm.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-20 12:10:14 +01:00
kaf24@firebug.cl.cam.ac.uk 8169ff8c95 disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-10-20 11:52:27 +01:00
kaf24@firebug.cl.cam.ac.uk 96491f3ad5 smp_call_function() must be usable as an expression
return an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-20 11:27:51 +01:00
kaf24@firebug.cl.cam.ac.uk 27a9d6d614 Fix NMI race with context switch.
The machine used to auto reboot if an NMI was received in a critical
time window when context switching domains. There is a small time
window when the GDT may become unmapped (after CR3 is updated and
before setting GDTR with the new GDT during a domain context
switch. If an NMI is received during this time window a triple fault
is triggered causing the machine to auto reboot.

Bug found and original patch proposed by Jose Renato Santos
<jsantos@hpl.hp.com>.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-20 11:25:55 +01:00
tristan.gingold@bull.net 81e869fdc6 Makes smp_call_function a real stmt if CONFIG_SMP is not defined.
This avoid a GCC warning.
2005-10-20 06:01:11 -04:00
emellor@leeni.uk.xensource.com e68e8c51d2 This patch fixes the problem that VMX guest can not get brought up on
current tip (changeset 7425).

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-19 18:18:30 +01:00
emellor@leeni.uk.xensource.com 9bbfe307e6 Merged. 2005-10-19 16:25:39 +01:00
emellor@leeni.uk.xensource.com a77149f8e4 New network-bridge script and associated gubbins.
This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
  (the ifup may otherwise figure that the veth0 hardware is
   NOT the same as the original ${netdev} and not use the same
   config -- this happens on SUSE. Charles Coffing tracked this
   one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 16:24:54 +01:00
kaf24@firebug.cl.cam.ac.uk 4308423bdd pygrub's setup.py relies on distutils.UnixCCompiler.has_function(),
which does not exist with python2.2, causing the following build
error:

make[2]: Entering directory `/home/muli/xen/x86.hg/tools/pygrub'
CFLAGS=" -m32 -march=i686" python setup.py build
Traceback (most recent call last):
  File "setup.py", line 15, in ?
    if cc.has_function("ext2fs_open2"):
AttributeError: UnixCCompiler instance has no attribute 'has_function'

The following patch gets it to build, but is pretty ugly. A proper fix
would be to do the check for ext2fs_open2() in a way that is backward
compatible with python2.2.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-19 16:07:11 +01:00
kaf24@firebug.cl.cam.ac.uk 7c2cea666f Declare ac_timer_init() properly in ac_timer.h 2005-10-19 15:51:14 +01:00
emellor@leeni.uk.xensource.com 6a227e5300 Merge. 2005-10-19 14:00:37 +01:00
emellor@leeni.uk.xensource.com a91b3cb6d7 Added diagnosis tool for broken domains.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:59:22 +01:00
kaf24@firebug.cl.cam.ac.uk 1283fe84f2 Add slack to balloon driver to allow to counteract low-mem
address space allocations in backend drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-19 13:59:15 +01:00
kaf24@firebug.cl.cam.ac.uk 81bcfd83ac merge 2005-10-19 13:42:55 +01:00
kaf24@firebug.cl.cam.ac.uk 3158496ec8 Better fix to detect failed patch application when building
guest kernels.
Signed-off-by: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-19 13:39:59 +01:00
emellor@leeni.uk.xensource.com f3adfa9dcb Set the console limit for DomUs based on a value set in xend-config.sxp.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:37:16 +01:00
emellor@leeni.uk.xensource.com c8a1f1c7fc Some trivial changes for the tool scripts:
- make xen-hotplug-common.sh (un)set locales.
 - use xen-hotplug-common.sh in vif-bridge.

From Gerd Knorr <kraxel@suse.de>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:34:44 +01:00
emellor@leeni.uk.xensource.com db6435aaa8 Added sedf_get functionality to XendClient interface. From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:33:22 +01:00
emellor@leeni.uk.xensource.com 963785e3ee Remove unused parameter from addControllerClass. This became unused when the
BE_DOMAIN flags were removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:53:00 +01:00
emellor@leeni.uk.xensource.com 6d55f51603 Remove unused shadow_control functionality from the Python layer. This is
handled in xc_linux_save, and no-one in the Python layer uses this functionality
directly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:51:25 +01:00
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk 4bdaa2c588 Rename 2.6.12.5 patch so it actually gets applied. Fail
the build if 'patch' is missing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-19 07:43:03 +01:00
kaf24@firebug.cl.cam.ac.uk 5e91bc5c8a Fix -xen builds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:28:16 +01:00
kaf24@firebug.cl.cam.ac.uk 1a7490299e Domain0 doesn't do initial VCPU hotplug via xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:07:03 +01:00
kaf24@firebug.cl.cam.ac.uk e85a40dd36 Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:02:14 +01:00
emellor@leeni.uk.xensource.com a1190ad2e6 Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:07:11 +01:00
emellor@leeni.uk.xensource.com ac6e05c769 Added uuid unit test.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:01:14 +01:00
emellor@leeni.uk.xensource.com 1e6d1e90a2 Fix call to getVCpuCount for dom0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 17:45:50 +01:00
kaf24@firebug.cl.cam.ac.uk 0a105191a0 Merge i386/x86_64 smpboot.c into a simplified common Xen version.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 17:40:31 +01:00
kaf24@firebug.cl.cam.ac.uk 5cf031e58d alloc_netif() must return a ERR_PTR() on error, not NULL.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 15:40:29 +01:00
kaf24@firebug.cl.cam.ac.uk 422ad78b3c Clean up some VMX IO handler code:
1. Clean up some definitions.
2. change d to v, if it means vcpu.
3. remove some tailing spaces.

TODO:
split current VMX IO handler list to 2, one for port IO,
and the other for MMIO.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-18 11:09:36 +01:00
kaf24@firebug.cl.cam.ac.uk f2fabb9e4e Fix x86_64 smp boot:
The local_setup_timer prototype was bad. The call from start
secondary() to it was calling with out the CPU parameter. Eventually the
CPU parameter received by the local_setup_timer is bogus (big negative
number). With such a big cpu number the per_cpu macro was trying to
access totally wrong memory location (per cpu data offset for big -ve no
cpu) causing the unhandled page fault. Because the dom0 was panicking
the error information on the serial console was also not going through,
giving just clueless hang.  With hyper call based debug statement I
could find out what was going wrong in the dom0.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2005-10-18 11:07:55 +01:00
kaf24@firebug.cl.cam.ac.uk 3a44cc2613 Allow interdomain channels to bind DOMID_SELF to DOMID_SELF.
Signed-off-by: Steve King <steven.r.king@intel.com>
2005-10-18 11:04:48 +01:00
kaf24@firebug.cl.cam.ac.uk 0fd482ecd5 There are only six fields in vcpuinfo.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-10-18 10:53:30 +01:00
kaf24@firebug.cl.cam.ac.uk 7126177413 In the shadow mode, thanks to recent patches, the shadow
reference counts (both general counts and type counts)
are now correct in all of my testing so far.  As a result,
we should remove the shadow_tainted_refcnt flag from
the domain structure.  Leaving this flag in place would
create confusion for programmers and would also prevent
future debugging of problems in handling general and type
reference counts in the shadow mode.  In addition, the
patch also (1) drops the requirement that shadow_mode_disable()
should only be called in the domain destruction sequence
(even though it is only used that way so far), and
(2) strictly assert that the type reference count must
be 0 when we free a page from the dom heap.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
2005-10-18 10:45:29 +01:00
cl349@firebug.cl.cam.ac.uk 006b46b2d0 Fix transaction EAGAIN handling in xenstore client programs.
Redirect all output to a buffer and only print the buffer once the
transaction succeeds, discarding output from previous attempts.
In particular, fixes failures when the (block) backend driver would
not configure because reads from the hotplug script did get double
output when a transaction had to be redone.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-18 02:08:26 +01:00
emellor@leeni.uk.xensource.com fe453929d3 Put back the arg_check calls removed recently -- they aren't as useless as I
thought they were.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 20:34:10 +01:00
emellor@leeni.uk.xensource.com 6f4faa61b2 More removal of BE_DOMAIN flags. 2005-10-17 16:33:27 +01:00
emellor@leeni.uk.xensource.com ce4bbfbf11 Merged. 2005-10-17 16:23:26 +01:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk dc66fe31f3 Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:54:28 +01:00
kaf24@firebug.cl.cam.ac.uk 3afe806f6f Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:15:17 +01:00
emellor@leeni.uk.xensource.com dcd2f1cf1f Merged. 2005-10-17 14:12:20 +01:00