Commit Graph
388 Commits
Author SHA1 Message Date
Keir Fraser 70ad90095b fs-front: cope with a missing fs-backend
Obviously save\restore is not going to work if fs-backend is missing,
but at least the stubdom will be able to work correctly in all the
other cases.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-07-23 08:57:02 +01:00
Keir Fraser 0df54d9807 minios: switch to C99 integer types
This is a necessary step to make minios build on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 09:09:48 +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 1a965f0e72 minios: add few missing constants in limits.h
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-25 14:30:00 +01:00
Keir Fraser 8f771d00bf minios: Use posix_openpt() rather than non-standard openpty().
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-18 10:19:25 +01:00
Keir Fraser c12b25aa7d minios: support secondary guest consoles.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-17 07:22:18 +01:00
Keir Fraser 6f1d3ce238 Introduce mechanism to check standard conformance of headers
While pretty simplistic, it appears to serve the purpose at the moment
(i.e. it spotted two places where a GNU extension was used withou
proper preprocessor conditionals). The "simplistic" here includes that
the checking gets only done for native builds, and ia64 gets excluded
due to its arch-specific header intentionally (for whatever reason)
checking that anonymous struct/unions can be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-06-17 07:21:03 +01:00
Keir Fraser 83fd7b933e minios: Introduce BSD license COPYING file
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-04 10:35:03 +01:00
Keir Fraser eedc9ebb14 minios: Clean up and remove Linux remnants from x86_64.S
Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-03 18:27:05 +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 16ae66bb59 minios: Remove Linux attribution for mktime() as it's not true since c/s 19638.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-01 14:39:25 +01:00
Keir Fraser 7f1f6b865b minios: implement ffs, ffsl and ffsll.
The first function is compiled only in case minios is compiled without
newlib, since newlib already provides an implementation for ffs.
On the other hand ffsl and ffsll are always compiled because newlib
misses those functions.
This patch also provides an implementation for __ffsti2 and __ffsdi2
because they are needed by gcc in order to successfully link ffsll.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-28 09:41:59 +01:00
Keir Fraser faeb2db71c pvgrub: few lines in shutdown_blkfront were removed by mistake.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-26 10:05:27 +01:00
Keir Fraser 2cda4bd1e1 minios: replace mktime implementation
In the efforts to clarify MiniOS license it came to my attention that
few portions of MiniOS were taken from other GPL projects, one of them
is the mktime implementation. This patch replaces the current GPL
licensed mktime implementation with a different and BSD licensed
version.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-26 09:54:53 +01:00
Keir Fraser 0f688ae304 minios: Fix blkfront driver when sector_size != 512
The first and last sector as well as the sector number of the request
is expressed in 512 bytes units, independently from the real sector
size.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-26 09:49:19 +01:00
Keir Fraser 0e57a92cc3 minios: Implement some extra lib functions for ocaml xenstored stubdom
We could stub them out as unsupported, but we may as well implement
them as they are very simple.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
2009-05-19 14:15:43 +01:00
Keir Fraser c1861bc6f8 minios: Define extra stub functions to allow build of ocaml xenstored stubdom
These are referenced by the libs that ocamlopt links xenstored to, but
ought not actually get called.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
2009-05-19 14:14:41 +01:00
Keir Fraser 82ed447498 stubdom: drop lwip support
Network support is still provided the same way: using the tap
interface, created in qemu using netfront.
The lwip stack is still available to avoid additional compilation
issues.
However the stubdom is not going to have its own vif anymore,
this means that the only vnc server supported is the one in dom0.
You can still enable the vnc server in a stubdom at compile time, if
you want so.

Probably the most important change caused by this patch to xen users
is that you don't have to specify two vif in the stubdom config file
anymore, but just one:

-vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
+vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34']

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-04-23 12:19:14 +01:00
Keir Fraser da27f6d8b7 stubdoms: generate stubdom config file
This patch removes the need for a second configuration file for
stubdoms: it is going to be automatically generated by the script
stubdom-dm using command line options and xenstore to find any needed
information.
The configuration script will be placed under /etc/xen/stubdoms and
automatically removed when the domain is destroyed.
The only change needed in xend is not to write on xenstore sdl,
opengl and serial command line options for qemu, because stubdoms do
not support them.
It is safe to remove those two options from xenstore because qemu does
not use xenstore to read commans line options.
Finally this patch fixes blkfront disconnections from backends and
display and xauthority variables for pv guests.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-04-23 10:08:04 +01:00
Keir Fraser 0c75fee1bc minios: fix a memory corruption in blkfront
The corruption happens every time we pass a sector aligned buffer
(instead of a page aligned buffer) to blkfront_aio. To trigger the COW
we have to write at least a byte to each page of the buffer, but we
must be careful not to overwrite useful content.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-04-14 11:21:45 +01:00
Keir Fraser 39a239fc04 minios: Extend struct blkfront_aiocb.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-31 12:06:57 +01:00
Keir Fraser 1ecaba192c minios: _chk_fail and _chk canaries for minios and newlib
Add __stack_chk_fail to mini-os and __sprintf_chk __fprintf_chk to
newlib, to cope with ocaml runtimes compiled with -fstack-protector.

