100 Commits
Author SHA1 Message Date
Ian Campbell 414614d84e Refactor buildconfigs/mk.* to make the common rules separate from the
-xen specific configuration.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-10-30 16:02:33 +00:00
Ian Campbell 8cfd4e0e16 ALLOW_INTERFACE_MISMATCH defaults to "y" so don't specify it
everywhere.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-10-30 16:01:07 +00:00
Ian Campbell fe875c5098 Always use ketchup for tarball sources, since the only non-user was
the paravirt tree.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-10-30 16:01:07 +00:00
Ian Campbell e368009768 Remove the linux-2.6-paravirt build target since it is obsolete now the code is
upstream.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-10-30 16:01:07 +00:00
Ian Campbell 71f7e668f0 Using "make install" causes a distro specific script
(/sbin/installkernel) to be called since linux-2.6.18-xen.hg
211:c1f5d027adf7.

Unfortunately on some distros this script is broken for non-root
use. Our needs are pretty simple anyway so just open code the
installation of the kernel.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-19 12:12:49 +01:00
Ian Campbell 2c312d03cd Build libflask unconditionally since the python low-level tools
require it and it does't seem to pull in any major dependencies.

The alternative would have been to hack tools/python/setup.py to
conditionally compile the flask stuff.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-03 15:04:03 +01:00
Ian Campbell de73f4ddca Fix 64 bit build, cannot mix code and data declarations.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-03 14:58:35 +01:00
Ian Campbell 47e2355fc9 silentoldconfig seems to break automated testing, try an explicit make prepare
instead.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-17 16:34:11 +01:00
Ian Campbell d6ad276628 Linux 2.6.18 doesn't create include/linux/autoconf.h as a side effect
of make oldconfig. Use silentoldconfig instead.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-17 13:30:05 +01:00
Ian Campbell bc39e90242 Pull XEN_LINUX_UPDATE into mk.linux-2.6-xen so it can be shared by
src.tarball and src.hg-clone

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-17 13:28:53 +01:00
Ian Campbell 16e00ecd92 Do not clobber new wallclock offset on restore.
The new hypervisor will set shared_info->wc_* so do not clobber those
values with the saved versions from the old hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-08 15:03:40 +01:00
Ian Campbell 44cdadd1cd [32on64] Copy the right grant table status code back to the guest.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-06 13:19:44 +01:00
Ian Campbell 2aaae75a0f Build updates for building upstream trees.
* Merge the guts of the various upstream branch buildconfigs into a
  single mk.linux-2.6 which they include.
* Add support for the -git snapshot branch.
* Update .hgignore to ignore all these new trees.
* Update buildconfigs/enable-xen-config to make the upstream defconfig
  compile without questions.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-19 10:26:00 +01:00
Ian Campbell 9f426c8ad5 Add support for building -mm, -tip and -rc upstream trees.
(note that not all of those contains Xen support just yet and that a
native kernel will be silently built in that case.)


Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-09 12:04:20 +01:00
Ian Campbell b02f230733 Add support to the tarball source type for using the ketchup tool.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-09 11:57:07 +01:00
Ian Campbell 97e8f14b87 Add hooks for a script to update kernel configuration after tree has been
prepared. This is to support upstream sources which do not enable Xen in their
default configurations.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-09 11:29:39 +01:00
Ian Campbell 2141bdd107 Remove .hgskip. This was an ancient mercurial patch which was never
taken upstream.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-09 11:29:30 +01:00
Ian Campbell 57a3afdaf3 [x86/32] Support two byte CMOVcc opcodes in 4G segment fixup.
These are present in Debian Etch's libc6-i686 package.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-03 17:04:50 +01:00
Ian Campbell 587afa881b merge 2007-07-03 10:31:13 +01:00
Ian Campbell 3e764309ad [32on64 kexec] Add an explicit local branch after re-enabling paging
in 32 bit mode.

