Commit Graph
66 Commits
Author SHA1 Message Date
Samuel Thibault 4813ceb154 mini-os: Notify shutdown through weak function call instead of wake queue
To allow for more flexibility, this notifies domain shutdown through a
function rather than a wake queue, to let the application use a wake
queue only if it wishes.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
2013-01-09 08:43:53 +00:00
Samuel Thibault 62c21392fc mini-os: drop shutdown variables when CONFIG_XENBUS=n
Shutdown variables are meaningless when CONFIG_XENBUS=n since no
shutdown event will ever happen.  Better make sure that no code tries
to use it and never get the hoped shutdown event.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-12-06 09:22:31 +00:00
Daniel De Graaf c2115276c1 mini-os: shutdown_thread depends on xenbus
This fixes the build of the xenstore stub domain, which should never
be shut down and so does not need this feature.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
2012-11-30 21:51:17 +00:00
Samuel Thibault 5088edf797 [minios] Add xenbus shutdown control support
Add a thread watching the xenbus shutdown control path and notifies a
wait queue.

Add HYPERVISOR_shutdown convenient inline for minios shutdown.

Add proper shutdown to the minios test application.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
2012-11-30 09:32:27 +00:00
Daniel De Graaf 434a41d817 mini-os: make frontends and xenbus optional
This adds compile-time logic to disable certain frontends in mini-os:
 - pcifront is disabled by default, enabled for ioemu
 - blkfront, netfront, fbfront, kbdfront, consfront are enabled by default
 - xenbus is required for any frontend, and is enabled by default

If all frontends and xenbus are disabled, mini-os will run without
needing to communicate with xenstore, making it suitable to run the
xenstore daemon. The console frontend is not required for the initial
console, only consoles opened via openpt or ptmx.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-02-09 18:33:32 +00:00
Daniel De Graaf 8111e0c595 mini-os: Move test functions into test.c
While useful, these test functions should not be compiled into every
mini-os instance that we compile.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-02-09 18:33:31 +00:00
Ian Campbell 0d819a81ab mini-os: do not wait for pci backend in pcifront_scan
This blocks the main thread indefinitely if there is no PCI backend present in
xenstore.

Even in the case where there are passthrough devices configured libxl creates
the stubdom and waits for it to startup _before_ adding the backend. Since the
stub domains main thread is blocked before it can write the "running" state to
xenstore the toolstack eventually times out and kills everything.

There is already a separate pcifront thread which waits for the backend to
appear and calls init_pcifront at the appropriate time should a backend ever
appear.

Unfortunately I don't have any free test boxes with VT-d so I haven't been able
to test the cases where PCI deivces are passed through but I obviously have
tested that I can now start an HVM domain with stub qemu without PCI devices
passed through which I couldn't do before so this is an improvement. This stuff
is a bit like pushing the lump around the carpet :-/

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-12-09 12:01:17 +00:00
Tim Deegan afadd6ac31 tools: remove fs-front/fs-back
Its access controls are really not OK.  In particular, it's not good for
libxl, which stores per-VM config blobs in a directory that is exported
to all VMs.

This will break stub-qemu save/restore, which is the only user of
fs-front that I'm aware of, but:
 - It's currently broken anyway (fs-back isn't run by default and crashes
   if it is run manually); and
 - Stefano has a plan to plumb qemu save records through a dedicated
   console channel instead.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:13:44 +00:00
