Commit Graph
24 Commits
Author SHA1 Message Date
Keir Fraser 7203b89c15 mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"
Jeremy Fitzhardinge (jeremy@goop.org) reports that this fixes HVM+stubdom.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-04 12:15:28 +01:00
Keir Fraser 15d5739ea9 mini-os: Fix crash on frontend shutdown failures
Do not free frontend resources if some error happened, since the
backend may not have finished properly restarting in such case.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-04-07 08:16:15 +01:00
Keir Fraser 42e3a21b11 mini-os: Fix frontend shutdown wait loop
minios frontends must wait for backends to be shut down and
reinitialized before freeing resources.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-04-07 08:15:55 +01:00
Keir Fraser 453c7b6442 mini-os: Fix xenbus initialisation
This fixes xenbus initialization of blkfront, netfront and pcifront
by uniformizing with fbfront: after writing parameters, set state to
initialised, then wait for backend to switch to connect state, and
then only read its parameter and switch to the connect state.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-04-06 07:13:19 +01:00
Keir Fraser 453414b284 mini-os: Fix memory leaks in blkfront, netfront, pcifront, etc.
The return value of Xenbus routines xenbus_transaction_start(),
xenbus_printf(), xenbus_transaction_end(), etc.  is a pointer of error
message.  This pointer should be passed to free() to release the
allocated memory when it is no longer needed.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2009-12-14 09:51:07 +00:00
Keir Fraser 8ed87184f7 minios: Fix fb/kbd initialization
When allocating kbdfront and fbfront structures, we should zero them
since we do not initialize all fields.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-11-23 07:22:28 +00:00
Keir Fraser 375f53964b minios: Fix xenbus_unwatch_path calls
In a lot of places in MiniOS frontends, xenbus_watch_path_token is
used instead of xenbus_watch_path to get more precise wake ups.  To
free those, xenbus_unwatch_path_token has to be used instead of
xenbus_unwatch_path, else the unwatch operation will fail.  This fixes
spurious watch events left by pv-grub.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-11-23 07:21:58 +00: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 02e1301f01 minios: fix free_fbfront
When a stubdom is destroyed, fbfront tries to unbind the evtchn
twice.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-27 10:39:10 +01:00
Keir Fraser 8323478d5b minios: refactor xenbus state machine
Implement xenbus_wait_for_state_change and xenbus_switch_state and
change the various frontends to use the two functions and do proper
error checking.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-03 11: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 1e25c34bdc minios: proper frees are now handled, so drop the FIXME comment
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-01 14:50:35 +01:00
Keir Fraser a2c7db64f5 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>
2008-06-18 09:36:47 +01:00
Keir Fraser 0a9b2d786b stubdom: fix using minios frontends directly when libc is actived
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:32:50 +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 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 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 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 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 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 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 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 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 26a1b308f3 minios: add PVFB support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-26 14:47:23 +00:00