While it doesn't appear to be strictly required the documentation
calls for it. Thanks to Edwin Zhai for bringing the omission to my
attention.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-07-03 10:30:15 +01:00
Ian Campbell 4cb346f848 Fix 15435:ab95b9764b20.
The changeset did not consider about ":cdrom" and "ioemu:"
of a disk definition.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-02 08:42:13 +01:00
Ian Campbell 1dd1b5a9f6 Add a duplication definition check for devices.
This patch adds a duplication definition check for devices.
It checks the following definitions.
 - vbd : uname and device name
 - vif : mac

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-06-29 14:38:18 +01:00
Ian Campbell 4730f50174 Fix fixup of invalid PTE writes, broken by 13392:0fd65225e4c6.
By the time we test if addr is the upper word it has already been
aligned to the 8 byte pte size.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-28 18:40:20 +01:00
Ian Campbell 3f945b103c Further fixes for 32on64 bit kexec.
* switch to a suitable stack before jumping to compatibility mode.
* return the correct range for KEXEC_RANGE_MA_XEN.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-19 15:03:55 +01:00
Ian Campbell 18a6498ae3 Fix 32on64 kexec trampoline. This was broken when Xen was modified to
physically relocate itself.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-19 11:06:25 +01:00
Ian Campbell f1356ca4e0 [PATCH] Check for non-existent local repo
Check for non-existent local clone in select-repository.
Also change the #!/bin/bash to #!/bin/sh since the Makefile is calling
it explicitly with sh, and fix a couple other typos.

Signed-off-by: Aron Griffis <aron@hp.com>
2007-06-05 15:52:46 +01:00
Ian Campbell fbc9cef80b BUILD: Clone the Linux tree if it wasn't found via $(LINUX_SRC_PATH)
even if it happens to be a local directory.

If we located the Linux tree by deriving the path from "hg path
default" and it is a local path then prepend "file://" to prevent us
trying to symlink it.

Unfortunately mercurial doesn't understand file:// URLs so we have to
strip it off again before calling hg clone.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-05 08:57:53 +01:00
Ian Campbell 7fe901b954 If we find a Linux repository in $(LINUX_SRC_PATH) then symlink it
instead of cloning it. This enables developers to keep a linux tree
separate to their xen repository and to make changes there which are
picked up by the Xen build.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 15:41:32 +01:00
Ian Campbell fe4fa7d7f7 Remove a few stray references to the sparse tree.
The only non-obvious change here is in tools/xenfb/Makefile. This now picks up
the headers it requires via the copy in tools/libxc.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 12:47:53 +01:00
Ian Campbell 7c8c43eb65 Remove $(LINUX_SRCDIR) on distclean.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 11:37:50 +01:00
Ian Campbell c58e445d1c Remove sparse tree.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 11:16:19 +01:00
Ian Campbell d18c70c482 Switch over to separate Linux tree.
The sparse tree is now deprecated and will deleted in due course. The
xen-unstable build system will automatically clone the correct Linux
tree for you and all the old makefile targets
(dist/linux-2.6-xen{,0,U}/etc) should continue to work.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 10:14:53 +01:00
Ian Campbell 9a787c389c Added tag sparse-tree-deprecated for changeset bd3d6b4c52ec809f080c89c4ffcf61dc6e445978 2007-06-04 10:14:23 +01:00
Ian Campbell a7cc66ccfc Updates for XEN_LINUX_SOURCE=hg-clone.
By default search for mercurial repositories in $(LINUX_SRC_PATH)
followed by a location derived from the current Xen repository's
default parent. e.g. A clone of
http://xenbits.xensource.com/xen-unstable.hg will derive
http://xenbits.xensource.com/linux-2.6.18-xen.hg. A specific
repository can be specified by giving XEN_LINUX_HGREPO=<URL or path>
on the make command line.

Add capability to put XEN_LINUX_UPDATE=y on the make command line to
update the Linux repository. Disabled by default since we don't want
to touch a developers repository without permission.

Dropped XEN_LINUX_HGUPDATES since it was unecessary and confusing.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-31 14:51:09 +01:00
Ian Campbell d3f7f10c42 Make header mismatch checking more robust against build time changes in
xen/include/public/foreign.

