Commit Graph
142 Commits
Author SHA1 Message Date
Keir Fraser 0243b256d6 Add stubdomain support. See stubdom/README for usage details.
- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
  arch_limits.h so as to permit getting them from there without
  pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
  library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
  disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
  tpm and other details.  A few hacks are needed:
  - Align ide and scsi buffers at least on sector size to permit
  direct transmission to the block backend. While we are at it, just
  page-align it to possibly save a segment. Also, limit the scsi
  buffer size because of limitations of the block paravirtualization
  protocol.
  - Allocate big tables dynamically rather that letting them go to
  bss: when Mini-OS gets installed in memory, bss is not lazily
  allocated, and doing so during Mini-OS is unnecessarily trick while
  we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
  Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-12 14:35:39 +00:00
Keir Fraser 9ea04252b6 minios: Fix blkfront grant map leak
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-07 09:16:20 +00:00
Keir Fraser eac4b98d11 minios: Fix ia64 build.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-01-28 12:58:57 +00:00
Keir Fraser c69b2fa1c4 minios: permit blkfront to write from mapped memory
by adding a virtual_to_mfn macro

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 14:20:37 +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 d6398adb03 minios: Add align support to _xmalloc().
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 09:45:54 +00:00
Keir Fraser 0464a12749 minios: add lwIP 1.3.0 support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-21 11:20:52 +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 04383f9c0f minios: support COW for a zero page
Permits to support sparse data.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-18 16:20:13 +00:00
Keir Fraser 4eb8e8dc04 minios: extend map_frames into being able to map a series of
contiguous frames, or the same frame several times, aligned, from
another domain, with specific protection, and with potential
failures.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-18 15:22:42 +00:00
Keir Fraser c1ea56152a minios: set text and rodata read-only, free unused pages 0 and 1
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-18 15:22:17 +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 9d220744e6 minios: add blkfront
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 16:41:46 +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
Keir Fraser 08d9a2612a minios: add xenbus token support and separate watch event queues
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 15:20:02 +00:00
Keir Fraser f3b3ce4ae7 minios: add realloc
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
2008-01-17 15:06:30 +00:00
Keir Fraser 22e39d084e minios: make stack size configurable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2008-01-17 14:41:44 +00:00
Keir Fraser e2edfe6c73 minios: add wait_event_deadline
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
2008-01-17 14:41:12 +00:00
Keir Fraser 69ca1c28b4 minios: add trydown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:55 +00:00
Keir Fraser d962772049 minios: use ASSERT for BUG_ON
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:23 +00:00
Keir Fraser 41888d5a7e minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:40:06 +00:00
Keir Fraser cb4baf13a2 minios: Add noreturn attribute to do_exit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-17 14:39:45 +00:00
Keir Fraser c56fe82b7d minios: Optimize IA64's get_current()
Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2008-01-17 14:39:21 +00:00
Keir Fraser 26aa688655 [Mini-OS] Make sure schedule() is called safely
If a thread tries to sleep from a callback or with callbacks disabled,
Mini-OS will completely lock, so make sure this never happens.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-24 13:29:20 +00:00
Keir Fraser 984c5a39ec [Mini-OS] Make wake_up callback-safe
As it may compete with event handlers waking wait queues, wake_up
needs to be callback-safe.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-24 13:27:59 +00:00
Keir Fraser 00e209e059 [Mini-OS] Fix init_waitqueue_entry
Fix initialization of thread_list in init_waitqueue_entry().

