]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/log
people/liuw/libxenctrl-split/mini-os.git
12 years agomini-os: shutdown_thread depends on xenbus
Daniel De Graaf [Fri, 30 Nov 2012 21:51:17 +0000 (21:51 +0000)]
mini-os: shutdown_thread depends on xenbus

This fixes the build of the xenstore stub domain, which should never
be shut down and so does not need this feature.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
12 years agominios/console: console_input() weak reference
Andrew Cooper [Fri, 30 Nov 2012 09:37:13 +0000 (09:37 +0000)]
minios/console: console_input() weak reference

In exactly the same style as app_main() in kernel.c, create a weak
reference console_input() function for applications to override to
quickly gain access to the console.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
12 years ago[minios] Add xenbus shutdown control support
Samuel Thibault [Fri, 30 Nov 2012 09:32:27 +0000 (09:32 +0000)]
[minios] Add xenbus shutdown control support

Add a thread watching the xenbus shutdown control path and notifies a
wait queue.

Add HYPERVISOR_shutdown convenient inline for minios shutdown.

Add proper shutdown to the minios test application.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
12 years ago[minios] Fix test application link when pcifront is not enabled
Samuel Thibault [Fri, 30 Nov 2012 09:31:58 +0000 (09:31 +0000)]
[minios] Fix test application link when pcifront is not enabled

When pcifront is not enabled, the test application needs to disable
the PCI test.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
12 years agominios: Update mini-os license to support GPL features
Matthew Fioravante [Mon, 19 Nov 2012 12:59:48 +0000 (12:59 +0000)]
minios: Update mini-os license to support GPL features

This patch updates extras/mini-os/COPYING to explain
which optional features are GPL and what the implications
of enabling them are.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: fix bug in lseek for mini-os
Matthew Fioravante [Mon, 19 Nov 2012 12:59:47 +0000 (12:59 +0000)]
minios: fix bug in lseek for mini-os

lseek always used files[fd].file.offset. It should
use the offset of whatever union member is actually
being used.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: add tpmfront, tpm_tis, and tpmback drivers
Matthew Fioravante [Tue, 13 Nov 2012 10:46:58 +0000 (10:46 +0000)]
minios: add tpmfront, tpm_tis, and tpmback drivers

This patch adds 3 new drivers to mini-os.

tpmfront - paravirtualized tpm frontend driver
tpmback - paravirtualized tpm backend driver
tpm_tis - hardware tpm driver

Unfortunately these drivers were derived from GPL
licensed linux kernel drivers so they must carry
the GPL license. However, since mini-os now
supports conditional compilation, hopefully these
drivers can be included into the xen tree and
conditionally removed from non-gpl projects.
By default they are disabled in the makefile.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: add xenbus_read_uuid
Matthew Fioravante [Tue, 13 Nov 2012 10:46:57 +0000 (10:46 +0000)]
minios: add xenbus_read_uuid

Similar to xenbus_read_integer, this function reads a xenstore path
and parses it as a uuid. See include/xenbus.h for details.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: Disable -DGNT_DEBUG and -DGNTMAP_DEBUG
Matthew Fioravante [Tue, 13 Nov 2012 10:46:56 +0000 (10:46 +0000)]
minios: Disable -DGNT_DEBUG and -DGNTMAP_DEBUG

Disabling the above flags in default mini-os build. They generate a
lot of spam.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: add select definition to sys/time.h when HAVE_LIBC is defined
Matthew Fioravante [Tue, 9 Oct 2012 09:39:09 +0000 (10:39 +0100)]
minios: add select definition to sys/time.h when HAVE_LIBC is defined

This patch adds the select function to sys/time.h when HAVE_LIBC is
defined, which is according to standard (see the select() manpage).
It also removes a redudant lwip include from posix/sys/select.h.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: add posix io for blkfront
Matthew Fioravante [Tue, 9 Oct 2012 09:39:08 +0000 (10:39 +0100)]
minios: add posix io for blkfront

This patch adds posix io support (read,write,lseek) to block devices
using blkfront.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: setup fpu and sse in mini-os
Matthew Fioravante [Mon, 8 Oct 2012 13:36:31 +0000 (14:36 +0100)]
minios: setup fpu and sse in mini-os

