]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/log
people/liuw/libxenctrl-split/mini-os.git
16 years agominios: do not systematically free the page under shared info, as the
Keir Fraser [Fri, 20 Jun 2008 16:44:50 +0000 (17:44 +0100)]
minios: do not systematically free the page under shared info, as the
guest booted by PV-GRUB will need it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: fix gnttab allocation boundary
Keir Fraser [Wed, 18 Jun 2008 08:38:11 +0000 (09:38 +0100)]
minios: fix gnttab allocation boundary

The gnttab_sem is already fed during initialization's put_free_entry
loop.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agoAdd PV-GRUB
Keir Fraser [Wed, 18 Jun 2008 08:36:47 +0000 (09:36 +0100)]
Add PV-GRUB

This fetches GRUB1 sources, applies the {graphical, print function,
save default, and ext3_256byte} patches from debian, and applies a
patch to make it work on x86_64 and port it to Mini-OS.  By using
libxc, PV-GRUB can then "kexec" the loaded kernel from inside the
domain itself, hence permitting to avoid the security-concerned
pygrub.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: fix declaration after code
Keir Fraser [Wed, 18 Jun 2008 08:35:06 +0000 (09:35 +0100)]
minios: fix declaration after code

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: fix using minios frontends directly when libc is actived
Keir Fraser [Wed, 18 Jun 2008 08:32:50 +0000 (09:32 +0100)]
stubdom: fix using minios frontends directly when libc is actived

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios,stubdom: Add OBJ_DIR parameter to compile outside sources,
Keir Fraser [Tue, 17 Jun 2008 08:36:25 +0000 (09:36 +0100)]
minios,stubdom: Add OBJ_DIR parameter to compile outside sources,
which permits to easily compile mini-os in various flavors. Also clean
some parts of stubdom build.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios can cope with >4G CR3 since it never uses it
Keir Fraser [Thu, 12 Jun 2008 08:24:35 +0000 (09:24 +0100)]
minios can cope with >4G CR3 since it never uses it

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: Fix >4GB machine addresses
Keir Fraser [Tue, 10 Jun 2008 15:59:24 +0000 (16:59 +0100)]
minios: Fix >4GB machine addresses

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: add proper shutdown facilities
Keir Fraser [Mon, 9 Jun 2008 12:26:30 +0000 (13:26 +0100)]
minios: add proper shutdown facilities

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: fetch command line from start_info instead of xenstore
Keir Fraser [Mon, 9 Jun 2008 12:26:05 +0000 (13:26 +0100)]
stubdom: fetch command line from start_info instead of xenstore

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: permit compilation without lwip
Keir Fraser [Mon, 9 Jun 2008 08:46:32 +0000 (09:46 +0100)]
stubdom: permit compilation without lwip

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: use inlines instead of macros for bswap*
Keir Fraser [Mon, 9 Jun 2008 08:46:16 +0000 (09:46 +0100)]
minios: use inlines instead of macros for bswap*

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: add a blkfront synchronous interface
Keir Fraser [Thu, 5 Jun 2008 12:03:31 +0000 (13:03 +0100)]
minios: add a blkfront synchronous interface

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: Add console reading support
Keir Fraser [Tue, 3 Jun 2008 08:32:50 +0000 (09:32 +0100)]
stubdom: Add console reading support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: Save main_thread value by moving it out from app_bss which
Keir Fraser [Wed, 28 May 2008 08:31:04 +0000 (09:31 +0100)]
stubdom: Save main_thread value by moving it out from app_bss which
gets cleared.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: make the build more generic by moving as many stubdom parts
Keir Fraser [Wed, 28 May 2008 08:30:48 +0000 (09:30 +0100)]
stubdom: make the build more generic by moving as many stubdom parts
into stubdom/ as possible.  That also permits to build all of
ioemu, c and caml stubdoms at the same time.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: We do not need to pin the page tables, as they implicitly get
Keir Fraser [Tue, 27 May 2008 12:03:05 +0000 (13:03 +0100)]
minios: We do not need to pin the page tables, as they implicitly get
pinned when we point the permanent page directory to them.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agominios: Fix width of shifted 1
Keir Fraser [Sat, 24 May 2008 08:24:25 +0000 (09:24 +0100)]
minios: Fix width of shifted 1

