aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/kernel.c
Commit message (Collapse)AuthorAgeFilesLines
* mini-os: fix various memory leaks in various locationsMatthew Daley2013-09-211-2/+5
| | | | | | | | | | Coverity-ID: 1055827 Coverity-ID: 1055828 Coverity-ID: 1055829 Coverity-ID: 1055830 Coverity-ID: 1055831 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os: Notify shutdown through weak function call instead of wake queueSamuel Thibault2013-01-091-10/+8
| | | | | | | | | 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>
* mini-os: drop shutdown variables when CONFIG_XENBUS=nSamuel Thibault2012-12-061-0/+2
| | | | | | | | | 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>
* mini-os: shutdown_thread depends on xenbusDaniel De Graaf2012-11-301-0/+4
| | | | | | | | 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>
* [minios] Add xenbus shutdown control supportSamuel Thibault2012-11-301-0/+36
| | | | | | | | | | | | 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>
* mini-os: make frontends and xenbus optionalDaniel De Graaf2012-02-091-4/+0
| | | | | | | | | | | | | | | | | 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>
* mini-os: Move test functions into test.cDaniel De Graaf2012-02-091-414/+0
| | | | | | | | | | 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>
* mini-os: do not wait for pci backend in pcifront_scanIan Campbell2011-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tools: remove fs-front/fs-backTim Deegan2011-01-111-7/+0
| | | | | | | | | | | | | | | | 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>
* mini-os: Do not use the same wait element twiceKeir Fraser2010-04-061-1/+2
| | | | | | | 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>
* stubdom/minios: re-structure headersKeir Fraser2009-10-011-16/+16
| | | | | | | | | 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>
* minios: switch to C99 integer typesKeir Fraser2009-07-151-1/+1
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* minios: support secondary guest consoles.Keir Fraser2009-06-171-1/+1
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: general cleanup of mm.cKeir Fraser2009-03-021-8/+10
| | | | | | | | 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>
* Fix mini-os ia64 compilationKeir Fraser2008-12-181-11/+11
| | | | | | | - 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>
* mini-os: add stack walking debugKeir Fraser2008-07-181-0/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: use host's gccKeir Fraser2008-07-041-0/+2
| | | | | | | | 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>
* stubdom: PCI passthrough support via PV-PCIKeir Fraser2008-07-021-0/+26
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add proper shutdown facilitiesKeir Fraser2008-06-091-2/+46
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: clear FB content since _xmalloc may return non-zeroed memoryKeir Fraser2008-05-121-5/+2
| | | | | | (in debug mode, notably). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* pvfb/ioemu: transmit refresh interval advice from backend to frontendKeir Fraser2008-05-121-22/+43
| | | | | | which permits the frontend to avoid useless polls. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: make use of PVFB resize eventKeir Fraser2008-04-161-1/+12
| | | | | | | | 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>
* stubdom: add asynchronous disk flush supportKeir Fraser2008-04-051-21/+18
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* mini-os: Fix build error.Keir Fraser2008-03-261-1/+1
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* minios: get VBD CD/removable/RO infoKeir Fraser2008-03-201-1/+10
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Automatically set IP from XenStore informationKeir Fraser2008-03-191-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: Fix compilation after abs_z to rel_z changeKeir Fraser2008-02-281-3/+3
| | | | | From: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: add PVFB supportKeir Fraser2008-02-261-0/+149
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: POSIX fixesKeir Fraser2008-01-221-14/+1
| | | | | | Fixes some functions which are POSIX. Also make them ifndef HAVE_LIBC. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix x86_32 compilationKeir Fraser2008-01-221-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add blkfront testingKeir Fraser2008-01-221-0/+176
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: make time interface POSIXKeir Fraser2008-01-211-1/+1
| | | | | | | timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz argument. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add FS backend/frontend drivers (frontend in minios only).Keir Fraser2008-01-181-0/+7
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* minios: support several netfrontsKeir Fraser2008-01-171-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* [MINIOS] Implement a network frontend driver.kfraser@localhost.localdomain2007-01-121-2/+9
| | | | Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
* [MINIOS] Switched to new interface for HYPERVISOR_sched_op().kfraser@localhost.localdomain2006-11-271-1/+5
| | | | Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* [MINIOS] Delay enabling event delivery at start of day.kfraser@localhost.localdomain2006-11-201-3/+3
| | | | Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [MINIOS] Move initialisation of events (masking event channels)kfraser@localhost.localdomain2006-11-171-3/+3
| | | | | | | earlier during the boot process. Otherwise 64bit guests would sometimes crash. Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [MINIOS] Add timer support.kfraser@localhost.localdomain2006-11-151-0/+14
| | | | | | Based on an original patch by Robert Kaiser. Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [MINIOS] Added a new file arc/x86/setup.c and moved some x86 specifickfraser@localhost.localdomain2006-09-231-65/+4
| | | | | | | initialization stuff from kernel.c there. Two new functions are added to handle this. Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* [MINIOS] Mapping page frames on demand added to the memory management.kfraser@localhost.localdomain2006-07-051-1/+5
| | | | | | Signed-off-by: Steven Smith <sos22@cam.ac.uk> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [MINIOS] XenBus tests disabled in MiniOS. Xend bug inducedkfraser@localhost.localdomain2006-07-051-1/+2
| | | | | | by write to device/vif/0. Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [MINI-OS] Applications that provide their own app_main need not run the ↵kaf24@firebug.cl.cam.ac.uk2006-06-131-13/+10
| | | | | | | xenbus test. Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
* [MINIOS] PAE support.kaf24@firebug.cl.cam.ac.uk2006-05-191-1/+10
| | | | | Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
* Allow linking of mini-os with application-specific object code.kaf24@firebug.cl.cam.ac.uk2006-05-151-1/+10
| | | | | | From: Jacob Gorm Hansen Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix x86/64 version of Mini-OS. It encompasses the following:kaf24@firebug.cl.cam.ac.uk2006-05-021-1/+25
| | | | | | | | | | 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>
* Fix mini-os xenbus.kaf24@firebug.cl.cam.ac.uk2006-03-241-18/+23
| | | | | | | From: Grzegorz Milos <gm281@cam.ac.uk> Signed-off-by: Keir Fraser <keir@xensource.com>
* Implement console for Mini-os and also fix 2 bugs:kaf24@firebug.cl.cam.ac.uk2006-03-151-2/+8
| | | | | | | | | a) in initialising new page table frames b) in initialising idle thread. Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* Merge in the newer Xenbus implementation from Linux to the Mini-OS. The newkaf24@firebug.cl.cam.ac.uk2005-12-081-0/+1
| | | | | | | | | | | | | | 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>
* I've created a patch to get the mini-os to compile in Xen-unstable. The patchkaf24@firebug.cl.cam.ac.uk2005-10-271-2/+2
| | | | | | | | | | 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>