(/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>
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>
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>
* 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>
(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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
directories. This allows those directories to be built independently
without relying on the toplevel Makefile.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
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>
by backporting git changeset c06cb8b1c4d25e5b4d7a2d7c2462619de1e0dbc4
This is required for kexec/kdump.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
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>
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>