This patch adds floating point and sse support to mini-os by
initializing the floating point unit and the see unit during
domain boot up.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: add CONFIG_XC conditional
Matthew Fioravante [Mon, 8 Oct 2012 13:36:31 +0000 (14:36 +0100)]
minios: add CONFIG_XC conditional

This patch adds a CONFIG_XC option to mini-os, to allow conditional
support for libxc for mini-os domains.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: Disable the mfn_is_ram() check, it doesn't work correctly on all systems
Matthew Fioravante [Mon, 8 Oct 2012 13:36:30 +0000 (14:36 +0100)]
minios: Disable the mfn_is_ram() check, it doesn't work correctly on all systems

This patch disables the mfn_is_ram check in mini-os. The current check
is insufficient and fails on some systems with larger than 4gb memory.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: Add endian, byteswap, and wordsize macros to mini-os
Matthew Fioravante [Mon, 8 Oct 2012 13:36:29 +0000 (14:36 +0100)]
minios: Add endian, byteswap, and wordsize macros to mini-os

This patch addes byte swapping macros and endian support to mini-os.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agominios: Add ioread/iowrite functions to mini-os
Matthew Fioravante [Mon, 8 Oct 2012 13:36:28 +0000 (14:36 +0100)]
minios: Add ioread/iowrite functions to mini-os

This patch adds iowritexx() and ioreadxx() functions for interacting
with hardware memory to mini-os. The functions are available in a header
iorw.h

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agotools: drop ia64 support
Ian Campbell [Wed, 12 Sep 2012 16:55:27 +0000 (17:55 +0100)]
tools: drop ia64 support

Removed support from libxc and mini-os.

This also took me under xen/include/public via various symlinks.

Dropped tools/debugger/xenitp entirely, it was described upon commit
as:
"Xenitp is a low-level debugger for ia64" and doesn't appear to be
linked into the build anywhere.

 99 files changed, 14 insertions(+), 32361 deletions(-)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
12 years agonstore: rename public xenstore headers
Ian Campbell [Mon, 14 May 2012 16:15:36 +0000 (17:15 +0100)]
nstore: rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming
the headers to xenstore.h and xenstore_lib.h is the easiest way to make
them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

[ Also update QEMU_TAG, to bring in corresponding change to
qemu-xen-traditional. -iwj ]

Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
--HG--
rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h
rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h

13 years agominios: Remove unused variables warnings
Ian Campbell [Mon, 20 Feb 2012 18:48:32 +0000 (18:48 +0000)]
minios: Remove unused variables warnings

s/DEBUG/printk/ in test_xenbus and all associated do_*_test+xenbus_dbg_message
and always print the IRQ and MFN used by the xenbus on init.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: John McDermott <john.mcdermott@nrl.navy.mil>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agostubdom: enable xenstored build
Daniel De Graaf [Thu, 9 Feb 2012 18:33:35 +0000 (18:33 +0000)]
stubdom: enable xenstored build

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: make frontends and xenbus optional
Daniel De Graaf [Thu, 9 Feb 2012 18:33:32 +0000 (18:33 +0000)]
mini-os: make frontends and xenbus optional

This adds compile-time logic to disable certain frontends in mini-os:
 - pcifront is disabled by default, enabled for ioemu
 - blkfront, netfront, fbfront, kbdfront, consfront are enabled by default
 - xenbus is required for any frontend, and is enabled by default

If all frontends and xenbus are disabled, mini-os will run without
needing to communicate with xenstore, making it suitable to run the
xenstore daemon. The console frontend is not required for the initial
console, only consoles opened via openpt or ptmx.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: Move test functions into test.c
Daniel De Graaf [Thu, 9 Feb 2012 18:33:31 +0000 (18:33 +0000)]
mini-os: Move test functions into test.c

While useful, these test functions should not be compiled into every
mini-os instance that we compile.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: create app-specific configuration
Daniel De Graaf [Thu, 9 Feb 2012 18:33:31 +0000 (18:33 +0000)]
mini-os: create app-specific configuration

Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios
code, create CONFIG_ items for features and use application-specific
configuration files to enable or disable the features.

The configuration flags are currently added to the compiler command
line; as the number of flags grows this may need to move to a header.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: remove per-fd evtchn limit
Alex Zeffertt [Thu, 9 Feb 2012 18:33:30 +0000 (18:33 +0000)]
mini-os: remove per-fd evtchn limit