Unfortunately diff's -x and -X options do not support excluding paths just
individual files so we have to list unqualified filenames. This is ok for now
since there are no filename clashes.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-30 17:37:58 +01:00
Ian Campbell 0055a08a1a Check for mismatch between headers shared by Linux and Xen.
This is only enabled for the linux-2.6-xen tree and is intended to
ensure that the separate Linux tree stays up to date once we
switch away from the sparse tree.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-30 13:10:20 +01:00
Ian Campbell ca938d8cc6 Fix preemption of multicalls in compat mode.
mcs->call (struct multicall_entry) always needs to be translated into
mcs->compat_call (struct compat_multicall_entry) when a multicall is
preempted in compat mode. Previously this translation only occured for
those hypercalls which explicitly called hypercall_xlat_continuation()
which doesn't cover all hypercalls which could potentially be
preempted.

Change hypercall_xlat_continuation() to only translate only the
hypercall arguments themselves and not the multicall_entry
layout. Translate the layout for all hypercalls in in
compat_multicall() instead.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-30 11:55:38 +01:00
Ian Campbell cf71bfc68e Correct 32on64 handling of VCPUOP_register_runstate_memory_area. We
were copying too many bytes from the guest so the test for
area.addr.h.c != area.addr.p was failing.

Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON
but this would break the new kernel on older hypervisors and the only
real problem is that stolen time is not updated, which we can live
with.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-25 15:28:52 +01:00
Ian Campbell d1252ef838 LINUX/x86_64: Cleanup 15129:a40967e39652 by using __pgd rather than
abusing mk_kernel_pgd.

Also set the user bit on the vsyscall entry in the user pgd.

Both changes suggested by Jan Beulich.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-25 11:24:02 +01:00
Ian Campbell 7a35a3f0b5 Factor out sparse tree makefile fragments and introduce hg-clone and
tarball methods in preparation for migrating away from the sparse tree
layout.

This re-introduces 14883:6568c1882af5 and 14862:98efd2e410ae plus
further fixes.

Also add makefile fragments to support building the paravirt ops tree
(make linux-2.6-paravirt-build).

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-25 11:03:40 +01:00
Ian Campbell 6b64aaa35a merge 2007-05-24 09:15:58 +01:00
Ian Campbell 65fd68d6d0 LINUX/x86_64: Ensure that the initial page tables allow userspace
mappings of the vsyscall page. This matches native behaviour by
setting the U bit on the L2-L4 page table entries and controlling
access using the L1 entries.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-24 09:14:43 +01:00
Ian Campbell 6fc1e1272c [XEND] Write the default ABI to the xenstore entry for each frontend
device.

This allows to run older kernels in a 32on64 mixed environment.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-15 19:00:48 +01:00
Ian Campbell f32a69e588 [BUILDER] Propagate the native protocol ABI for a guest out of the
domain builder and in to python code.

This knowledge will be useful to allow us to pre-seed the protocol
field in a VBD entry in xenstore which will allow us to run older
kernels in a 32on64 mixed environment.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-15 17:54:48 +01:00
Ian Campbell 310ae8d009 [BUILDER] Ensure that the L3 page table page for a PAE guest which does not
support the extended-cr3 format is below the 4G boundary.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-09 18:53:02 +01:00
Ian Campbell 169b990abc LINUX: Fixes for XENFEAT_supervisor_mode_kernel and XENFEAT_writable_page_tables.
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-24 22:35:16 +01:00
Ian Campbell 2124081013 Factor out sparse tree makefile fragments and introduce an alternative hg-clone
method in preparation for migrating away from the sparse tree layout.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-16 17:38:37 +01:00
Ian Campbell da12cd1e94 Update .hgignore so it doesn't ignore buildconfigs/* only build-*
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-13 12:01:37 +01:00
Ian Campbell aad2bffaa3 LINUX: Cleanup a few stray uses of CONFIG_XEN_COMPAT_030002.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-11 16:08:35 +01:00
Ian Campbell d814a69187 merge 2007-04-05 15:47:03 +01:00
Ian Campbell 93d1b5695a LINUX: PVonHVM: Fixes to build with kernels back to 2.6.5.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-05 15:38:09 +01:00
Ian Campbell 76de76e0f3 RFLAGS is in a known good state at start of day so no need to explicitly initialize.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-04 15:57:49 +01:00
Ian Campbell ea1303c633 [LINUX] Explcitly include linux/mutex.h in files which use mutexes, rather then
relying on an include via some other header.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-30 17:33:31 +01:00
Ian Campbell ea62867372 [LINUX] Make sure to initialiase the xen features bitmap before first use on x86_64.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-30 14:13:53 +01:00
Ian Campbell 630a9be9d0 [TOOLS] libxc: Fix x86 build.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-22 12:22:16 +00:00
Ian Campbell 27c451323a LINUX: x86_64: start_pfn should be initialised even when XENFEAT_auto_translated_physmap is set.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-21 08:51:51 +00:00
Ian Campbell 9ff1710953 merge 2007-03-20 14:34:53 +00:00
Ian Campbell 3e1b9525de [XEN] Implement faster int 0x80 handling for compat mode guests.
Using the GPF handler to spot the software interrupt and pass it back
to the guest increases the base syscall time by a factor of 2.7
compared with 32on32 using direct trap to ring 1. (0.3270->0.8680
microseconds, measured with lmbench lat_syscall).