Keir Fraser d98d3c5208 mini-os: Do not use the same wait element twice
To enqueue the kbdfront thread on two separate wait queues, we need
two different wait elements.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-04-06 07:12:39 +01:00
Keir Fraser 643898034e stubdom/minios: re-structure headers
As part of making stubdom usable on NetBSD, it is necessary to
restructure the minios headers to avoid conflicts with NetBSD's
crossbuild toolchain.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-10-01 12:28:54 +01:00
Keir Fraser 0df54d9807 minios: switch to C99 integer types
This is a necessary step to make minios build on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 09:09:48 +01:00
Keir Fraser c12b25aa7d minios: support secondary guest consoles.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-17 07:22:18 +01:00
Keir Fraser be9ce82fc4 minios: general cleanup of mm.c
Major clean up of mm.c. Added comments, fixed coding style, more
sensible variable names, mark some local functions static etc.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-02 10:52:07 +00:00
Keir Fraser cea7a6cd7b Fix mini-os ia64 compilation
- Avoid nested function to avoid a trampoline.
- Do not link mini-os_app.o when it is empty.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-12-18 11:27:37 +00:00
Keir Fraser 16519cc5e8 mini-os: add stack walking debug
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 14:09:14 +01:00
Keir Fraser ce5c899f22 stubdom: use host's gcc
This makes stubdom use the host's gcc instead of downloading/compiling
binutils+gcc.  That requires a bunch of changes and even uncovered a
few bugs, but saves a lot of time.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-04 17:47:11 +01:00
Keir Fraser de4e084064 stubdom: PCI passthrough support via PV-PCI
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 13:54:20 +01:00
Keir Fraser c68ffdc4fa minios: add proper shutdown facilities
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 13:26:30 +01:00
Keir Fraser a58e7325d6 minios: clear FB content since _xmalloc may return non-zeroed memory
(in debug mode, notably).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-12 10:10:45 +01:00
Keir Fraser de239d043f pvfb/ioemu: transmit refresh interval advice from backend to frontend
which permits the frontend to avoid useless polls.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-12 10:10:03 +01:00
Keir Fraser 5539f61f5b stubdom: make use of PVFB resize event
which with the offset support also permits to expose the VGA vram and
non-shared vram throught PVFB at the same time, switching between both
as appropriate.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-16 10:21:08 +01:00
Keir Fraser aae7fe3fa4 stubdom: add asynchronous disk flush support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-05 22:20:25 +01:00
Keir Fraser 886fcd1040 mini-os: Fix build error.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-03-26 14:04:21 +00:00
Keir Fraser b44e418cc1 minios: get VBD CD/removable/RO info
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-20 17:48:02 +00:00
Keir Fraser df4e524d8d minios: Automatically set IP from XenStore information
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-19 16:20:14 +00:00
Keir Fraser fbf9167cb2 stubdom: Fix compilation after abs_z to rel_z change
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-28 14:09:47 +00:00
Keir Fraser 26a1b308f3 minios: add PVFB support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-26 14:47:23 +00:00
Keir Fraser e8c1abd6e7 minios: POSIX fixes
Fixes some functions which are POSIX.  Also make them ifndef HAVE_LIBC.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 14:20:22 +00:00
Keir Fraser c6c6a0890d minios: Fix x86_32 compilation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 11:19:40 +00:00
Keir Fraser 2a18de7599 minios: add blkfront testing
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 09:46:33 +00:00
Keir Fraser afb13d4890 minios: make time interface POSIX
timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz
argument.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-21 11:20:27 +00:00
Keir Fraser be33e2333a Add FS backend/frontend drivers (frontend in minios only).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2008-01-18 13:33:37 +00:00
Keir Fraser bdd22133fc minios: support several netfronts
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 15:50:48 +00:00
kfraser@localhost.localdomain 2cf1159751 [MINIOS] Implement a network frontend driver.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
2007-01-12 15:18:24 +00:00
kfraser@localhost.localdomain 1d57fa7227 [MINIOS] Switched to new interface for HYPERVISOR_sched_op().
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-11-27 10:23:19 +00:00
kfraser@localhost.localdomain 8f97ebc65a [MINIOS] Delay enabling event delivery at start of day.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-20 10:33:35 +00:00
kfraser@localhost.localdomain 7d58e87410 [MINIOS] Move initialisation of events (masking event channels)
earlier during the boot process. Otherwise 64bit guests would
sometimes crash.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-17 09:16:27 +00:00
kfraser@localhost.localdomain 4aad88265b [MINIOS] Add timer support.
Based on an original patch by Robert Kaiser.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-15 09:33:01 +00:00
kfraser@localhost.localdomain ff4b9c2134 [MINIOS] Added a new file arc/x86/setup.c and moved some x86 specific
initialization stuff from kernel.c there. Two new functions are added
to handle this.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-09-23 14:00:38 +01:00
kfraser@localhost.localdomain cbffd93cad [MINIOS] Mapping page frames on demand added to the memory management.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-07-05 14:29:57 +01:00
kfraser@localhost.localdomain c5f5756de8 [MINIOS] XenBus tests disabled in MiniOS. Xend bug induced
by write to device/vif/0. 
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-07-05 11:27:25 +01:00
kaf24@firebug.cl.cam.ac.uk 0708c1f9a0 [MINI-OS] Applications that provide their own app_main need not run the xenbus test.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
2006-06-13 16:07:16 +01:00
kaf24@firebug.cl.cam.ac.uk 0306a3dcf8 [MINIOS] PAE support.
Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
2006-05-19 16:52:52 +01:00
kaf24@firebug.cl.cam.ac.uk 395112e684 Allow linking of mini-os with application-specific object code.
From: Jacob Gorm Hansen
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-15 16:32:09 +01:00
kaf24@firebug.cl.cam.ac.uk f08246e197 Fix x86/64 version of Mini-OS. It encompasses the following:
a) 64-bit switch_to scheduler macro (by Aravindh Puthiyaparambil)
b) implements 64-bit hypervisor_callback
c) fixes thread creation issues (thread_starter used to perform 
initialisation)

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-05-02 09:12:39 +01:00
kaf24@firebug.cl.cam.ac.uk c7b965a01c Fix mini-os xenbus.
From: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-24 10:47:48 +01:00
kaf24@firebug.cl.cam.ac.uk a54b2baac2 Implement console for Mini-os and also fix 2 bugs:
a) in initialising new page table frames
b) in initialising idle thread.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-03-15 20:25:50 +01:00
kaf24@firebug.cl.cam.ac.uk 7fc4533b32 Merge in the newer Xenbus implementation from Linux to the Mini-OS. The new
version compiles and starts up, but I'm not really sure how to test the new
xenbus implementation.

* Added unbind_evtchn
* Copied parts of the Linux spinlock implementation to make the changes to
  xenbus compared to Linux smaller. Also added a dummy rwsem implementation.
* Updated the xenbus-files

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
2005-12-08 15:24:02 +01:00
kaf24@firebug.cl.cam.ac.uk ca068fad60 I've created a patch to get the mini-os to compile in Xen-unstable. The patch
is pretty big, but this is mostly because I've replaced hypervisor.h with the
hypercalls.h header file from Linux (which seems easier to maintain
anyway). I've ignored X86_64.

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
2005-10-27 17:43:29 +01:00
kaf24@firebug.cl.cam.ac.uk cdb8b09f6b Xenbus implementation ported from Linux to Mini-os, simple thread support introduced
to simplify the porting. 64 bit version of Mini-os now compiles, but does not work
because of the pagetables and some bits of scheduler not being written.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2005-09-09 09:24:25 +00:00