Signed-off-by: Samuel Thibault <samuel.thibault@xensource.com>
2007-11-24 13:27:32 +00:00
Keir Fraser e8c2d5c38a [Mini-OS] Add init_SEMAPHORE
Add init_SEMAPHORE() to dynamically initialize semaphores.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-24 13:27:08 +00:00
Keir Fraser 59091f2d52 [Mini-OS] Make semaphores callback-safe
One may want to use semaphores in event handlers to wake threads
waiting for a resource, so semaphores then need to be callback-safe.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-24 13:26:39 +00:00
Keir Fraser 36cb94956a [Mini-OS] Add strrchr()
Add strrchr(), useful e.g. for grabbing the last part of a xenbus
path.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:42:44 +00:00
Keir Fraser 604132c3d5 [Mini-OS] Add ENOTSUP
Add missing ENOTSUP by defining it to EOPNOTSUPP like in Linux.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:42:23 +00:00
Keir Fraser 63c4c4eabe [Mini-OS] Move _ctype into a module
Move the _ctype array into its own module, instead of having it
defined in a header.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:41:54 +00:00
Keir Fraser 9ebc5c7ea6 [Mini-OS] Make bind_virq return the port
Make bind_virq() return the port bound to the irq, which is useful
e.g. for masking/unmasking it.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:25:59 +00:00
Keir Fraser fd2f80c255 [Mini-OS] Fix x86 arch_switch_thread
Fix x86 arch_switch_thread by making it pure assembly.
There were missing general register clobbers for x86_64, and BP should
theorically be clobbered too, but gcc does not believe that, so the
only simple safe solution is to use pure assembly.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:23:28 +00:00
Keir Fraser a222af2ef1 [Mini-OS] Optimize get_current()
Let gcc perform the computation with SP itself, leading to yet better
code.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-11-23 16:23:03 +00:00
Keir Fraser d06d3cfb8d minios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe.
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-24 14:35:19 +01:00
Keir Fraser c6553c4cde minios: Fix get_current() inline asm.
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 09:30:20 +01:00
Alex Williamson a423930e0d [IA64][MINIOS] PKR support
- adds optimization feature for region 7 identity mapping
- adds protection keys to region 5 and region 7 addresses,
  may be used for testing the hypervisor protection key support

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-07-30 18:14:29 -06:00
Alex Williamson e57246bd3a [MINIOS][IA64] mini-os without linux-optimization in hypervisor
Make mini-os runnable again without the special linux optimization for the
identity mapping in the hypervisor.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-06-26 16:24:41 -06:00
awilliam@xenbuild2.aw ebdb5845be merge with xen-unstable.hg 2007-03-20 15:19:38 -06:00
awilliam@xenbuild2.aw 048f2c148c [IA64][MINIOS] Fixed some big-endian bugs and add HYPERVISOR_suspend
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-03-20 09:51:45 -06:00
kaf24@firebug.cl.cam.ac.uk f55d16fa21 minios: Various small fixes.
- Fixed type of variables in hypervisor.c.
- Fixed not removing a waiter from watch_queue.
- Make wait_for_watch() global accessible.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-03-19 09:34:42 +00:00
awilliam@xenbuild2.aw 5340bb29c5 [IA64][MINIOS] cleanup ia64_boot_paramP and add ARCH_LDFLAGS
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-03-12 09:43:48 -06:00
kfraser@localhost.localdomain 5fca0f03a3 Create P2M map during Mini-OS boot (fixes 'xm dump-core').
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2007-03-01 12:23:44 +00:00
awilliam@xenbuild2.aw 8a9e0cc712 [IA64][MINIOS] Port of mini-os to ia64
ia64 specific parts of mini-os.

Minimal config:

# Kernel image file.
kernel = "mini-os.gz"
# Initial memory allocation (in megabytes) for the new domain.
memory = 64
# A name for your domain.
name = "Mini-OS"

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-02-15 13:13:36 -07:00
kfraser@localhost.localdomain 4e8586dfa3 [MINIOS] More cleanups for the ia64 port.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-01-19 15:09:39 +00:00
kfraser@localhost.localdomain a352d8d69f [MINIOS] Added domctl and sysctl hypercalls to the
architecture-specific header files. Also increased the
__XEN_INTERFACE_VERSION__ to 0x00030205.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2007-01-19 12:11:52 +00:00
kfraser@localhost.localdomain b58029254d [MINIOS] Update __XEN_INTERFACE_VERSION__
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 15:27:09 +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