Since the 64 bit IDT can only contain 64 bit segment selectors we
cannot trap directly to compat mode ring 1. However implementing a
dedicated 64 bit ring 0 trap handler allows us to avoid much of the
GPF handler overhead and reduces the overhead to 1.7 times
(0.3270->0.5497 microseconds).

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-20 14:33:15 +00:00
Ian Campbell 3b8a13159a [LINUX] Update crash-kernel-32-on-64.patch with more sensible version from -mm.
The previous version had side effects outside of the crash dump code.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-19 14:00:07 +00:00
Ian Campbell 6b0c303dfe [LINUX] Don't pin the initial page tables on x86_64 when XENFEAT_writable_page_tables.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-16 10:24:56 +00:00
Ian Campbell 8fafd2af0e [LINUX] 32on64 kdump: Allow a 32 bit kernel to read a 64 bit dump.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-14 16:58:30 +00:00
Ian Campbell a84c4f75e5 [LINUX] Kexec: Ensure that pages allocated for kexec have MFNs which are within
the required limits.

Previously we were lucky since most dom0 pages would be low enough but now Xen
is more aggressive in giving out higher MFNs when it can.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-14 16:39:32 +00:00
Ian Campbell d04477b602 [XEN] 32on64 kexec: Make the compat page table cover the first 4G of physical memory.
This gives the guest kernel more flexibility on where it places the control page.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-14 16:36:04 +00:00
Ian Campbell f4f4172c69 Update defconfigs for new XEN_COMPAT_300004 option.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-13 10:02:45 +00:00
Ian Campbell f63d9525d5 [LINUX] Fix typo so 3.0.4 compatability works.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-13 09:07:55 +00:00
Ian Campbell 75c73974d7 [BUILDER]: Initialize code segment selectors in virtual IDT to 0.
These should not be set until the guest kernel kernel configures an
entry point otherwise the null_trap_bounce() check gets confused.

This change was made to the old domain builder in 12455:3fa6635d04b9
but was lost in the transition to the new builder.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-08 15:35:28 +00:00
Ian Campbell 62c679ef7f [LINUX] CONFIG_X86_TSC is defined upstream in arch/i386/Kconfig.cpu so use that
instead of duplicating it in arch/i386/Kconfig.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-05 14:04:45 +00:00
Ian Campbell 8ca1a72e79 merge 2007-02-27 15:40:37 +00:00
Ian Campbell 0a650f1a63 [TOOLS] Add support for XEN_ELFNOTE_L1_MFN_VALID to readnotes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-27 15:39:08 +00:00
Ian Campbell 7b68919128 merge 2007-02-23 16:57:34 +00:00
Ian Campbell f380fac05a [LINUX] Purge include <linux/config.h>. It has been obsolete for some time now.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-23 16:56:45 +00:00
Ian Campbell 8c994baaf3 [PV-on-HVM] Fix gnttab_map to not run off the bottom of the gnttab space.
Cleanup a few warnings: reached end of void function and unused variables.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-23 16:56:42 +00:00
Ian Campbell 6f1113b5c5 [LIBELF] Prefer PT_NOTE segments to SHT_NOTE sections for ELF notes.
It's always an error to try to use sections on an executable; the
segments in the phdr are definitive.

