Commit Graph
240 Commits
Author SHA1 Message Date
Keir Fraser e49b738ccf stubdom: Add console reading support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-03 09:32:50 +01:00
Keir Fraser ddbd09069c 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>
2008-05-28 09:31:04 +01:00
Keir Fraser f9b4231a67 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>
2008-05-28 09:30:48 +01:00
Keir Fraser 28d2d07fde 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>
2008-05-27 13:03:05 +01:00
Keir Fraser b9920f5849 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>
2008-05-24 09:24:25 +01:00
Keir Fraser d18d24fd1e stubdom: fix constructors/destructors in 64bit mode
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:57 +01:00
Keir Fraser 700f9d1bcf stubdom: fix and clean pthread minimal support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:43 +01:00
Keir Fraser 8543c562dd stubdom: complete libxc support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:23 +01:00
Keir Fraser cf6e75bd08 stubdom: support constructors and destructors
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:08 +01:00
Keir Fraser 1c1827becb minios: free fbfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-13 09:47:52 +01:00
Keir Fraser c64bf46b1f minios: free blkfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-12 11:01:21 +01:00
Keir Fraser 8e3629845c minios: free netfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-12 10:36:27 +01:00
Keir Fraser 107fe015a1 stubdom: let lwIP check TCP sums as they are now correct.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-12 10:11:23 +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 84d54d5d8b i386: Remove non-PAE hypervisor build target.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 14:32:11 +01:00
Keir Fraser 5991224aff 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>
2008-05-08 13:14:27 +01:00
Keir Fraser aec0c76f22 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>
2008-05-08 11:55:13 +01:00
Keir Fraser b585b4dfa7 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>
2008-05-08 11:53:39 +01:00
Keir Fraser f095afd3f6 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>
2008-05-08 11:27:22 +01:00
Keir Fraser de6ab86c40 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>
2008-05-06 16:35:44 +01:00
Keir Fraser cc489fb3c4 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>
2008-05-06 13:34:52 +01:00
Keir Fraser 3238785d35 minios: end watch of FS backend state value
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-02 14:35:27 +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 724e4fd51e 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>
2008-04-16 10:06:34 +01:00
Keir Fraser 796b445b00 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>
2008-04-16 10:06:19 +01:00
Keir Fraser 28baa78877 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>
2008-04-16 10:05:57 +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 30860b6fe5 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>
2008-04-02 15:32:13 +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 d3ca7ebecc 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>
2008-03-26 13:15:00 +00:00
Keir Fraser aecea1aa65 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>
2008-03-26 13:13:50 +00:00
Keir Fraser 587ab24ee4 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>
2008-03-25 17:56:09 +00:00
Keir Fraser 798780cf11 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>
2008-03-25 17:55:39 +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 98c2b2bd1e stubdom: add C example target
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-19 16:21:39 +00:00
Keir Fraser ac23908a0d stubdom: fix compilation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-19 16:21:01 +00:00
Keir Fraser 37c5428f8d minios: update README
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-19 16:20:44 +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 985bf498a5 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>
2008-03-18 11:40:30 +00:00
Keir Fraser b9d1950675 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>
2008-03-18 11:29:18 +00:00
Keir Fraser 37a1d36134 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>
2008-03-18 11:27:05 +00:00
Keir Fraser b1c30105ce stubdom: Add support for select() call with NULL arguments.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-18 11:26:43 +00:00
Keir Fraser 1add612bf5 Stubdom: add support for file creation.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-18 11:26:21 +00:00
Keir Fraser d1f88c5884 mini-os: fbfront shouldn't send unsolicited updates
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-03 11:04:53 +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 e8fcc3571a 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>
2008-02-28 10:21:21 +00:00
Keir Fraser 93d764b009 minios: have xenbus_printf return the error returned by xenbus_write
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-27 13:11:33 +00:00
Keir Fraser 480b3a06d1 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>
2008-02-26 15:11:07 +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