Shifting 1 more that 32 bits requires 1 to be long-typed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: fix constructors/destructors in 64bit mode
Keir Fraser [Fri, 23 May 2008 08:35:57 +0000 (09:35 +0100)]
stubdom: fix constructors/destructors in 64bit mode

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: fix and clean pthread minimal support
Keir Fraser [Fri, 23 May 2008 08:35:43 +0000 (09:35 +0100)]
stubdom: fix and clean pthread minimal support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: complete libxc support
Keir Fraser [Fri, 23 May 2008 08:35:23 +0000 (09:35 +0100)]
stubdom: complete libxc support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agostubdom: support constructors and destructors
Keir Fraser [Thu, 22 May 2008 14:09:08 +0000 (15:09 +0100)]
stubdom: support constructors and destructors

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: free fbfront resources on error/shutdown
Keir Fraser [Tue, 13 May 2008 08:47:52 +0000 (09:47 +0100)]
minios: free fbfront resources on error/shutdown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: free blkfront resources on error/shutdown
Keir Fraser [Mon, 12 May 2008 10:01:21 +0000 (11:01 +0100)]
minios: free blkfront resources on error/shutdown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: free netfront resources on error/shutdown
Keir Fraser [Mon, 12 May 2008 09:36:27 +0000 (10:36 +0100)]
minios: free netfront resources on error/shutdown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: let lwIP check TCP sums as they are now correct.
Keir Fraser [Mon, 12 May 2008 09:11:23 +0000 (10:11 +0100)]
stubdom: let lwIP check TCP sums as they are now correct.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: clear FB content since _xmalloc may return non-zeroed memory
Keir Fraser [Mon, 12 May 2008 09:10:45 +0000 (10:10 +0100)]
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>
17 years agopvfb/ioemu: transmit refresh interval advice from backend to frontend
Keir Fraser [Mon, 12 May 2008 09:10:03 +0000 (10:10 +0100)]
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>
17 years agoi386: Remove non-PAE hypervisor build target.
Keir Fraser [Thu, 8 May 2008 13:32:11 +0000 (14:32 +0100)]
i386: Remove non-PAE hypervisor build target.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agominios: fix and enforce block_domain atomicity
Keir Fraser [Thu, 8 May 2008 12:14:27 +0000 (13:14 +0100)]
minios: fix and enforce block_domain atomicity