Unfortunately we cannot drop SHT_NOTE support completely due to a
binutils bug which causes kernels to have the offset field of the
PT_NOTE phdr set to zero:

	http://sourceware.org/bugzilla/show_bug.cgi?id=594

This bug is present in binutils 2.17 although some distros have
backported the fix.

Therefore we simply prefer a PT_NOTE segment if we find one otherwise
we still use the SHT_NOTE section (and then the old __xen_guest
section).

Based on a patch from Jeremy Fitzhardinge.

Also added XEN_ELFNOTE_HV_START_LOW to readnotes.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-19 12:21:41 +00:00
Ian Campbell 193ca2e8bb [LINUX] Call ctrl_alt_del() to trigger a reboot so we benefit from the
generic infrastructure for cad_pid etc.

Add a ctrl_alt_del() implemenation to the PV on HVM compatibility
layer since ctrl_alt_del() is not exported on native kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-13 15:32:25 +00:00
Ian Campbell 8bc62853df [XEN] Fix typos in comment describing 32on64 memory layout
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-08 12:33:32 +00:00
Ian Campbell cc1b02ddd4 [XEN] kexec: add compatability shim for kexec in 32on64 mode.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-08 11:03:32 +00:00
Ian Campbell 9c47bd3d1e [XEN] kexec: Remove asm/kexec.h. Move the single inline function into
arch specific machine_kexec.c with the other arch specific kexec
functions.

IA64 already had a stub in both kexec.h and machine_kexec.c.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-08 11:03:29 +00:00
Ian Campbell e552fbffca merge 2007-02-01 16:55:45 +00:00
Ian Campbell 11247302ad [XEN] Extend the range returned by KEXEC_RANGE_MA_XEN to cover the
heap as well as code+data. This makes kdump work again after
13546:d86a96ca47a3

Also fix sizeof_note to correctly calculate the length of the name
field.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-01 16:07:22 +00:00
Ian Campbell 9c4ed974a4 [TOOLS] Remove a debug message which is spamming the logs during live
migration.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-01 10:21:42 +00:00
Ian Campbell 5d4e92412e [LINUX] netfront: Don't call netif_carrier_off until the device is
fuly allocated.

netif_carrier_off() causes events to be queued on the device so if we
subsequently abort the allocation (e.g. due to lack of grant entries)
then we crash trying to access the now invalid device.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-01 10:20:34 +00:00
Ian Campbell 05e5154038 [XEN] Fix perfc after 13756:56377f5ce588
64 bit guest handles can no longer be passed as parameters to
functions. Extract such parameters into a regular guest handle first.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 17:58:00 +00:00
Ian Campbell 680963aa78 [XEN] Fix dom/sysctl structure alignement.
Versions of gcc up to and including 3.3 appear to ignore
__attribute__((align(x))) when applied to typedefs or to members of
anonymous unions. Workaround this by explicitly aligning each
definition of a 64 bit guest handle.

Tidy up x86_64 compat entry.S a bit.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 16:54:21 +00:00
Ian Campbell 4ddfad6c0d [XEN] Fix build breakage with gcc 4.1.2.
domain_build.c: In function 'construct_dom' :
domain_build.c:874: warning: pointer targets in passing argument 1 of 'strlcpy' differ in signedness

Unfortunately adding a simple cast to (char *) doesn't work since that
confuses safe_strcpy so revert to using strlcpy directly.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 10:40:38 +00:00
Ian Campbell 8e84e3f524 [TOOLS] Fix foreign header build breakage.
Having both the Xen tree and the tools tree recurse into the foreign
headers directory causes headaches in parallel builds and when
building 32-bit tools + 64 bit Xen in the same tree.

Therefore we cause mk-symlinks to symlink in the foreign headers build
bits and generate a local version of the headers and checker tool.

Only libxc needs to do this since the other tools were actually
picking up the libxc version of the headers anyway so the mk-symlinks
calls can be removed from these components.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 10:25:12 +00:00
Ian Campbell ff0b3cef8d [XEN] Fix XENVER_capabilities hypercall.
Passing an array to a function turns it into a pointer which confuses
safe_strcat.

Also fix 54->64 typo in ia64 tree.