This changes the minios evtchn implementation to use a list instead of
an array which ahis allows it to grow as necessary to support any number
of ports, only limited by Xen (NR_EVS is 1024, should be enough for now).

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: avoid crash if no console is provided
Daniel De Graaf [Thu, 9 Feb 2012 18:33:30 +0000 (18:33 +0000)]
mini-os: avoid crash if no console is provided

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: stop compiler complaint about unused variables
John McDermott [Thu, 9 Feb 2012 16:03:05 +0000 (16:03 +0000)]
mini-os: stop compiler complaint about unused variables

gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) complains about unused variables
in mini-os drivers

Signed-off-by: John McDermott <john.mcdermott@nrl.navy.mil>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agomini-os: use BSD sys/queue.h instead of Linux list.h
Ian Campbell [Tue, 31 Jan 2012 16:06:14 +0000 (16:06 +0000)]
mini-os: use BSD sys/queue.h instead of Linux list.h

The latter is GPL which makes the whole of mini-os GPL rather than BSD
as intended. In tree users are all GPL or GPL-compatible but we should
fix this so that mini-os is BSD. Do so by using the same BSD
sys/queue.h as we use in libxl.

Tested with the builtin mini-os test app and qemu stubdomain, both of which
appear to still function as expected.

Move tools/libxl/external and the associated sed script to
tools/include/xen-external to allow more sensible access from mini-os.

Also add s/NULL/0/ in the sed script due to NULL not always being
defined in stubdom code when mini-os/wait.h is included.

As well as the obvious ABI changes there are a few API updates
associated with the change:

  - struct rw_semaphore.wait_list is unused
  - remove_waiter needs to take the wait_queue_head

The latter requires a qemu update, so there is also a QEMU_TAG
update in this changeset.

I sprinkled some extra-emacs local variables around the files I edited
which didn't have them.

I think this should be backported to the stable branches since
external users of mini-os may have been mislead into thinking they
could safely link mini-os against GPL-incompatible code.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
13 years agomini-os: convert mlock macros to C functions
Olaf Hering [Tue, 31 Jan 2012 11:33:35 +0000 (11:33 +0000)]
mini-os: convert mlock macros to C functions

mlock and munlock are implemented as macros in mini-os. Their usage
requires casting in common code.  Convert them to C syntax and provide
an empty dummy function.  Remove the now unneeded (void) cast from two
munlock calls.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
13 years agomini-os: do not wait for pci backend in pcifront_scan
Ian Campbell [Fri, 9 Dec 2011 12:01:17 +0000 (12:01 +0000)]
mini-os: do not wait for pci backend in pcifront_scan

This blocks the main thread indefinitely if there is no PCI backend present in
xenstore.

Even in the case where there are passthrough devices configured libxl creates
the stubdom and waits for it to startup _before_ adding the backend. Since the
stub domains main thread is blocked before it can write the "running" state to
xenstore the toolstack eventually times out and kills everything.

There is already a separate pcifront thread which waits for the backend to
appear and calls init_pcifront at the appropriate time should a backend ever
appear.

Unfortunately I don't have any free test boxes with VT-d so I haven't been able
to test the cases where PCI deivces are passed through but I obviously have
tested that I can now start an HVM domain with stub qemu without PCI devices
passed through which I couldn't do before so this is an improvement. This stuff
is a bit like pushing the lump around the carpet :-/

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
13 years agomini-os: work around ld bug causing stupid CTOR count
Jeremy Fitzhardinge [Fri, 19 Aug 2011 08:57:42 +0000 (09:57 +0100)]
mini-os: work around ld bug causing stupid CTOR count

I'm seeing pvgrub crashing when running CTORs.  It appears its because
the magic in the linker script is generating junk.  If I get ld to
output a map, I see:

.ctors          0x0000000000097000       0x18
                0x0000000000097000                __CTOR_LIST__ = .
                0x0000000000097000        0x4 LONG 0x25c04
                (((__CTOR_END__ - __CTOR_LIST__) / 0x4) - 0x2)
 *(.ctors)
 .ctors         0x0000000000097004       0x10
                /home/jeremy/hg/xen/unstable/stubdom/mini-os-x86_32-grub/mini-os.o
                0x0000000000097014        0x4 LONG 0x0
                0x0000000000097018                __CTOR_END__ = .

In other words, somehow ((0x97018-0x97000) / 4) - 2 = 0x25c04