To ensure that the timer event is not lost, block_domain requires that
event delivery is disabled.  SCHEDOP_block re-enables them, so for
coherency (and fixing a bug actually), we should re-disable them
after. Also, make sure that the caller disabled them.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: in non-x86 case, use wmb to enforce ordering between
Keir Fraser [Thu, 8 May 2008 10:55:13 +0000 (11:55 +0100)]
minios: in non-x86 case, use wmb to enforce ordering between
evtchn_upcall_pending and evtchn_pending_sel stores.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: clear the event before calling the handler since (especially
Keir Fraser [Thu, 8 May 2008 10:53:39 +0000 (11:53 +0100)]
minios: clear the event before calling the handler since (especially
in the SMP case) the handler may make another domain send an event
again, and that must not be lost.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: fix port selection shifts
Keir Fraser [Thu, 8 May 2008 10:27:22 +0000 (11:27 +0100)]
minios: fix port selection shifts

Event selectors span unsigned longs, whose size is not always 32 bits.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: drop volatile qualifier from some status variables
Keir Fraser [Tue, 6 May 2008 15:35:44 +0000 (16:35 +0100)]
minios: drop volatile qualifier from some status variables
since we already use memory barriers as approriate to prevent
concurrent access with event handlers.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: fix thread safety of xenbus watches by requiring callers to
Keir Fraser [Tue, 6 May 2008 12:34:52 +0000 (13:34 +0100)]
minios: fix thread safety of xenbus watches by requiring callers to
provide their own queue of events, because else we can not dispatch to
watchers running in parallel.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: end watch of FS backend state value
Keir Fraser [Fri, 2 May 2008 13:35:27 +0000 (14:35 +0100)]
minios: end watch of FS backend state value

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: make use of PVFB resize event
Keir Fraser [Wed, 16 Apr 2008 09:21:08 +0000 (10:21 +0100)]
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>
17 years agominios: simplify schedule()
Keir Fraser [Wed, 16 Apr 2008 09:06:34 +0000 (10:06 +0100)]
minios: simplify schedule()
- Merge the search, wakeup, and timeout loops.
- Avoid unnecessarily switching to the idle thread.
- Perform stack release _after_ we get out of it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: call do_hypervisor_callback directly from force_evtchn_callback
Keir Fraser [Wed, 16 Apr 2008 09:06:19 +0000 (10:06 +0100)]
minios: call do_hypervisor_callback directly from force_evtchn_callback
instead of unnecessarily going through the hypervisor.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: sparse application's BSS by linking it separately first, put
Keir Fraser [Wed, 16 Apr 2008 09:05:57 +0000 (10:05 +0100)]
stubdom: sparse application's BSS by linking it separately first, put
markers at its beginning and end, and then link with mini-os.
That permits to stick a bit more to upstream qemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add asynchronous disk flush support
Keir Fraser [Sat, 5 Apr 2008 21:20:25 +0000 (22:20 +0100)]
stubdom: add asynchronous disk flush support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Fix xfree() bug.
Keir Fraser [Wed, 2 Apr 2008 14:32:13 +0000 (15:32 +0100)]
minios: Fix xfree() bug.

It has to check first if the memory to free is so big as to be freed
directly by free_pages. mini-os domains crash without this patch if
vfb is misconfigured.

Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
17 years agomini-os: Fix build error.
Keir Fraser [Wed, 26 Mar 2008 14:04:21 +0000 (14:04 +0000)]
mini-os: Fix build error.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agominios: blkfront_aio_poll may reenter
Keir Fraser [Wed, 26 Mar 2008 13:15:00 +0000 (13:15 +0000)]
minios: blkfront_aio_poll may reenter
if the callback calls blkfront_sync for instance.
In such a case, we would see responses and hence release grants
several times. We need to be more synchronous and stop when we detect
that we have re-entered.
This fixes HVM restore with stubdomains.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: more assertions
Keir Fraser [Wed, 26 Mar 2008 13:13:50 +0000 (13:13 +0000)]
minios: more assertions
- assert that we never allocate or free the same grant twice
- assert that network packets do not exceed a page
- assert that incoming network event IDs make sense

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: free dropped lwip packets
Keir Fraser [Tue, 25 Mar 2008 17:56:09 +0000 (17:56 +0000)]
mini-os: free dropped lwip packets
When lwIP can not accept a packet, it is up to us to free it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix x86_64 irq stack size
Keir Fraser [Tue, 25 Mar 2008 17:55:39 +0000 (17:55 +0000)]
stubdom: fix x86_64 irq stack size
by making it use STACK_SIZE like other places.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: get VBD CD/removable/RO info
Keir Fraser [Thu, 20 Mar 2008 17:48:02 +0000 (17:48 +0000)]
minios: get VBD CD/removable/RO info

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add C example target
Keir Fraser [Wed, 19 Mar 2008 16:21:39 +0000 (16:21 +0000)]
stubdom: add C example target

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix compilation
Keir Fraser [Wed, 19 Mar 2008 16:21:01 +0000 (16:21 +0000)]
stubdom: fix compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: update README
Keir Fraser [Wed, 19 Mar 2008 16:20:44 +0000 (16:20 +0000)]
minios: update README

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Automatically set IP from XenStore information
Keir Fraser [Wed, 19 Mar 2008 16:20:14 +0000 (16:20 +0000)]
minios: Automatically set IP from XenStore information

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: avoid putting trailing \0 in xenstore
Keir Fraser [Tue, 18 Mar 2008 11:40:30 +0000 (11:40 +0000)]
minios: avoid putting trailing \0 in xenstore

xenstore expects to get the exact amount of data, without
the trailing \0.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Fix lost events
Keir Fraser [Tue, 18 Mar 2008 11:29:18 +0000 (11:29 +0000)]
minios: Fix lost events

evtchn_bind_interdomain used to clear any already pending event before
binding a handler, because else the handler may be called before it is
ready. That however leads to missed events, which I had to workaround
for the HVM case.

This changes the semantics of bind_evtchn, and thus of all the
event channel binding functions (bind_virq, evtchn_alloc_unbound,
evtchn_bind_interdomain) into not unmasking the event itself, hence
letting the caller initialize properly before unmasking the port (e.g.
record the port number in an appropriate place).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add support for reading the command line from the config
Keir Fraser [Tue, 18 Mar 2008 11:27:05 +0000 (11:27 +0000)]
stubdom: add support for reading the command line from the config
file, and merge the dmargs with it in the case of qemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: Add support for select() call with NULL arguments.
Keir Fraser [Tue, 18 Mar 2008 11:26:43 +0000 (11:26 +0000)]
stubdom: Add support for select() call with NULL arguments.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoStubdom: add support for file creation.
Keir Fraser [Tue, 18 Mar 2008 11:26:21 +0000 (11:26 +0000)]
Stubdom: add support for file creation.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: fbfront shouldn't send unsolicited updates
Keir Fraser [Mon, 3 Mar 2008 11:04:53 +0000 (11:04 +0000)]
mini-os: fbfront shouldn't send unsolicited updates

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: Fix compilation after abs_z to rel_z change
Keir Fraser [Thu, 28 Feb 2008 14:09:47 +0000 (14:09 +0000)]
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>
17 years agostubdom: use PVFB so as to e.g. permit SDL display
Keir Fraser [Thu, 28 Feb 2008 10:21:21 +0000 (10:21 +0000)]
stubdom: use PVFB so as to e.g. permit SDL display

This adds support in ioemu for PVFB frontend as stubdomain display.
This permits for instance to use SDL in dom0 to perform the eventual
display.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: have xenbus_printf return the error returned by xenbus_write
Keir Fraser [Wed, 27 Feb 2008 13:11:33 +0000 (13:11 +0000)]
minios: have xenbus_printf return the error returned by xenbus_write
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix x86_32 compilation by __moddi3 from FreeBSD
Keir Fraser [Tue, 26 Feb 2008 15:11:07 +0000 (15:11 +0000)]
stubdom: fix x86_32 compilation by __moddi3 from FreeBSD
(like has been done previously for umoddi3 etc.)

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: add PVFB support
Keir Fraser [Tue, 26 Feb 2008 14:47:23 +0000 (14:47 +0000)]
minios: add PVFB support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: drop unused xenblk_rxidx function
Keir Fraser [Thu, 14 Feb 2008 09:24:35 +0000 (09:24 +0000)]
minios: drop unused xenblk_rxidx function
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: optimize block io completion polling by not polling all the
Keir Fraser [Thu, 14 Feb 2008 09:23:14 +0000 (09:23 +0000)]
stubdom: optimize block io completion polling by not polling all the
time; only when some requests have completed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoMini-OS: Fix alignment in maybe_split()
Keir Fraser [Thu, 14 Feb 2008 09:22:33 +0000 (09:22 +0000)]
Mini-OS: Fix alignment in maybe_split()
Needed on ia64, speeds up on x86.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoAdd stubdomain support. See stubdom/README for usage details.
Keir Fraser [Tue, 12 Feb 2008 14:35:39 +0000 (14:35 +0000)]
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>
17 years agominios: Fix blkfront grant map leak
Keir Fraser [Thu, 7 Feb 2008 09:16:20 +0000 (09:16 +0000)]
minios: Fix blkfront grant map leak

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Support net/block backend in domU
Keir Fraser [Thu, 7 Feb 2008 09:15:59 +0000 (09:15 +0000)]
minios: Support net/block backend in domU

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Fix bug when blkfront reading into zero-mapped buffer
Keir Fraser [Tue, 29 Jan 2008 15:18:27 +0000 (15:18 +0000)]
minios: Fix bug when blkfront reading into zero-mapped buffer
by just poking the page.
No need to use virtual_to_mfn() for the ring since that is a real page.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Fix ia64 build.
Keir Fraser [Mon, 28 Jan 2008 12:58:57 +0000 (12:58 +0000)]
minios: Fix ia64 build.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agominios: permit blkfront to write from mapped memory
Keir Fraser [Wed, 23 Jan 2008 18:05:27 +0000 (18:05 +0000)]
minios: permit blkfront to write from mapped memory
Missing call to virtual_to_mfn

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: make allocation of page tables for ondemand mapping lazy
Keir Fraser [Wed, 23 Jan 2008 11:20:01 +0000 (11:20 +0000)]
minios: make allocation of page tables for ondemand mapping lazy

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: permit blkfront to write from mapped memory
Keir Fraser [Tue, 22 Jan 2008 14:20:37 +0000 (14:20 +0000)]
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>
17 years agominios: POSIX fixes
Keir Fraser [Tue, 22 Jan 2008 14:20:22 +0000 (14:20 +0000)]
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>
17 years agominios: fix case when _text is not 0
Keir Fraser [Tue, 22 Jan 2008 11:35:26 +0000 (11:35 +0000)]
minios: fix case when _text is not 0

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Fix x86_32 compilation
Keir Fraser [Tue, 22 Jan 2008 11:19:40 +0000 (11:19 +0000)]
minios: Fix x86_32 compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: add blkfront testing
Keir Fraser [Tue, 22 Jan 2008 09:46:33 +0000 (09:46 +0000)]
minios: add blkfront testing

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios, blkfront: set default block path.
Keir Fraser [Tue, 22 Jan 2008 09:46:15 +0000 (09:46 +0000)]
minios, blkfront: set default block path.
remove unnecessary path head stripping.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Add align support to _xmalloc().
Keir Fraser [Tue, 22 Jan 2008 09:45:54 +0000 (09:45 +0000)]
minios: Add align support to _xmalloc().

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: add lwIP 1.3.0 support
Keir Fraser [Mon, 21 Jan 2008 11:20:52 +0000 (11:20 +0000)]
minios: add lwIP 1.3.0 support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: make time interface POSIX
Keir Fraser [Mon, 21 Jan 2008 11:20:27 +0000 (11:20 +0000)]
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>
17 years agominios: do not exit if FS backend not found.
Keir Fraser [Fri, 18 Jan 2008 16:20:47 +0000 (16:20 +0000)]
minios: do not exit if FS backend not found.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: support COW for a zero page
Keir Fraser [Fri, 18 Jan 2008 16:20:13 +0000 (16:20 +0000)]
minios: support COW for a zero page
Permits to support sparse data.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: extend map_frames into being able to map a series of
Keir Fraser [Fri, 18 Jan 2008 15:22:42 +0000 (15:22 +0000)]
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>
17 years agominios: set text and rodata read-only, free unused pages 0 and 1
Keir Fraser [Fri, 18 Jan 2008 15:22:17 +0000 (15:22 +0000)]
minios: set text and rodata read-only, free unused pages 0 and 1
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoAdd FS backend/frontend drivers (frontend in minios only).
Keir Fraser [Fri, 18 Jan 2008 13:33:37 +0000 (13:33 +0000)]
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>
17 years agominios: add blkfront
Keir Fraser [Thu, 17 Jan 2008 16:41:46 +0000 (16:41 +0000)]
minios: add blkfront

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: support several netfronts
Keir Fraser [Thu, 17 Jan 2008 15:50:48 +0000 (15:50 +0000)]
minios: support several netfronts

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: add xenbus token support and separate watch event queues
Keir Fraser [Thu, 17 Jan 2008 15:20:02 +0000 (15:20 +0000)]
minios: add xenbus token support and separate watch event queues

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: add realloc
Keir Fraser [Thu, 17 Jan 2008 15:06:30 +0000 (15:06 +0000)]
minios: add realloc

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
17 years agominios: make stack size configurable
Keir Fraser [Thu, 17 Jan 2008 14:41:44 +0000 (14:41 +0000)]
minios: make stack size configurable

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
17 years agominios: add wait_event_deadline
Keir Fraser [Thu, 17 Jan 2008 14:41:12 +0000 (14:41 +0000)]
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>
17 years agominios: add trydown
Keir Fraser [Thu, 17 Jan 2008 14:40:55 +0000 (14:40 +0000)]
minios: add trydown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: use ASSERT for BUG_ON
Keir Fraser [Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)]
minios: use ASSERT for BUG_ON

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Add exit_thread prototype. Make sure exit_thread doesn't
Keir Fraser [Thu, 17 Jan 2008 14:40:06 +0000 (14:40 +0000)]
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Add noreturn attribute to do_exit
Keir Fraser [Thu, 17 Jan 2008 14:39:45 +0000 (14:39 +0000)]
minios: Add noreturn attribute to do_exit

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: Optimize IA64's get_current()
Keir Fraser [Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)]
minios: Optimize IA64's get_current()

Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
17 years agoIn C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
Keir Fraser [Fri, 28 Dec 2007 15:23:28 +0000 (15:23 +0000)]
In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
said to be undefined if the value to be put is n can't fit.  I guess
we can safely consider that the same applies to printf.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
17 years agomini-os: No -fpic when building for x86.
Keir Fraser [Tue, 4 Dec 2007 10:11:54 +0000 (10:11 +0000)]
mini-os: No -fpic when building for x86.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>