xen.git
17 years agox86 vmx: Remove vmxassist.
Keir Fraser [Wed, 6 Feb 2008 12:07:55 +0000 (12:07 +0000)]
x86 vmx: Remove vmxassist.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRevert 16973:b5427f2d83c3, which breaks automated testing (HVM qemu-dm
Keir Fraser [Tue, 5 Feb 2008 23:27:12 +0000 (23:27 +0000)]
Revert 16973:b5427f2d83c3, which breaks automated testing (HVM qemu-dm
will not die when it is told to).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86_emulate: fix side-effect macro call.
Keir Fraser [Tue, 5 Feb 2008 15:50:59 +0000 (15:50 +0000)]
x86_emulate: fix side-effect macro call.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agovmx realmode: Emulate protected-mode transition while CS and SS have
Keir Fraser [Tue, 5 Feb 2008 15:45:10 +0000 (15:45 +0000)]
vmx realmode: Emulate protected-mode transition while CS and SS have
bad selector values (bottom two bits non-zero).

Allows opensuse 10.3 install CD to boot. Unfortunately SUSE Linux 10.1
install CD still fails to work...

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Scrub vnc password for vfb from xend.log.
Keir Fraser [Tue, 5 Feb 2008 10:40:10 +0000 (10:40 +0000)]
xend: Scrub vnc password for vfb from xend.log.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agoxend: Restore values of /vm/uuid/xend/* to recreated domains.
Keir Fraser [Tue, 5 Feb 2008 10:39:35 +0000 (10:39 +0000)]
xend: Restore values of /vm/uuid/xend/* to recreated domains.

When guest domains are restarted, previous values of /vm/uuid/xend/*
in xenstore are lost.  (e.g. previous_restart_time,
last_shutdown_reason). This patch restores them to restarting domains.
And we should update /vm/uuid/xend/restart_count of restarting
domains, not previous domains.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agox86_emulate: Fix SAHF emulation.
Keir Fraser [Tue, 5 Feb 2008 10:29:19 +0000 (10:29 +0000)]
x86_emulate: Fix SAHF emulation.
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
17 years agox86: adjust reserved bit page fault handling
Keir Fraser [Mon, 4 Feb 2008 13:57:01 +0000 (13:57 +0000)]
x86: adjust reserved bit page fault handling
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 shadow: Cleanup for early-unshadow code.
Keir Fraser [Mon, 4 Feb 2008 13:51:17 +0000 (13:51 +0000)]
x86 shadow: Cleanup for early-unshadow code.

The unhooking of toplevel shadow entries has been removed; the rest of
the early-unshadow code needs to reflect that.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
17 years agoioemu: use SIGHUP instead of SIGKILL
Keir Fraser [Mon, 4 Feb 2008 13:44:29 +0000 (13:44 +0000)]
ioemu: use SIGHUP instead of SIGKILL

The stub domain device model needs to trap the termination signal so
as to actually destroy the stub domain.  SIGKILL can't be trapped,
SIGTERM is caught by SDL and so may be unnoticed.  SIGHUP can be
trapped and is not caught by SDL (and by default causes a process
termination without core).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoRevert 16947:32b898768217027. Breaks HVM qcow-backed discs.
Keir Fraser [Mon, 4 Feb 2008 13:42:53 +0000 (13:42 +0000)]
Revert 16947:32b898768217027. Breaks HVM qcow-backed discs.
Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: FPU management cleanups.
Keir Fraser [Sun, 3 Feb 2008 10:22:08 +0000 (10:22 +0000)]
hvm: FPU management cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx realmode: HOST_CR0.TS must be cleared when restoring guest FPU
Keir Fraser [Sun, 3 Feb 2008 09:30:59 +0000 (09:30 +0000)]
vmx realmode: HOST_CR0.TS must be cleared when restoring guest FPU
state, otherwise in-Xen CR0.TS value becomes set again on next
vmexit. Then we crash the next time we try to emulate an FPU
instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRevert 16963:d29d74d4eeac and 16750:2ac0fd9fd4b4.
Keir Fraser [Sun, 3 Feb 2008 09:09:21 +0000 (09:09 +0000)]
Revert 16963:d29d74d4eeac and 16750:2ac0fd9fd4b4.
Continue to SIGKILL qemu-dm so that 'xm destroy' should always work
rather than hang if qemu-dm is in a bad state.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix hvmloader makefile dependencies, and do not recurse into
Keir Fraser [Sat, 2 Feb 2008 13:40:43 +0000 (13:40 +0000)]
Fix hvmloader makefile dependencies, and do not recurse into
tools/firmware/etherboot by default (the dependency of eb_roms.h on
Config does not seem to always prevent the build from going ahead, for
some reason).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoetherboot: Supply pre-built option ROMs to avoid needing to build
Keir Fraser [Sat, 2 Feb 2008 11:24:20 +0000 (11:24 +0000)]
etherboot: Supply pre-built option ROMs to avoid needing to build
Etherboot from scratch in most situations.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix to Xen NAT network scripts for Debian.
Keir Fraser [Sat, 2 Feb 2008 10:55:25 +0000 (10:55 +0000)]
Fix to Xen NAT network scripts for Debian.
Xen recently (changeset 16873:86c32269ba60) started looking for a
DHCP defaults file in /etc/sysconfig/dhcpd or /etc/defaults/dhcp.
Debian (lenny) puts this file in a different place though:
/etc/default/dhcp3-server.  I added this location to Xen's search
path.

From: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Fix grow of the LEGACY_UNSUPPORTED_BY_XENAPI_CFG list each time
Keir Fraser [Sat, 2 Feb 2008 10:53:24 +0000 (10:53 +0000)]
xend: Fix grow of the LEGACY_UNSUPPORTED_BY_XENAPI_CFG list each time
we instantiate a new XendConfig.
Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
17 years agoFix save/restore failure cleanup
Keir Fraser [Sat, 2 Feb 2008 10:51:54 +0000 (10:51 +0000)]
Fix save/restore failure cleanup

The save failure cleanup introduced in 13543:207523704fb1 is
incorrect: if we didn't get as far as actually suspending the domain,
then the guest domain will not be expecting the devices to be removed
(seen on both Linux and Solaris, which don't expect a 'Closing' state
when they hold the device open). Only re-jig devices if we definitely
shut the domain down.

Signed-off-by: John Levon <john.levon@sun.com>
17 years agohvm: Fix 'xm save' bug in qhich qemu-dm ignores SIGTERM.
Keir Fraser [Fri, 1 Feb 2008 12:01:34 +0000 (12:01 +0000)]
hvm: Fix 'xm save' bug in qhich qemu-dm ignores SIGTERM.

When saving a guest in early ChangeSet (Before 16750), Xend will
send "SIGKILL" signal to kill qemu process. But in ChangeSet 16750,
the signal is modified to "SIGTERM". However, "SIGTERM" handler has
been registered by SDL in qemu. So when qemu process receives a
"SIGTERM", SDL will catch it and it will push out a "SDL_QUIT" even to
qemu. If qemu can receive that event, it will be successfully
terminated. While we do "xm save", qemu can't go out from the dead
loop "while (suspend_requested) {...}" in main_loop() to handle the
SQL_QUIT event. So it is unable to poll that "SDL_QUIT" event. This
makes xm save command hang. This fix enables qemu to poll the
"SDL_QUIT" event while doing save.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
17 years agox86 shadow: Fix cross-page write emulation failure.
Keir Fraser [Fri, 1 Feb 2008 11:21:27 +0000 (11:21 +0000)]
x86 shadow: Fix cross-page write emulation failure.
Signed-off-by: Disheng Su <disheng.su@intel.com>
17 years agoDirect Linux boot: XenD changes for HVM direct Linux boot.
Keir Fraser [Fri, 1 Feb 2008 11:18:15 +0000 (11:18 +0000)]
Direct Linux boot: XenD changes for HVM direct Linux boot.

This patch provides the tools support for direct kernel boot of
HVM guests. Currently the config files in /etc/xen support the
args  'kernel', 'ramdisk' and 'extra'. For PV guests these have
the obvious meaning.

Unfortunately HVM guest configs hijacked the 'kernel' parameter
and use it to refer to the path of the HVM firmware. So, this
patch adds a new config file parameter called 'loader' which is
used to refer to the HVM firmware instead.

The conventions for loading the initrd image say that it should
live at the end of memory. This requires QEMU to know the size
of the guest's initial RAM allocation, so image.py is changed
to pass the '-m' flag to QEMU.

The HVMImageHandler class in image.py is changed so that if the
'kernel', 'ramdisk' or 'extra' params were given in the config
these are passed to QEMU with the '-kernel', '-initrd' and
'-append' flags respectively.

Finally, the 'loader' param is used as the arg to 'xc_hvm_build'
instead of the old 'kernel' param.

For the sake of compatability with old HVM guest config files,
if the config file has a 'kernel' param whose path matches that
of the HVM firmware, then we automatically convert this 'kernel'
param into the 'loader' param. This ensures existing HVM guests
work without changes required.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
17 years agoDirect Linux boot: Support booting non-relocatable Linux kernels.
Keir Fraser [Fri, 1 Feb 2008 11:16:37 +0000 (11:16 +0000)]
Direct Linux boot: Support booting non-relocatable Linux kernels.

This patch introduces a hack to make non-relocatable kernels
bootable too. Non-relocatable kernels absolutely want to run
at 0x100000 and are not at all happy about being at 0x200000.
Fortunately, thanks to crazy programs like LOADLIN, Linux has
a couple of hooks in its boot process which can be used to
play games. The 'code32_switch' hook is executed immediately
following the switch to protected mode.

So, this patch installs a hook at 0x200000+kernel_size. The hook
is hand crafted assembly which sets up all the segments as needed,
then essentially does memmove(0x100000,0x200000,kernel_size) and
finally does an unconditional jmp to 0x100000.

Amazingly this actually really does work. It has been successfully
tested with RHEL-2.1 and Fedora Core 6 install kernels on i386, and
Fedora Core 6 and 7 kernels on x86_64.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
17 years agoDirect Linux boot: Support booting relocatable Linux kernels.
Keir Fraser [Fri, 1 Feb 2008 11:14:53 +0000 (11:14 +0000)]
Direct Linux boot: Support booting relocatable Linux kernels.

This patch introduces the basic infrastructure for direct kernel
boot in the ioemu copy of QEMU. The current #ifdef disabled
code is actually obsolete wrt to upstream QEMU code. So this
is removed entirely. In its place I have imported the latest
upstream QEMU code. The QEMU code assumes that the guest RAM
is directly mapped into the QEMU process, so there were some
changes neccessary. Instead of strcpy/memcpy'ing the args
and kernel header into guest RAM, cpu_physical_memory_rw is
used. Intead of fread() the initrd and kernel into guest RAM
a helper function is used fread2guest which reads into a small
buffer and then uses cpu_physical_memory_rw.

NB in reading the following, Documentation/i386/boot.txt is
a useful reference for what's going on.

Next, instead of loading the kernel at 0x100000, this code
loads it at 0x200000. This is far enough away that there's
no risk of it overlapping with the HVM firmware image. If the
Linux kernel boot protocol is 0x205 or later, and the flag
at offset 0x234 in the kernel header is 1, then the guest
kernel was built with CONFIG_RELOCATABLE=y.

In this scenario we merely need to tell the kernel what address
it has been relocated to by writing 0x200000 into the kernel
header at offset 0x214. When switching from real mode into
protected mode the kernel will immediately start executing at
0x200000 and be happy with life. This should work for 2.6.20 or
later on i386, and 2.6.22 or later on x86_64.

This has been verified with Fedora 7 and Fedora 8 bare metal kernels
on i386 and x86_64 from the $TREE/images/pxeboot of the install trees.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
17 years agohvm: Etherboot for E100 NIC
Keir Fraser [Thu, 31 Jan 2008 16:23:35 +0000 (16:23 +0000)]
hvm: Etherboot for E100 NIC
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoRemove unused find-gcc-3 script.
Keir Fraser [Thu, 31 Jan 2008 14:14:23 +0000 (14:14 +0000)]
Remove unused find-gcc-3 script.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoetherboot: Fix the build.
Keir Fraser [Thu, 31 Jan 2008 14:01:59 +0000 (14:01 +0000)]
etherboot: Fix the build.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agovmx realmode: Exception delivery clears interrupt shadow.
Keir Fraser [Thu, 31 Jan 2008 13:01:08 +0000 (13:01 +0000)]
vmx realmode: Exception delivery clears interrupt shadow.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix x86/64 Xen build.
Keir Fraser [Thu, 31 Jan 2008 11:05:14 +0000 (11:05 +0000)]
Fix x86/64 Xen build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix xm shutdown/reboot for HVM domain of IA64
Keir Fraser [Thu, 31 Jan 2008 09:43:05 +0000 (09:43 +0000)]
Fix xm shutdown/reboot for HVM domain of IA64

xc.domain_destroy_hook() is called twice when we execute
xm shutdown/reboot command to an HVM domain without PV drivers.
The first calling is from shutdown() in XendDomainInfo.py.
The second calling is from destroyDomain() in XendDomainInfo.py.
The first calling is not necessary, so this patch removes it.

A discussion about this patch is as follows.
 http://lists.xensource.com/archives/html/xen-ia64-devel/2008-01/msg00232.html

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agoSmall fix for VMX Core2 perfctr access.
Keir Fraser [Thu, 31 Jan 2008 09:41:32 +0000 (09:41 +0000)]
Small fix for VMX Core2 perfctr access.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agolibxc: Fix the third argument of bitmap_64_to_byte in xc_tbuf_set_cpu_mask
Keir Fraser [Thu, 31 Jan 2008 09:39:44 +0000 (09:39 +0000)]
libxc: Fix the third argument of bitmap_64_to_byte in xc_tbuf_set_cpu_mask
Signed-off-by: Eric Liu <eric.e.liu@intel.com>
17 years agobuild: Make PREFIX work by fixing LIBDIR
Keir Fraser [Thu, 31 Jan 2008 09:38:34 +0000 (09:38 +0000)]
build: Make PREFIX work by fixing LIBDIR

In the current tree, setting PREFIX does not work very well.  This is
because of confusion about the meaning of LIBDIR.  In some places it
is the pathname tail of directories containing libraries (lib, lib64
or lib/amd64).  But in other places it is a destination pathname
(implicitly, including any PREFIX).  This can result in PREFIX or /usr
being added the wrong number of times.

This patch splits LIBDIR into two variables, LIBLEAFDIR and
LIBDIR.  LIBDIR is the directory into which Xen libraries and other
similar code is to be placed, and includes any PREFIX.  LIBLEAFDIR is
just the library tail and can be appended to various different
prefixes; for example, to construct the X11 library directory for -L.

Neither variable contains the value of DESTDIR, which is of course
used only to redirect the results of `make install' when desired.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agovmx realmode: Emulate MSR accesses.
Keir Fraser [Thu, 31 Jan 2008 09:33:26 +0000 (09:33 +0000)]
vmx realmode: Emulate MSR accesses.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoAdd DTrace support to xenstored
Keir Fraser [Thu, 31 Jan 2008 09:13:27 +0000 (09:13 +0000)]
Add DTrace support to xenstored

Add USDT probes for significant xenstore operations to allow dynamic
tracing.

Signed-off-by: John Levon <john.levon@sun.com>
17 years agoioemu: Stop PV guest from parsing xenstore and opening block devices.
Keir Fraser [Thu, 31 Jan 2008 09:11:21 +0000 (09:11 +0000)]
ioemu: Stop PV guest from parsing xenstore and opening block devices.

PV guests are now using QEMU for a vncserver.  During initialization
of QEMU xenstore_parse_config() is being called causing PV guests to
open block devices.  This patch makes a new function,
xenstore_daemon_open(), so that the vnc password functions have an
open xenstore handle and moves xenstore_parse_config() into the FV
machine specific init function.

Signed-off-by: Pat Campbell <plc@novell.com>
17 years agoBuild etherboot ROM from source.
Ian Jackson [Wed, 30 Jan 2008 18:39:04 +0000 (18:39 +0000)]
Build etherboot ROM from source.

We now include the source for Etherboot (5.4.2, obtained from git)
rather than a pre-built ROM.  This gives better traceability and GPL
licence compliance.  See tools/firmware/etherboot/README for details.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agoioemu: Fix xenstore access changes.
Keir Fraser [Wed, 30 Jan 2008 15:19:22 +0000 (15:19 +0000)]
ioemu: Fix xenstore access changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoioemu: strip tap subtype prefix from image name
Keir Fraser [Wed, 30 Jan 2008 14:25:55 +0000 (14:25 +0000)]
ioemu: strip tap subtype prefix from image name

Currently I am not able to mount or boot from an HVM CDROM when it is
configured for 'tap:aio' instead of 'file'.

disk=[ 'tap:aio:/var/lib/xen/images/sles10-sp2-fv/disk0,hda,w', '
       tap:aio:/home/iso/sles/SLES10.iso,hdc:cdrom,r', ]

With this patch I am able to boot from the CDROM and or mount it.

Patch changes xenstore.c:xenstore_process_event() to strip the tap
subtype prefix from the image name.

Signed-off-by: Pat Campbell <plc@novell.com>
17 years agoxend: fix external-device-migrate step 0
Keir Fraser [Wed, 30 Jan 2008 14:24:20 +0000 (14:24 +0000)]
xend: fix external-device-migrate step 0

Add domain name to a migrateDevice call, so the helper script
(external-device-migrate example) does not fail at step 0
(MIGRATION_TEST).

Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
17 years agoacm, xend: Fix resetting policy.
Keir Fraser [Wed, 30 Jan 2008 14:23:17 +0000 (14:23 +0000)]
acm, xend: Fix resetting policy.

Fix a problem when resetting the policy and the label of Domain-0
needs to be renamed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agovmx: Clean up after Core2 perf-monitoring patch.
Keir Fraser [Wed, 30 Jan 2008 11:17:14 +0000 (11:17 +0000)]
vmx: Clean up after Core2 perf-monitoring patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx: Enable Core 2 Duo Performance Counters in HVM guest
Keir Fraser [Wed, 30 Jan 2008 09:59:27 +0000 (09:59 +0000)]
vmx: Enable Core 2 Duo Performance Counters in HVM guest
Signed-off-by: Haitao Shan <haitao.shan@intel.com>
17 years agoxend: Small fix for hvm/hap flags.
Keir Fraser [Wed, 30 Jan 2008 09:38:10 +0000 (09:38 +0000)]
xend: Small fix for hvm/hap flags.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoioemu: use standard uint8_t instead of uint8 in new e100 s/r code
Keir Fraser [Wed, 30 Jan 2008 09:37:06 +0000 (09:37 +0000)]
ioemu: use standard uint8_t instead of uint8 in new e100 s/r code
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: Perform uuid/name uniqueness check on restore.
Keir Fraser [Wed, 30 Jan 2008 09:35:49 +0000 (09:35 +0000)]
xend: Perform uuid/name uniqueness check on restore.
From: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoioemu: Better fix for SB16 infinite looping.
Keir Fraser [Wed, 30 Jan 2008 09:33:26 +0000 (09:33 +0000)]
ioemu: Better fix for SB16 infinite looping.

Qemu upstream solves "Fix an infinite loop in the emulated SB16
device" issue differently as stated in [2]

[1] http://xenbits.xensource.com/xen-3.1-testing.hg?rev/4b22d472bda6
[2] http://lists.gnu.org/archive/html/qemu-devel/2008-01/msg00709.html

Signed-off-by: S. Caglar Onur <caglar@pardus.org.tr>
17 years agovtpm: Small makefile fix.
Keir Fraser [Wed, 30 Jan 2008 09:31:35 +0000 (09:31 +0000)]
vtpm: Small makefile fix.
Signed-off-by: Jason Andryuk <the_deuce@yahoo.com>
17 years agominios: Fix bug when blkfront reading into zero-mapped buffer
Keir Fraser [Tue, 29 Jan 2008 15:18:27 +0000 (15:18 +0000)]
minios: Fix bug when blkfront reading into zero-mapped buffer
by just poking the page.
No need to use virtual_to_mfn() for the ring since that is a real page.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: Fix building PV guests after introducing new HVM-HAP config option.
Keir Fraser [Tue, 29 Jan 2008 15:16:35 +0000 (15:16 +0000)]
xend: Fix building PV guests after introducing new HVM-HAP config option.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Obey localtime config option for HVM guests as well as PV guests.
Keir Fraser [Tue, 29 Jan 2008 15:15:51 +0000 (15:15 +0000)]
xend: Obey localtime config option for HVM guests as well as PV guests.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86, hvm: Add a per-domain parameter to specify shadow or hap.
Keir Fraser [Tue, 29 Jan 2008 13:46:16 +0000 (13:46 +0000)]
x86, hvm: Add a per-domain parameter to specify shadow or hap.
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
17 years agox86: Fix shadow pinning logic (for PV live relo).
Keir Fraser [Tue, 29 Jan 2008 11:50:30 +0000 (11:50 +0000)]
x86: Fix shadow pinning logic (for PV live relo).
From: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix HVM hypercall preemption causing guest crash.
Keir Fraser [Tue, 29 Jan 2008 11:47:42 +0000 (11:47 +0000)]
x86: Fix HVM hypercall preemption causing guest crash.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
17 years agoioemu: Add support for e100 nic save/restore.
Keir Fraser [Tue, 29 Jan 2008 11:45:15 +0000 (11:45 +0000)]
ioemu: Add support for e100 nic save/restore.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agox86: Fix XENPF_change_freq hypercall to not dereference a non-existent
Keir Fraser [Tue, 29 Jan 2008 11:19:04 +0000 (11:19 +0000)]
x86: Fix XENPF_change_freq hypercall to not dereference a non-existent
stack variable. Also sanity check (slightly) the frequency argument to
cpu_frequency_change().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix 16889:60bb765b25b5 in a couple of respects:
Keir Fraser [Tue, 29 Jan 2008 09:36:37 +0000 (09:36 +0000)]
x86: Fix 16889:60bb765b25b5 in a couple of respects:
 1. Leave bottom-most 1MB permanently mapped.
 2. ACPI-table mapping code shoudl be aware that mappings above 1MB of
 non-RAM are not permanent.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agominios: Fix ia64 build.
Keir Fraser [Mon, 28 Jan 2008 12:58:57 +0000 (12:58 +0000)]
minios: Fix ia64 build.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agoUpdate hgignore list now that tools/libxc/xen/ no longer exists.
Keir Fraser [Mon, 28 Jan 2008 12:04:38 +0000 (12:04 +0000)]
Update hgignore list now that tools/libxc/xen/ no longer exists.

17 years agofirmware: Use new path to xen public headers.
Keir Fraser [Mon, 28 Jan 2008 12:03:02 +0000 (12:03 +0000)]
firmware: Use new path to xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx realmode: Multiple I/O reads to qemu in an instruction is not
Keir Fraser [Mon, 28 Jan 2008 11:28:55 +0000 (11:28 +0000)]
vmx realmode: Multiple I/O reads to qemu in an instruction is not
allowed. But we do allow, for example, a read followed by a write
(e.g., MOVS within video RAM).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86-64: use 1GB pages in 1:1 mapping if available
Keir Fraser [Mon, 28 Jan 2008 10:17:05 +0000 (10:17 +0000)]
x86-64: use 1GB pages in 1:1 mapping if available

At once adjust the 2/4Mb page handling slightly in a few places (to
match the newly added code):
- when re-creating a large page mapping after finding that all small
  page mappings in the respective area are using identical flags and
  suitable MFNs, the virtual address was already incremented pas the
  area to be dealt with, which needs to be accounted for in the
  invocation of flush_area() in that path
- don't or-in/and-out _PAGE_PSE on non-present pages
- when comparing flags, try minimse the number of l1f_to_lNf()/
  lNf_to_l1f() instances used
- instead of skipping a single page when encountering a big page
  mapping equalling to what a small page mapping would establish, skip
  to the next larger page boundary

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoMake check-libext2fs cross-friendly
Keir Fraser [Mon, 28 Jan 2008 09:33:57 +0000 (09:33 +0000)]
Make check-libext2fs cross-friendly

check-libext2fs was calling host gcc; pass $CC from Makefile
so it can call the cross-compiler instead.

Signed-off-by: Aron Griffis <aron@hp.com>
17 years agoMove remaining xen/include/public/foreign files to tools/include/xen-foreign
Keir Fraser [Sun, 27 Jan 2008 17:25:56 +0000 (17:25 +0000)]
Move remaining xen/include/public/foreign files to tools/include/xen-foreign
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
--HG--
rename : xen/include/public/foreign/mkchecker.py => tools/include/xen-foreign/mkchecker.py
rename : xen/include/public/foreign/mkheader.py => tools/include/xen-foreign/mkheader.py
rename : xen/include/public/foreign/reference.size => tools/include/xen-foreign/reference.size
rename : xen/include/public/foreign/structs.py => tools/include/xen-foreign/structs.py

17 years agoRemove machine setting from HOSTCFLAGS.
Keir Fraser [Sun, 27 Jan 2008 17:05:47 +0000 (17:05 +0000)]
Remove machine setting from HOSTCFLAGS.

The host compiler must know how to produce runnable binaries without
special settings.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoxenstore headers also need public includes.
Keir Fraser [Sun, 27 Jan 2008 17:05:05 +0000 (17:05 +0000)]
xenstore headers also need public includes.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agolibxc: Push parallel build of libraries down to a new phony target, as
Keir Fraser [Sun, 27 Jan 2008 17:03:35 +0000 (17:03 +0000)]
libxc: Push parallel build of libraries down to a new phony target, as
'build' is already loaded with library dependencies on ia64.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix ia64 public headers installation typo.
Keir Fraser [Sun, 27 Jan 2008 16:44:04 +0000 (16:44 +0000)]
Fix ia64 public headers installation typo.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agoDo not special-case native architecture in mkchecker.py.
Keir Fraser [Sun, 27 Jan 2008 13:03:10 +0000 (13:03 +0000)]
Do not special-case native architecture in mkchecker.py.
From: Bastian Blank <waldi@debian.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoUpdate hgignore for tools/include/xen/*
Keir Fraser [Sun, 27 Jan 2008 12:59:30 +0000 (12:59 +0000)]
Update hgignore for tools/include/xen/*

17 years agoDefine CFLAGS and LDFLAGS for libxenstore.
Keir Fraser [Sun, 27 Jan 2008 12:58:15 +0000 (12:58 +0000)]
Define CFLAGS and LDFLAGS for libxenstore.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoDefine CFLAGS and LDFLAGS for libxenguest.
Keir Fraser [Sun, 27 Jan 2008 12:58:02 +0000 (12:58 +0000)]
Define CFLAGS and LDFLAGS for libxenguest.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoDefine CFLAGS and LDFLAGS for libxenctrl.
Keir Fraser [Sun, 27 Jan 2008 12:57:14 +0000 (12:57 +0000)]
Define CFLAGS and LDFLAGS for libxenctrl.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agolibxc: Remove duplicate zlib check.
Keir Fraser [Sun, 27 Jan 2008 12:53:56 +0000 (12:53 +0000)]
libxc: Remove duplicate zlib check.

It is already checked in tools/check/check_zlib.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agotools: Merge clean and distclean target.
Keir Fraser [Sun, 27 Jan 2008 12:53:35 +0000 (12:53 +0000)]
tools: Merge clean and distclean target.
Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoHypervisor build subsystem does not need COMPILE_ARCH/COMPILE_SUBARCH.
Keir Fraser [Sun, 27 Jan 2008 12:49:42 +0000 (12:49 +0000)]
Hypervisor build subsystem does not need COMPILE_ARCH/COMPILE_SUBARCH.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoAdd check to subdirs.
Keir Fraser [Sat, 26 Jan 2008 15:27:18 +0000 (15:27 +0000)]
Add check to subdirs.
Also make sure that the install target doesn't call the install check.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoAdd ioemu to subdirs.
Keir Fraser [Sat, 26 Jan 2008 15:26:55 +0000 (15:26 +0000)]
Add ioemu to subdirs.
ioemu is handled different because of the configure setup.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoCall makefile recursively for subdirs.
Keir Fraser [Sat, 26 Jan 2008 15:26:41 +0000 (15:26 +0000)]
Call makefile recursively for subdirs.
This makes it possible to handle subdirs differently.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoRemove tools/guest-headers; no longer needed.
Keir Fraser [Sat, 26 Jan 2008 15:26:15 +0000 (15:26 +0000)]
Remove tools/guest-headers; no longer needed.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoMove xen/foreign build out of tree setup.
Keir Fraser [Sat, 26 Jan 2008 14:44:30 +0000 (14:44 +0000)]
Move xen/foreign build out of tree setup.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoUse real source files for xen/foreign build.
Keir Fraser [Sat, 26 Jan 2008 14:43:47 +0000 (14:43 +0000)]
Use real source files for xen/foreign build.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoMove xen/sys parts down to tools/include/xen-sys.
Keir Fraser [Sat, 26 Jan 2008 14:42:55 +0000 (14:42 +0000)]
Move xen/sys parts down to tools/include/xen-sys.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoAdd PRIVATE_BINDIR. Use it.
Keir Fraser [Sat, 26 Jan 2008 14:42:03 +0000 (14:42 +0000)]
Add PRIVATE_BINDIR. Use it.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoAlso install xen/sys into headers.
Keir Fraser [Sat, 26 Jan 2008 14:41:39 +0000 (14:41 +0000)]
Also install xen/sys into headers.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agox86: When Xen is notified that CPU frequency has changed, do not trust
Keir Fraser [Sat, 26 Jan 2008 11:29:29 +0000 (11:29 +0000)]
x86: When Xen is notified that CPU frequency has changed, do not trust
the current TSC-extrapolated time when we re-sync.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoInroduce new vcpu_lock_affinity() and vcpu_unlock_affinity() helper
Keir Fraser [Sat, 26 Jan 2008 11:25:48 +0000 (11:25 +0000)]
Inroduce new vcpu_lock_affinity() and vcpu_unlock_affinity() helper
functions for use by x86's continue_hypercall_on_cpu().

This has two advantages:
 1. We can lock out ordinary vcpu_set_affinity() commands from dom0.
 2. We avoid the (in this case bogus) check for dom0_vcpus_pin.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRemove commented-out dropping from previous changeset.
Keir Fraser [Sat, 26 Jan 2008 10:39:58 +0000 (10:39 +0000)]
Remove commented-out dropping from previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoMove generation of public header hierarchy into the tools.
Keir Fraser [Sat, 26 Jan 2008 10:38:44 +0000 (10:38 +0000)]
Move generation of public header hierarchy into the tools.

This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoblktap: Clean up makefile and linked libs.
Keir Fraser [Sat, 26 Jan 2008 10:17:33 +0000 (10:17 +0000)]
blktap: Clean up makefile and linked libs.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoChangeset 16771 introduced a new file called tools/check/funcs.sh. This
Keir Fraser [Sat, 26 Jan 2008 10:16:21 +0000 (10:16 +0000)]
Changeset 16771 introduced a new file called tools/check/funcs.sh. This
file needs to be installed into distdir together with the check scripts.

Signed-off-by: Frank Arnold <frank.arnold@amd.com>
17 years agoUse VPATH instead of symlinks for libelf inclusion into libxenctrl.
Keir Fraser [Sat, 26 Jan 2008 10:15:38 +0000 (10:15 +0000)]
Use VPATH instead of symlinks for libelf inclusion into libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agoUpdate XenAPI version number, changelog, and cover sheet.
Keir Fraser [Fri, 25 Jan 2008 16:30:34 +0000 (16:30 +0000)]
Update XenAPI version number, changelog, and cover sheet.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agox86: Ensure RAM holes really are not mapped in Xen's ongoing 1:1 physmap.
Keir Fraser [Fri, 25 Jan 2008 16:26:31 +0000 (16:26 +0000)]
x86: Ensure RAM holes really are not mapped in Xen's ongoing 1:1 physmap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: First 1MB of memory should be mapped with 4kB mappings to avoid
Keir Fraser [Fri, 25 Jan 2008 16:02:20 +0000 (16:02 +0000)]
x86: First 1MB of memory should be mapped with 4kB mappings to avoid
conflict with fixed-range MTRRs. While there, we now map the VGA hole
as uncacheable.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Clarify early_page_fault() handler intent, and improve debug tracing.
Keir Fraser [Fri, 25 Jan 2008 13:42:36 +0000 (13:42 +0000)]
x86: Clarify early_page_fault() handler intent, and improve debug tracing.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix leaking of /vm/<uuid> path in xenstore on various VM lifecycle events.
Keir Fraser [Fri, 25 Jan 2008 13:29:51 +0000 (13:29 +0000)]
Fix leaking of /vm/<uuid> path in xenstore on various VM lifecycle events.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agoRemove outdated comments concerning Xen API in xend configuration file.
Keir Fraser [Fri, 25 Jan 2008 13:29:31 +0000 (13:29 +0000)]
Remove outdated comments concerning Xen API in xend configuration file.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agoFix 'on_*=rename-restart' domain configuration option.
Keir Fraser [Fri, 25 Jan 2008 13:29:07 +0000 (13:29 +0000)]
Fix 'on_*=rename-restart' domain configuration option.

When setting e.g. 'on_crash=rename-restart' option in domain config
and crashing guest OS running in the domain, the new domain is
restarted with same name as renamed domain.

jfehlig4: # xm li
Name                                        ID   Mem VCPUs State Time(s)
Domain-0                                     0   1233   4  r----- 937.9
Domain-e64b12a0-0493-44d7-afde-55c776513426 21   384    1  ---c-  14.3
Domain-e64b12a0-0493-44d7-afde-55c776513426 22   384    1  r-----  7.3

This patch copies the domain info prior to setting new name and uuid
in the crashed domain info and uses the copied domain info to
construct the restarted domain.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years ago(Re)introduce notion of crashed VM power state.
Keir Fraser [Fri, 25 Jan 2008 13:28:25 +0000 (13:28 +0000)]
(Re)introduce notion of crashed VM power state.

The crashed power state is necessary to allow both core-dumping a
crashed but preserved VM and renaming/restarting a crashed VM.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>