Thanks to Alex Williamson for pointing out the problem.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 10:11:26 +00:00
Ian Campbell 0a957ea75a Push the target to build foreign headers into tools and xen
directories.  This allows those directories to be built independently
without relying on the toplevel Makefile.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-30 13:46:48 +00:00
Ian Campbell 80777c3aae [LINUX] Force .data segment to be 4k aligned on i386.
Changeset 4e878f596c16 applied this change to the patches directory
but we also need to patch the sparse tree.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-29 13:22:21 +00:00
Ian Campbell 789f7fef04 [LINUX] Force .data segment to be 4k aligned on i386
by backporting git changeset c06cb8b1c4d25e5b4d7a2d7c2462619de1e0dbc4

This is required for kexec/kdump.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-23 09:31:32 +00:00
Ian Campbell e22738def9 [PV-on-HVM] Make PV drivers on HVM kernels work on older kernels after
update to 2.6.18.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-22 17:10:27 +00:00
Ian Campbell 20fb14b71f merge 2007-01-22 15:43:48 +00:00
Ian Campbell d50b445579 [XEN] Consolidate multiple defintions of ELFNOTE_* accessor macros
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-22 15:40:12 +00:00
Ian Campbell 2bdecd5382 [LINUX] Fix native build.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-22 15:31:27 +00:00
Ian Campbell 6e9515dab3 [XEN] Avoid void* arithmetic in kexec ELF note manipulations.
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-22 15:29:04 +00:00
Ian Campbell c59635dc0f [PATCH] kexec/kdump: allow zero start for crashkernel
Some architectures, notably ia64, can automatically place
the crash kernel into an appropriate place if the start
address for crashkernel is specified as zero or omitted.

E.g. crashkernel=256M or crashkernel=256M@0

While xen does not actually have support for ia64 kexec,
I am working on it. And in any case this change should be harmless.
Just a small bit of infastructure that will make things easier in the
future.

This should also be possible on x86, now relocatable kernels
are reloacatble on x86. So once xen moves up to using linux ~2.6.19
it would make sense to look into implementing this.

The patch does 3 things.

* Firstly, parse_crashkernel() is modified to allows the size and start elements of kexec_crash_area
  to be set to any value, including zero. Previously if either size or
  start were specified as zero, they would both end up as zero.

* Secondly, when kexec_get() is called, if either the size or start
  elements of kexec_crash_area are zero, then zero is passed
  back to the hypercall caller for both values.

  This gives the same behaviour as having parse_crashkernel() set
  size and start to zero if either of them are zero, but it allows
  architecture sepcific code called between the invocation of
  parse_crashkernel() and kexec_get() to modify start (and size if
  there was a reason). In particular, this allows the
  architecture specific code to find a good start point if 0 is
  specified.

* Lastly, it ads an additional check to the x86 setup code.
  As this code currently does not know how to deal with a
  0 start address, it doesn't reserve memory if start is 0.

  This is neccessary as previously if start was specified as zero,
  parse_crashkernel() would set size to zero, but that is
  no longer the case, so a stronger check is needed.

I would really appreciate it if this patch was merged,
as I don't believe it harms anything, and it does allow
a nice path for moving forwards.

Signed-off-by: Simon Horman <horms@verge.net.au>
2007-01-12 16:03:33 +00:00
Ian Campbell 5dd4f8ccd1 [XEN] Update comments in elfnote.h interface header.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-11 10:36:41 +00:00
Ian Campbell ca00403ece [PATCH] kexec/kdump: remove unnecessary incusion of asm/fixmap.h
I think this a legacy of an older revision of this code,
but asm/fixmap.h does not seem to be needed in
asm-x86/x86_32/kexec.h or asm-x86/x86_64/kexec.h

That is, neither of these incarntations of kexec.h seem
to do anything related to fixmap directly or indirectly.

Signed-off-by: Simon Horman <horms@verge.net.au>
2007-01-10 09:39:24 +00:00
Ian Campbell 0257938d11 [LINUX] Clarify comment in xen_machine_kexec_setup_resources().
Noticed by Horms.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-10 09:39:24 +00:00
Ian Campbell 319107a11b merge 2007-01-09 17:17:05 +00:00
Ian Campbell 0ae7229c66 [XEN] Kexec: Make some variables static.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-09 17:15:29 +00:00