The specific crash is that the ctor loop tries to call the NULL
sentinel.  I'm seeing the same with the DTOR list.

Avoid this by terminating the loop with the NULL sentinel, and get rid
of the CTOR count entirely.

From: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Keir Fraser <keir@xen.org>
14 years agomini-os: fix lib.h licence
Samuel Thibault [Sun, 1 May 2011 09:11:58 +0000 (10:11 +0100)]
mini-os: fix lib.h licence

Update the Linux stdio functions prototypes, and move them to a
separate header, licenced under GPL2+.  Import FreeBSD8 string
functions prototypes, update licence.  Drop kvec, of unsure source and
useless anyway.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
14 years agomini-os: lib/math.c: import FreeBSD 8 functions
Samuel Thibault [Sun, 1 May 2011 09:10:12 +0000 (10:10 +0100)]
mini-os: lib/math.c: import FreeBSD 8 functions

Import lib/math.c functions (and thus licence) from FreeBSD 8,
and re-apply a few of our changes. Whitespaces left aside, this
leads to almost no source change except s/int64_t/quad_t/ and
s/uint64_t/u_quad_t/.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
14 years agomini-os: Fix printf.c licence
Samuel Thibault [Sun, 1 May 2011 09:09:47 +0000 (10:09 +0100)]
mini-os: Fix printf.c licence

Changeset df1348e72390 actually completely replaced the freebsd printf
implementation with the Linux printf implementation. Further changes
are extremely minor and thus don't pose IP issue. Fix the licence
accordingly.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
14 years agobuild: Make XEN_ROOT an absolute path.
Keir Fraser [Thu, 17 Mar 2011 10:36:25 +0000 (10:36 +0000)]
build: Make XEN_ROOT an absolute path.

Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
14 years agominios: do not export {test,set,clear}_bit etc to applications
Ian Campbell [Mon, 7 Feb 2011 12:13:24 +0000 (12:13 +0000)]
minios: do not export {test,set,clear}_bit etc to applications