From: "George S. Coker, II" <gscoker@alpha.ncsc.mil>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-31 11:36:11 +01:00
Keir Fraser b8fb8d5f77 minios: allow to allocate machine contiguous pages
This is a port of XenLinux xen_alloc_contig_memory() to mini-os. A
sufficiently privileged mini-os guest can exchange a small number of
its pages with machine contiguous pages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2009-03-13 07:37:24 +00:00
Keir Fraser 6db42837ce minios: Fix 18874 memory clipping
Fix 18874's memory clipping: there are three page-sized holes between
direct mapping, demand mapping, heap pages and the end of memory.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-09 08:43:11 +00:00
Keir Fraser be9ce82fc4 minios: general cleanup of mm.c
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>
2009-03-02 10:52:07 +00:00
Keir Fraser 6767a71fdd minios: cleanup events.c
Don't throw away hypercall error codes. They might be useful. Also
some minor coding style cleanups.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-02 10:51:34 +00:00
Keir Fraser 6976b9a7c2 minios: add ioremap/iounmap
Add ioremap and iounmap functions to minios. Also move some unmapping
code from and clean up mem_test.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-02 10:50:59 +00:00
Keir Fraser f58273a90c minios: fix p2m on x86
15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86.

Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
2009-02-09 14:22:07 +00:00
Keir Fraser cea7a6cd7b Fix mini-os ia64 compilation
- 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>
2008-12-18 11:27:37 +00:00
Keir Fraser c32ea44041 mini-os: Make utility function get_self_id() in fs-front.c public.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-12-16 12:00:25 +00:00
Keir Fraser 7e60fdf5b1 minios: Clip memory not usable by Mini-OS (above 1GB)
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-12-05 13:06:57 +00:00
Isaku Yamahata 772cdea233 merge with xen-unstable.hg 2008-11-25 14:21:24 +09:00
dietmar.hahn@fujitsu-siemens.com 6e3fe157f0 [IA64] Remove the useless big endian stuff.
This patch removes all the useless big endian stuff from the mini-os.
Before there was an effort to support big endian for PV-guest.
But the big endian support was never gotten into the common parts of
the mini-os so it makes no sense to have this only in the ia64
specific sources. And as there is no open source big endian os and
porting our BS2000 os to ia64 was stopped, nobody wants that stuff
in the common minos.
So this looks ugly then and remove the big endian stuff.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2008-11-18 10:55:51 +01:00
dietmar.hahn@fujitsu-siemens.com 21b91e54b1 [IA64] minios: Fix ctor and dtor sections.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2008-11-17 09:27:02 +01:00
dietmar.hahn@fujitsu-siemens.com 377d0a03ff [IA64] minios: Clean up the hypervisor interface
move all hypervisor calls to xencomm

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2008-11-17 09:19:45 +01:00
Keir Fraser a1ffd2d114 minios: add a barebone net/if.h
net/if.h is a standard header but unfortunately lwip doesn't provide
it for any target but linux. Therefore I am adding a net/if.h, with an
empty implementation of the declared functions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-11-11 11:03:58 +00:00
Keir Fraser aa4eca06c4 minios: Define __INSIDE_MINIOS__ rather than __MINIOS__
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-10-29 12:04:38 +00:00
Keir Fraser 7a0db9514b minios: do not expose #define current to applications
Currently the minios headers do this:
 #define current get_current()
Obviously when porting general code to this environment, this can
cause problems !

The attached patch arranges for this only to be done if
 #define __MINIOS__
is declared, which is set up by the makefile in extras/mini-os.

Suppressing the namespace pollution is necessary to get recent
upstream qemu's to compile, since they (quite properly) use `current'
as an ordinary identifier.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-10-27 18:51:52 +00:00
Keir Fraser 9cdbfef570 minios: blkfront should set protocol node
From: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-24 10:18:20 +01:00
Keir Fraser 9a744273ce mini-os: adding some missing posix function declarations
Adding some missing posix function declarations, to get rid of some
qemu-remote compile time warnings.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-09-17 13:10:36 +01:00
Keir Fraser e388539d78 stubdom: fix munmap's update_va_mapping flag passing, thus fixing
INVLPG passing

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-28 13:09:02 +01:00
Keir Fraser 7e0fe5d8f4 stubdom: add v?errx? and v?warnx? functions
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 14:57:51 +01:00
Keir Fraser 1583e7e448 mini-os: Fix build failure with void* arithmetic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 13:31:01 +01:00
Keir Fraser 13d5024794 mini-os: Add printf format checking to xenbus_printf
Reported-by: "Daniel P. Berrange" <berrange@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:48:39 +01:00
Keir Fraser 839dac782f stubdom: support quotes in argument passing
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:47:49 +01:00
Keir Fraser fe2998c24a stubdom: make munmap work in batches to fix stack overflow
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:47:24 +01:00
Keir Fraser 84901438e6 mini-os: make xenbus_read_integer and xenbus_printf take const strings
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:46:22 +01:00
Keir Fraser 6c5aecbf01 stubdom: add syslog functions
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:45:42 +01:00
Keir Fraser dcd4913503 stubdom: add dummy pthread_mutexattr*
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:45:09 +01:00
Keir Fraser 1cbf503b9d stubdom: int32_t is provided by stdint.h, not sys/types.h
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:44:51 +01:00