Antti Kantee [Tue, 20 Jan 2015 16:55:46 +0000 (17:55 +0100)]
be verbose about error and workaround slow console
In case the domu runs very quickly, there will be a complete failure
to observe any output. Therefore, in case we exit with val != 0,
sleep a bit. This is a cheap and dirty workaround.
Martin Lucina [Tue, 20 Jan 2015 12:22:33 +0000 (13:22 +0100)]
app-tools/ld: Ignore --export-dynamic and variants
Some applications insist on using --export-dynamic in LDFLAGS even when
configured with --disable-shared. Since we don't do dynamic linking,
we can safely ignore these options in stunt ld.
Martin Lucina [Tue, 13 Jan 2015 17:20:32 +0000 (18:20 +0100)]
Make initial stack setup consistent with per-thread stack setup
Push an "end of backtrace" marker onto the stack and zero BP. For x86_64
additionally push an extra 0 to ensure correct stack alignment as per
the ABI.
Martin Lucina [Mon, 12 Jan 2015 14:20:00 +0000 (15:20 +0100)]
Correct x86-64 stack alignment at thread entry (fixes #18)
The x86-64 ABI mandates in section 3.2.2 that (%rsp + 8) is always a
multiple of 16 when control is transferred to a function entry point. We
did not correctly implement this convention which resulted in broken
alignment for stack variables, and, following from that, SSE
instructions generated by GCC faulting due to bad alignment.
For the x86-32 version the alignment constraint appears to be[1] that
%esp must be a multiple of 16, this is already the case so no change is
made to x86-32.s.
Martin Lucina [Sun, 28 Dec 2014 17:12:40 +0000 (18:12 +0100)]
Implement wall clock time (rumprun-xen issue #13)
This change adds minios_clock_wall() as a global symbol to return wall
clock time from Xen. I did not reinstate the minios "gettime()" which is
available upstream as that relies on a definitition of struct timeval.
minios_monotonic_clock() is renamed to minios_clock_monotonic() for
consistency.
rumpuser_clock_gettime() is updated to support RUMPUSER_CLOCK_REWALL,
returning wall clock time.
All rumphyper calls to the minios NOW() macro are replaced with calls to
the properly namespaces minios_clock_monotonic().
Martin Lucina [Mon, 15 Dec 2014 21:02:27 +0000 (22:02 +0100)]
Mini-OS: netfront: Fix rx ring starvation in network_rx
In network_rx() we must push the same amount of requests back onto the
ring in the second loop that we consumed in the first loop. Otherwise
the ring will eventually starve itself of free request slots and no
packets will be delivered.
Martin Lucina [Fri, 12 Dec 2014 17:28:42 +0000 (18:28 +0100)]
Mini-OS: Add monotonic_clock to minios_ namespace
This is needed by rumphyper_base, among other things. Unclear how it is
possible that the build was working until now, separating the Mini-OS
and rumprun build systems exposed this.
Martin Lucina [Fri, 12 Dec 2014 17:18:50 +0000 (18:18 +0100)]
Extricate rumprun build system from Mini-OS
Moves the Mini-OS Makefile and associated bits to xen/, separating the
rumprun and Mini-OS build systems. This will hopefully prepare us better
for (possibly) merging with upstream Mini-OS.
Further changes arising from this:
- All minios and rumprun object files are now built under obj/
- MiniOS build installs the arch-specific ldscript under
obj/xen/minios.lds
- Rather than separately specifying the arch-specific startfile in
app-tools specs we link it into the final minios.o and use that as the
startfile.
The advantage of this approach is we no longer have to "hunt" for the
startfile _OR_ the arch-specific lib in the top-level Makefile. It
does mean the resulting application has a different memory layout due
to link order but this should not matter.
Martin Lucina [Wed, 3 Dec 2014 16:25:01 +0000 (17:25 +0100)]
app-tools: Remove useless objcopy from stunt ld
Discussed with Ian previously; the objcopy step was left over from
previous attempts at namespacing mini-os and is no longer required as
this is performed when linking minios.o.
Martin Lucina [Sun, 23 Nov 2014 21:02:12 +0000 (22:02 +0100)]
rumprun: Use blkid rather than file to detect fstype
The output of file differs between systems (and Linux distribution
versions!). Use blkid for now to detect block device filesystem type,
will need to be revisited or marked as a dependency on e2fsprogs for
*BSD.
Martin Lucina [Sun, 23 Nov 2014 20:58:19 +0000 (21:58 +0100)]
rumprun: Make diskspec backward compatible with Xen 4.1
Xen 4.1 is used in Debian stable; the diskspec used by xl is not clearly
documented and is just a passthrough to the xm disk stanza. We need mode
'w' rather than 'rw' which is also understood by (at least) Xen 4.4.