Fixes ioemu stubdom build:
CC    i386-stubdom/piix4acpi.o
[...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token
[...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write':

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agominios: Fix bug/build problem introduced in c/s 22799
John Weekes [Thu, 27 Jan 2011 09:37:19 +0000 (09:37 +0000)]
minios: Fix bug/build problem introduced in c/s 22799

With "debug=n", "make stubdom" currently fails in xen-unstable. This
patch addresses this through minor fixups.

Signed-off-by: John Weekes <lists.xen@nuclearfallout.net>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agolibxl, minios: stubdom console based save/restore
Stefano Stabellini [Fri, 21 Jan 2011 18:06:23 +0000 (18:06 +0000)]
libxl, minios: stubdom console based save/restore

Add two "special" PV consoles to stubdoms that are going to be used
to send and receive the qemu-xen save files on save/restore.

Use the second PV console to send the qemu-xen save file and the third
PV console to receive the qemu-xen save file on restore.

Fix the console shutdown function free_consfront that is called when the
qemu save file is closed.

Stubdom save/restore is still broken with xend.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools: remove fs-front/fs-back
Tim Deegan [Tue, 11 Jan 2011 18:13:44 +0000 (18:13 +0000)]
tools: remove fs-front/fs-back

Its access controls are really not OK.  In particular, it's not good for
libxl, which stores per-VM config blobs in a directory that is exported
to all VMs.

This will break stub-qemu save/restore, which is the only user of
fs-front that I'm aware of, but:
 - It's currently broken anyway (fs-back isn't run by default and crashes
   if it is run manually); and
 - Stefano has a plan to plumb qemu save records through a dedicated
   console channel instead.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agostubdom/minios: don't retrieve the address of void variable
Gianni Tedesco [Tue, 11 Jan 2011 16:31:47 +0000 (16:31 +0000)]
stubdom/minios: don't retrieve the address of void variable

Objects must not be declared to have type void.  Declare shared_info
to have the appropriate type instead.

Author: Ganni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agostubdom/minios: use correct sized types for software floating point
Samuel Thibault [Tue, 11 Jan 2011 16:30:15 +0000 (16:30 +0000)]
stubdom/minios: use correct sized types for software floating point

Replace long/int/short sizes with proper exact-size types for 64bit
architectures.  As well as making the code correct, this eliminates a
compiler warning about an uninitialised variable.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agominios: use constant expression to size arrays
Gianni Tedesco [Fri, 7 Jan 2011 18:01:18 +0000 (18:01 +0000)]
minios: use constant expression to size arrays

Fixes a compile error in gcc-4.5 which is the reason __CONST_RING_SIZE()
was introduced. Let's just use it in minios netfront.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agominios: reverse layering of xc vs minios fd close
Keir Fraser [Fri, 3 Dec 2010 06:37:48 +0000 (06:37 +0000)]
minios: reverse layering of xc vs minios fd close

Having minios close() call back into the libxc core close routines is
backwards and unexpected. On every other OS the libxc core close
routine calls close().

Export minios specific functions from the minios libxc code to
implement fd closing for each type of xc file handle and simply call
close() in the core close routine.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agominios: add parentheses to mlock/mulock arguments.
Ian Campbell [Tue, 26 Oct 2010 11:08:10 +0000 (12:08 +0100)]
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>
14 years agoMiniOS: Fix continue; in netfront receive loop
Samuel Thibault [Tue, 12 Oct 2010 09:27:56 +0000 (10:27 +0100)]
MiniOS: Fix continue; in netfront receive loop

To properly ignore some requests through the use of continue;, indexes need to
be updated.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxc: eliminate static variables, use xentoollog; API change
Keir Fraser [Fri, 28 May 2010 08:30:19 +0000 (09:30 +0100)]
libxc: eliminate static variables, use xentoollog; API change

This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
15 years agomini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"
Keir Fraser [Tue, 4 May 2010 11:15:28 +0000 (12:15 +0100)]
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>
15 years agomini-os: Fix xenbus_switch_state's transaction retry
Keir Fraser [Wed, 7 Apr 2010 07:17:21 +0000 (08:17 +0100)]
mini-os: Fix xenbus_switch_state's transaction retry

When xenbus_switch_state has to retry the transaction which it just
created, it needs to recreate another one.  Clearing xbt triggers it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 years agomini-os: Fix crash on frontend shutdown failures
Keir Fraser [Wed, 7 Apr 2010 07:16:15 +0000 (08:16 +0100)]
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>
15 years agomini-os: Fix frontend shutdown wait loop
Keir Fraser [Wed, 7 Apr 2010 07:15:55 +0000 (08:15 +0100)]
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>
15 years agomini-os: Fix xenbus initialisation
Keir Fraser [Tue, 6 Apr 2010 06:13:19 +0000 (07:13 +0100)]
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>
15 years agomini-os: Do not use the same wait element twice
Keir Fraser [Tue, 6 Apr 2010 06:12:39 +0000 (07:12 +0100)]
mini-os: Do not use the same wait element twice

To enqueue the kbdfront thread on two separate wait queues, we need
two different wait elements.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 years agominios: Trivial spelling typo fixed.
Keir Fraser [Tue, 30 Mar 2010 07:36:41 +0000 (08:36 +0100)]
minios: Trivial spelling typo fixed.

Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agominios: implement xc_map_foreign_bulk
Keir Fraser [Mon, 18 Jan 2010 14:48:18 +0000 (14:48 +0000)]
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>
15 years agomini-os: Fix build error when !HAVE_LIBC
Keir Fraser [Fri, 18 Dec 2009 07:31:02 +0000 (07:31 +0000)]
mini-os: Fix build error when !HAVE_LIBC

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
15 years agomini-os: Fix a compilation error in xencons_ring when !HAVE_LIBC
Keir Fraser [Mon, 14 Dec 2009 11:38:15 +0000 (11:38 +0000)]
mini-os: Fix a compilation error in xencons_ring when !HAVE_LIBC

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
15 years agomini-os: Fix memory leaks in blkfront, netfront, pcifront, etc.
Keir Fraser [Mon, 14 Dec 2009 09:51:07 +0000 (09:51 +0000)]
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>
15 years agomini-os: Fix memory leaks in xs_read() and xs_write()
Keir Fraser [Fri, 11 Dec 2009 09:01:15 +0000 (09:01 +0000)]
mini-os: Fix memory leaks in xs_read() and xs_write()

xenbus_read() and xenbus_write() will allocate memory for error
message if any error occurs, this memory should be freed.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: Fix fb/kbd initialization
Keir Fraser [Mon, 23 Nov 2009 07:22:28 +0000 (07:22 +0000)]
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>
15 years agominios: Fix xenbus_unwatch_path calls
Keir Fraser [Mon, 23 Nov 2009 07:21:58 +0000 (07:21 +0000)]
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>
15 years agopcifront: fix multiple initialization bug
Keir Fraser [Mon, 23 Nov 2009 07:14:33 +0000 (07:14 +0000)]
pcifront: fix multiple initialization bug

Now that we have pcifront_watches to dynamically initialize pcifront
we don't need a call to init_pcifront in pcilib and pcifront_scan
anymore; we should just wait for the frontend to connect to the
backend instead.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agopcifront: implement dynamic connections and disconnections
Keir Fraser [Fri, 13 Nov 2009 21:58:30 +0000 (21:58 +0000)]
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>
15 years agominios: xmalloc and realloc fixes
Keir Fraser [Thu, 29 Oct 2009 08:34:51 +0000 (08:34 +0000)]
minios: xmalloc and realloc fixes

 - xmalloc currently faults if xmalloc_new_page fails due to OOM
 - realloc treats xmalloc_hdr.size as the size of just the data region
   rather than the total size of data region + headers + padding.

From: James Pendergrass <James.Pendergrass@jhuapl.edu>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agominios: Optimize mmap(open("/dev/mem"))
Keir Fraser [Fri, 23 Oct 2009 08:59:45 +0000 (09:59 +0100)]
minios: Optimize mmap(open("/dev/mem"))

Set map_frames_ex's stride parameter to 0 and increment to 1 to avoid
building an explicit list of mfns.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 years agostubdom: mmap on /dev/mem support
Keir Fraser [Wed, 21 Oct 2009 15:08:28 +0000 (16:08 +0100)]
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>
15 years agominios: fix console end of line: \n\r -> \r\n
Keir Fraser [Wed, 14 Oct 2009 07:58:47 +0000 (08:58 +0100)]
minios: fix console end of line: \n\r -> \r\n

Change the end of line produced by minios' console from \n\r to \r\n.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: fix minios console
Keir Fraser [Wed, 14 Oct 2009 07:55:43 +0000 (08:55 +0100)]
minios: fix minios console

MiniOS' console_print tries to expand '\n' into "\n\r" in place,
causing page faults if the string resides in text.
Use a duplicate of the string instead.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios pcifront: translate physical into virtual addresses
Keir Fraser [Wed, 14 Oct 2009 07:31:07 +0000 (08:31 +0100)]
minios pcifront: translate physical into virtual addresses

Qemu understands physical pci addresses while pciback expects virtual
pci addresses: this patch adds a translation function in pcifront to
make the conversion.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agostubdom/minios: re-structure headers
Keir Fraser [Thu, 1 Oct 2009 11:28:54 +0000 (12:28 +0100)]
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>
15 years agofs-front: cope with a missing fs-backend
Keir Fraser [Thu, 23 Jul 2009 07:57:02 +0000 (08:57 +0100)]
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>
15 years agominios: switch to C99 integer types
Keir Fraser [Wed, 15 Jul 2009 08:09:48 +0000 (09:09 +0100)]
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>
15 years agominios: fix free_fbfront
Keir Fraser [Sat, 27 Jun 2009 09:39:10 +0000 (10:39 +0100)]
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>
15 years agominios: add few missing constants in limits.h
Keir Fraser [Thu, 25 Jun 2009 13:30:00 +0000 (14:30 +0100)]
minios: add few missing constants in limits.h

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: Use posix_openpt() rather than non-standard openpty().
Keir Fraser [Thu, 18 Jun 2009 09:19:25 +0000 (10:19 +0100)]
minios: Use posix_openpt() rather than non-standard openpty().

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: support secondary guest consoles.
Keir Fraser [Wed, 17 Jun 2009 06:22:18 +0000 (07:22 +0100)]
minios: support secondary guest consoles.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agoIntroduce mechanism to check standard conformance of headers
Keir Fraser [Wed, 17 Jun 2009 06:21:03 +0000 (07:21 +0100)]
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>
15 years agominios: Introduce BSD license COPYING file
Keir Fraser [Thu, 4 Jun 2009 09:35:03 +0000 (10:35 +0100)]
minios: Introduce BSD license COPYING file
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: Clean up and remove Linux remnants from x86_64.S
Keir Fraser [Wed, 3 Jun 2009 17:27:05 +0000 (18:27 +0100)]
minios: Clean up and remove Linux remnants from x86_64.S

Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agominios: refactor xenbus state machine
Keir Fraser [Wed, 3 Jun 2009 10:09:14 +0000 (11:09 +0100)]
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>
15 years agominios: Remove Linux attribution for mktime() as it's not true since c/s 19638.
Keir Fraser [Mon, 1 Jun 2009 13:39:25 +0000 (14:39 +0100)]
minios: Remove Linux attribution for mktime() as it's not true since c/s 19638.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agominios: implement ffs, ffsl and ffsll.
Keir Fraser [Thu, 28 May 2009 08:41:59 +0000 (09:41 +0100)]
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>
15 years agopvgrub: few lines in shutdown_blkfront were removed by mistake.
Keir Fraser [Tue, 26 May 2009 09:05:27 +0000 (10:05 +0100)]
pvgrub: few lines in shutdown_blkfront were removed by mistake.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agominios: replace mktime implementation
Keir Fraser [Tue, 26 May 2009 08:54:53 +0000 (09:54 +0100)]
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>
15 years agominios: Fix blkfront driver when sector_size != 512
Keir Fraser [Tue, 26 May 2009 08:49:19 +0000 (09:49 +0100)]
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>
15 years agominios: Implement some extra lib functions for ocaml xenstored stubdom
Keir Fraser [Tue, 19 May 2009 13:15:43 +0000 (14:15 +0100)]
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>
15 years agominios: Define extra stub functions to allow build of ocaml xenstored stubdom
Keir Fraser [Tue, 19 May 2009 13:14:41 +0000 (14:14 +0100)]
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>
16 years agostubdom: drop lwip support
Keir Fraser [Thu, 23 Apr 2009 11:19:14 +0000 (12:19 +0100)]
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>
16 years agostubdoms: generate stubdom config file
Keir Fraser [Thu, 23 Apr 2009 09:08:04 +0000 (10:08 +0100)]
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>
16 years agominios: fix a memory corruption in blkfront
Keir Fraser [Tue, 14 Apr 2009 10:21:45 +0000 (11:21 +0100)]
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>
16 years agominios: Extend struct blkfront_aiocb.
Keir Fraser [Tue, 31 Mar 2009 11:06:57 +0000 (12:06 +0100)]
minios: Extend struct blkfront_aiocb.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agominios: _chk_fail and _chk canaries for minios and newlib
Keir Fraser [Tue, 31 Mar 2009 10:36:11 +0000 (11:36 +0100)]
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>
16 years agominios: allow to allocate machine contiguous pages
Keir Fraser [Fri, 13 Mar 2009 07:37:24 +0000 (07:37 +0000)]
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>
16 years agominios: Fix 18874 memory clipping
Keir Fraser [Mon, 9 Mar 2009 08:43:11 +0000 (08:43 +0000)]
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>
16 years agominios: general cleanup of mm.c
Keir Fraser [Mon, 2 Mar 2009 10:52:07 +0000 (10:52 +0000)]
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>
16 years agominios: cleanup events.c
Keir Fraser [Mon, 2 Mar 2009 10:51:34 +0000 (10:51 +0000)]
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>
16 years agominios: add ioremap/iounmap
Keir Fraser [Mon, 2 Mar 2009 10:50:59 +0000 (10:50 +0000)]
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>
16 years agominios: fix p2m on x86
Keir Fraser [Mon, 9 Feb 2009 14:22:07 +0000 (14:22 +0000)]
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>
16 years agoFix mini-os ia64 compilation
Keir Fraser [Thu, 18 Dec 2008 11:27:37 +0000 (11:27 +0000)]
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>
16 years agomini-os: Make utility function get_self_id() in fs-front.c public.
Keir Fraser [Tue, 16 Dec 2008 12:00:25 +0000 (12:00 +0000)]
mini-os: Make utility function get_self_id() in fs-front.c public.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agominios: Clip memory not usable by Mini-OS (above 1GB)
Keir Fraser [Fri, 5 Dec 2008 13:06:57 +0000 (13:06 +0000)]
minios: Clip memory not usable by Mini-OS (above 1GB)

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
16 years agomerge with xen-unstable.hg
Isaku Yamahata [Tue, 25 Nov 2008 05:21:24 +0000 (14:21 +0900)]
merge with xen-unstable.hg