Commit Graph
163 Commits
Author SHA1 Message Date
Ian Campbell 26d4c59a0b minios: add parentheses to mlock/mulock arguments.
Fixes warning/build error with non-trivial arguments.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-26 12:08:10 +01:00
Keir Fraser 6127bd73bd minios: implement xc_map_foreign_bulk
In order to do so it modifies map_frames_ex and do_map_frames to take
an int *err as parameter and return any error that way.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-01-18 14:48:18 +00:00
Keir Fraser f8b6fcaf8f pcifront: implement dynamic connections and disconnections
this patch implements dynamic connections and disconnections in
pcifront.
This feature is required to properly support pci hotplug, because when
no pci devices are assigned to a guest, xend will remove the pci
backend altogether.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-11-13 21:58:30 +00:00
Keir Fraser 05ec439680 stubdom: mmap on /dev/mem support
This patch adds support for mmap on /dev/mem in a stubdom; it is
secure because it only works for memory areas that have been
explicitly allowed by the toolstack (xc_domain_iomem_permission).
Incidentally this is all that is needed to make MSI-X passthrough work
with stubdoms.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-10-21 16:08:28 +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 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 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 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 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 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 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 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 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
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 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 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 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 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 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
Keir Fraser 03d1528a6a stubdom: for safety, tell lwip we use the heap in the event handler
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-11 15:00:06 +01:00
Keir Fraser a9c83dc720 prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
That permits to reduce the amount of difference with upstream.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-08 10:48:48 +01:00
Keir Fraser 168d8692c8 stubdom: turn off_t 64bit on x86
We can decide to make off_t 64bit instead of implementing the LFS
tricks.  Name corresponding functions foo64 to permit simple caml
programs linking.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-08 10:45:30 +01:00
Keir Fraser e5ba23a1d9 FSIF: extend protocol to multi-grant requests and multi-page ring
To improve throughput and inline the stat response.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-01 09:37:10 +01:00
Keir Fraser 7d0b678231 minios: grant table map (gntdev) for minios
I've implemented a grant map for mini-os to support the xc_gnttab_*()
functions, the equivalent of gntdev in linux. This is useful for my
work in putting xenstored in a stub domain.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
2008-07-24 14:14:27 +01:00
Keir Fraser ca28885fa7 mini-os: export allocate_ondemand
allocate_ondemand can be used to allocate addresse space. Primarily
used for mapping MFNs, it can also be used e.g. to map grant refs.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 15:45:06 +01:00
Keir Fraser 93a9aafe96 mini-os is missing list_top in its list.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-18 15:44:39 +01:00
Keir Fraser 16519cc5e8 mini-os: add stack walking debug
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 14:09:14 +01:00
Keir Fraser 9415ef36a1 stubdom: add functions for caml runtime
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-17 13:21:37 +01:00
Keir Fraser 49ecbb58e0 stubdom: Fixes for gcc 4.2.4 32bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 15:32:18 +01:00
Keir Fraser 8f96998338 stubdom: fixes to compile with qemu-xen
This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now
#include each other through a mini-os/ prefix, so that we can turn all
-I into -isystem and still be sure that we include Mini-OS headers
(and not qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:15:46 +01:00
Keir Fraser 087adc9638 minios: Add missing fcntl.h.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-09 16:00:05 +01:00
Keir Fraser 926da77e4a stubdom: fix pass-through compilation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-05 14:00:19 +01:00
Keir Fraser 760dd6f073 stubdom: gcc-4.3 support
It seems we need to provide limits.h in the gcc-4.3 case.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-04 18:00:04 +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 38cfc3b8d0 minios: PIRQ and MSI/MSI-X support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 17:26:42 +01:00
Keir Fraser de4e084064 stubdom: PCI passthrough support via PV-PCI
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-02 13:54:20 +01:00
Isaku Yamahata d20f38afda merge with xen-unstable.hg 2008-06-19 12:46:26 +09: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 7074b13cee minios: fix declaration after code
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:35:06 +01:00
Keir Fraser ba65563c1b minios: Fix >4GB machine addresses
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-10 16:59:24 +01:00
Isaku Yamahata ac538d5060 minios/ia64: fix EFI_RUNTIME_SERVICES_SIGNATURE value
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-10 14:58:27 +09:00