aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom
Commit message (Collapse)AuthorAgeFilesLines
...
* mini-os: create app-specific configurationDaniel De Graaf2012-02-095-4/+8
| | | | | | | | | | | | | | Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios code, create CONFIG_ items for features and use application-specific configuration files to enable or disable the features. The configuration flags are currently added to the compiler command line; as the number of flags grows this may need to move to a header. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* stubdom: update README to reference xl configuration syntaxIan Campbell2012-02-091-12/+13
| | | | | | | Remove reference to fsback -- it was removed some time ago. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Rename ioemu-dir as qemu-xen-traditional-dir2012-01-241-4/+4
| | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* stubdom: allow to build with older tool chainJan Beulich2011-12-131-1/+1
| | | | | | | | | | | GNU make prior to 3.81 doesn't support $(realpath ...). This fixes a regression introduced in 23368:0f670f5146c8 (the option tested via cc-option-add got interpreted as the argument of the -I compiler option, as its intended argument was blank, and hence the compiler was falsely considered to support *any* option in the pciutils sub-tree). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* pv-grub: Fix for incorrect dom->p2m_host[] list initializationDaniel Kiper2011-04-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Introduction of Linux Kernel git commit ceefccc93932b920a8ec6f35f596db05202a12fe (x86: default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB) revealed deeply hidden bug in pv-grub. During kernel load stage dom->p2m_host[] list has been incorrectly initialized. At the beginning of kernel load stage dom->p2m_host[] list is populated with current PFN->MFN layout. Later during memory allocation (memory is allocated page by page in kexec_allocate()) page order is changed to establish linear layout in new domain. It is done by exchanging subsequent MFNs with newly allocated MFNs. dom->p2m_host[] list is indexed by currently requested PFN (it is incremented from 0) and PFN of newly allocated paged. If PFN of newly allocated page is less than currently requested PFN then earlier allocated MFN is overwritten which leads to domain crash later. This patch corrects that issue. If PFN of newly allocated page is less then currently requested PFN then relevant PFN/MFN pair is properly calculated and usual exchange occurs later. Signed-off-by: Daniel Kiper <dkiper@net-space.pl> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-175-20/+19
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* stubdom: Fix stubdom-dm using "grep" improperlyJohn Weekes2011-01-111-1/+1
| | | | | | | | | | | | | | | | | stubdom-dm uses "grep" on "xm list" output to determine whether it is already running. The existing behavior is to use "grep $domname-dm" but this will result in a false-positive in the case of another domU running whose name ends with the full new name; for instance, if "abctest-dm" is running, a new "test-dm" will spin forever, waiting for it the end. Any easy fix is to have it use "grep -w" instead of "grep", searching for the whole word only. It also might be worth considering a switch to "xl list" from "xm list", here and in other places. Signed-off-by: John Weekes <lists.xen@nuclearfallout.net> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Reapply 61c0c52a8c6c "qemu-xen: build adjustments"Ian Jackson2010-11-231-2/+12
| | | | | | | | The changeset qemu-xen: build adjustments to support out-of-tree builds works after all. Sorry for the noise. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert 61c0c52a8c6c "qemu-xen: build adjustments"Ian Jackson2010-11-231-12/+2
| | | | | | | | It appears that the changeset qemu-xen: build adjustments to support out-of-tree builds broke the build. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* qemu-xen: build adjustments to support out-of-tree buildsJan Beulich2010-11-231-2/+12
| | | | | | | | | | | | | | | | QEMU by itself can be built outside of its source directory. With the qemu repository being separate from the hypervisor/tools one it seems to make sense to make use of this feature, but doing so requires a couple of adjustments to the Xen changes to it. Basically, if CONFIG_QEMU is found to indicate an existing directory, this directory will be used rather than cloning the git repo into the build tree. [ This changeset is the xen-unstable part of the patch but also includes the QEMU_TAG update to pull in the qemu part. -iwj ] Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* stubdom: allow building with read-only sourcesJan Beulich2010-11-191-1/+2
| | | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: caml-stubdom: fix "red zone" bugPatrick Colp2010-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the AMD64 ABI, the 128-byte area below %rsp is reserved for scratch space and should not be used by signal, interrupt, or exception handlers. However, Mini-OS does not adhere to this interface. As a result, the -mno-red-zone flag must be provided to gcc in order to force code to be compiled without this assumption. In the case of the c-stubdom or the ioemu stubdom, Makefile configuration and flags are inherited from Xen, which includes this flag. However, in the case of the ocaml stubdom, since an independent ocaml version is pulled and compiled, with its own make system in place, this flag is not present. As a default optimisation (no optimisation flags specified), gcc generates function header code that uses mov instead of push (to save a few instructions). However, with the 128-byte scratch space assumption in place, registers are moved onto the stack *before* %rsp is updated. This results in cases where when a function is being called, *after* the first mov <foo>, <offset>(%rsp) but *before* the %rsp update, sub <bar>, %rsp, if an interrupt is fired, then the stack will be clobbered (as Mini-OS uses the application stack for its stack, pushing registers onto the stack on entry and popping them off on exit). This patch fixes this issue by passing the -mno-red-zone flag to the ocaml configure script in the stubdom Makefile. Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/ocaml: Fix caml-stubdom make line to depend on the ocaml cross compilerPatrick Colp2010-09-211-1/+1
| | | | | | | | | | | The provided sample caml stubdom needs to use the ocaml cross compiler, but if it hasn't been downloaded and compiled, then it won't find it and the build will fail. This makes caml-stubdom depend on the cross compiler, so it will automatically get built before the stubdom. Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: Add -fno-exceptions to list of possibly-supported CFLAGS for embedded ↵Keir Fraser2010-07-251-3/+1
| | | | | | targets. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stubdom: correct handling DESTDIR during buildIan Campbell2010-07-211-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stubdom/Makefile expects components to install themselves to stubdom/$(CROSS_ROOT) and passes the appropriate configure and make variables to make this happen. However if the top-level build uses DESTDIR then this not only effects the installation targets in stubdom/Makefile but is also propagated to the individual components' build causing them to install into an unexpected location and breaking the build. In other words "make -C stubdom DESTDIR=/tmp/a-dest-dir" fails due to missing headers because they had been installed into /tmp/a-dest-dir instead of stubdom/$(CROSS_ROOT). The existing attempt to clear DESTDIR for the newlib install phase was insufficient. Define a CROSS_MAKE variable which should be used to recurse into the cross compiled components and which clears DESTDIR. Also move the definition of the genpath target to after the first "all" target so that the default target is all. I have confirmed that with this fix only the Xen build system outputs end up in /tmp/a-dest-dir. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-6/+6
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* stubdom/newlib: Provide correct names for time.h timezone variablesKeir Fraser2010-05-281-0/+2
| | | | | | | | | | Newlib unaccountably defines _daylight, _timezone and _tzname, rather than daylight, timezone and tzname. The latter are specified in SuSv3. So do a global search and replace as part of our newlib patching :-(. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* pv-grub: fix boot crash when no fb is availableKeir Fraser2010-04-061-6/+4
| | | | | | | | When no fb is available, init_fbfront will return, so the local semaphore for synchronization with the kbd thread would get dropped. Using a global static semaphore instead fixes this. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* PV-GRUB: Fix gzip support and iso support on x86_64Keir Fraser2010-03-081-0/+67
| | | | Signed-off-by: Samuel Thibault <sthibault@debian.org>
* Fix Makefile targets that generate several files at onceKeir Fraser2010-03-051-1/+3
| | | | | | | | | | | | | | | | | | | | In a few places in the tree the Makefiles have constructs like this: one_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) This is wrong, because make will run _two copies_ of the same command at once. This generally causes races and hard-to-reproduce build failures. Notably, `make -j4' at the top level will build stubdom libxc twice simultaneously! In this patch we replace the occurrences of this construct with the correct idiom: one_file: another_file another_file: $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* [PV-GRUB DOC] Add details to PV-GRUB documentationKeir Fraser2010-03-051-2/+15
| | | | | | | | | Add a couple of documentation details about PV-GRUB support - the menu.lst content can be passed as a ramdisk. - virtual partitions are not supported. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* domain builder: multiboot-like module supportKeir Fraser2009-12-114-11/+79
| | | | | | | | | This defines how multiple modules can be passed to a domain by packing them together into a "multiboot module" in a way very similar to the multiboot standard. An SIF_ flag is added to announce such package. This also adds a packing implementation to PV-GRUB. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* pcifront: fix multiple initialization bugKeir Fraser2009-11-231-3/+1
| | | | | | | | | Now that we have pcifront_watches to dynamically initialize pcifront we don't need a call to init_pcifront in pcilib and pcifront_scan anymore; we should just wait for the frontend to connect to the backend instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: Fix up pciutils.patchKeir Fraser2009-11-131-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* pcifront: implement dynamic connections and disconnectionsKeir Fraser2009-11-131-20/+7
| | | | | | | | | | this patch implements dynamic connections and disconnections in pcifront. This feature is required to properly support pci hotplug, because when no pci devices are assigned to a guest, xend will remove the pci backend altogether. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: make stubdom-dm exit properlyKeir Fraser2009-10-291-6/+5
| | | | | | | | | | | | The built-in bash command wait should be able to take a pid argument and just wait for the specified process to die, but it currently has a bug and what actually does is waiting for the death of all the children. For this reason the stubdom-dm script doesn't exit properly after stubdom destruction. This patch solves the issue spawning only one child, removing the sleep subprocess workaround that was used to create a usable stdin for "xm console" and replacing it with a fifo. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xend: destroy stubdoms synchronouslyKeir Fraser2009-10-151-6/+2
| | | | | | | | | This patch makes the destruction of stubdoms a synchronous event, therefore it is no longer possible to run out of memory when rebooting a guest because the stubdom of the old guest is always destroyed before the creation of the new guest. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom pcilib: define endianness for miniosKeir Fraser2009-10-141-0/+14
| | | | | | Include endian.h for MiniOS. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: Backport fix for SIZE_MAX from newlib 1.17.0Keir Fraser2009-08-252-0/+17
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stubdoms: parse bridge informationsKeir Fraser2009-08-161-1/+8
| | | | | | | | | | Currently the stubdom-dm script doesn't read the bridge of a vif on xenstore, therefore all the vifs assigned to the stubdom always belong to default bridge. This patch changes the behavior reading the bridge from xenstore and adding the bridge to the stubdom config file. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* libxc: Include private Xen headers in stubdom libxc buildKeir Fraser2009-08-111-0/+1
| | | | | | | | | The headers libelf.h and elfstructs.h were removed from xen/include/public in 19011:7df072566b8c. But this broke the stubdom build because parts of libxc depend on them. This patch adds $(XEN_ROOT)/xen/include/xen to the stubdom -I path. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* stubdom: update README as no reason to specify absolute pathsKeir Fraser2009-07-231-4/+4
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: make -> $(MAKE)Keir Fraser2009-07-151-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: don't leak include dir on distcleanKeir Fraser2009-07-151-0/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* minios: switch to C99 integer typesKeir Fraser2009-07-151-10/+10
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: fix stubdom-dm error pathKeir Fraser2009-07-141-2/+2
| | | | | | Exit the shell and not a subshell. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: Install and use stubdompath.shKeir Fraser2009-07-132-8/+8
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom: Fix stubdom-dm after c/s 19818Keir Fraser2009-07-101-1/+2
| | | | | | | | | | | 19818 added the following line to stubdom-dm: . ./stubdompath.sh and replaced many paths with variables. However the path to stubdompath.sh is obviously wrong and stubdompath.sh is nowhere to be found anyway. For the moment I am dropping . ./stubdompath.sh and hardcoding the values of the variables. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: fix a race that affects live migration with stubdomsKeir Fraser2009-07-081-1/+1
| | | | | | | | | | | This patch fixes a race during live migration with stubdoms: right after the stubdom dies the configuration file of the VM is removed by stubdom-dm but, in case of a live migration, the configuration file could be the one of the new VM in the process of being created. Removing the config file before destroying the stubdom is enough to solve the race. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: use XENFIRMWAREDIRKeir Fraser2009-06-251-4/+4
| | | | | | | Attached patch installs ioemu-stubdom into XENFIRMWAREDIR analogous to what we do with hvmloader. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Get rid of hardcoded pathes for stubdom and hotplug scriptsKeir Fraser2009-06-232-17/+24
| | | | | | | | | | | | | | | | | | - Have the buid system generate a file which exports the install paths for the hotplug scripts and stubdom / stubdom-dm - Move file generation code from tools/python/Makefile into a gmake macro in Config.mk to avoid maintenance of three duplicates each with its own tweaks and bugs - Export gmake variables into ioemu as shell variables for upcoming ioemu patches - Do above as a gmake macro to avoid maintenance of several duplicates - Adjust hotplug scripts to find the right xen binaries from the install directory - Adjust stubdom-dm to use the install directories Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdoms: qemu monitor supportKeir Fraser2009-06-181-0/+5
| | | | | | | | | | Add support for the qemu monitor in a stubdom, the same way the emulated serial support was added few days ago. The stubdom exports the monitor as a pty and minios opens a console frontend; qemu in dom0 provides the correspondent backend for this additional pv console that happens to be the qemu monitor. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: support secondary guest consoles.Keir Fraser2009-06-171-2/+2
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xend: support multiple consoles per domainKeir Fraser2009-06-161-0/+5
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: 'file' based disk sharingKeir Fraser2009-05-261-4/+0
| | | | | | | | | | Allow 'file' based disks, that are blkback based disks, to be shared between the guest domain and the stubdom. It does so exploiting the same exception introduced in the previous patch "stubdoms phy disks sharing". Now we can remove the hack in stubdom-dm that forces "file" disks to be opened using blktap instead of blkback. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: Rebuild the ocaml runtime libraries with the options neededKeir Fraser2009-05-193-7/+61
| | | | | | | | | if they are to be linked with object files created by ocamlc and the minios kernel. This is needed to build stubdoms written in ocaml. Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
* ioemu: Export PREFIX variable to ioemu build environment.Keir Fraser2009-05-191-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* stubdom docs: Update to reflect the new way of configuring stubdom domains.Keir Fraser2009-05-111-58/+2
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdoms: handle cdrom devices in the config fileKeir Fraser2009-04-231-1/+3
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: drop lwip supportKeir Fraser2009-04-231-15/+2
| | | | | | | | | | | | | | | | | | | | Network support is still provided the same way: using the tap interface, created in qemu using netfront. The lwip stack is still available to avoid additional compilation issues. However the stubdom is not going to have its own vif anymore, this means that the only vnc server supported is the one in dom0. You can still enable the vnc server in a stubdom at compile time, if you want so. Probably the most important change caused by this patch to xen users is that you don't have to specify two vif in the stubdom config file anymore, but just one: -vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34'] +vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34'] Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>