Commit Graph

349 Commits

Author SHA1 Message Date
Norman Feske
7bed3967ae ports: GNU build-system support for non-noux pkgs
This patch makes the build-system integration of noux packages usable
for non-Noux targets. It moves the GNU build system wrapper to
ports/mk/gnu_build.mk, which is now included by noux.mk. This way,
non-noux applications can use the same build-system wrapper. So the
porting of individual applications becomes easier.

This change removes the 'NOUX_' prefix use the various build variables
used by the noux-pkg's target.mk files to steer the behaviour of the GNU
build system. E.g., NOUX_CONFIGURE_ARGS is now called CONFIGURE_ARGS.
Note that there is a single exception to this pattern: The formerly
named NOUX_LIBS is now called LDLIBS because the plain LIBS variable is
used by the Genode build system.

Fixes #2094
2016-10-21 12:39:29 +02:00
Alexander Boettcher
10ec9806d3 vbox: update to 4.3.40
Fixes #2090
2016-09-14 11:53:03 +02:00
Alexander Boettcher
06f1ac4025 vbox: update to 4.3.30
Issue #2090
2016-09-14 11:53:03 +02:00
Alexander Boettcher
95a9ceed4a vbox: update to 4.3.28
Issue #2090
2016-09-14 11:53:03 +02:00
Alexander Boettcher
aabdb77697 vbox: update to 4.3.26
Issue #2090
2016-09-14 11:53:02 +02:00
Alexander Boettcher
8e7a0a80fd vbox: update to 4.3.24
Issue #2090
2016-09-14 11:53:02 +02:00
Alexander Boettcher
ef0efdfcea vbox: update to 4.3.22
Issue #2090
2016-09-14 11:53:02 +02:00
Alexander Boettcher
8a3429ef16 vbox: update to 4.3.20
Issue #2090
2016-09-14 11:53:02 +02:00
Alexander Boettcher
e90cfe1268 vbox: update to 4.3.18
Issue #2090
2016-09-14 11:53:02 +02:00
Alexander Boettcher
8fb6f032d4 vbox: update tpr register before requesting irq
- required by win7 64bit guest single vCPU

Fixes #2089
2016-09-14 11:53:02 +02:00
Christian Helmuth
97201e6778 Remove tar archives after cpu_sampler_noux and noux_bash
This fixes our nightly error on cleanall with "unexpected:
./bin/diffutils.tar".
2016-09-09 11:48:43 +02:00
Emery Hemingway
929ca5c163 virtualbox5: apply nic slot label patch
Fixes #2081
2016-08-31 17:11:05 +02:00
Martin Stein
0f8a39e5ac net: move MAC and IPV4 address to NET namespace
Ref #114
2016-08-29 17:29:38 +02:00
Josef Söntgen
fbe127cdf4 vbox: fix ACPI dsl for newer iASL versions
The patch reflects the changes done in VirtualBox 5 and is at least
needed on Ubuntu 16.04.

Fixes #2068.
2016-08-29 17:29:35 +02:00
Alexander Boettcher
a1d9ed1d8a vbox: remove win8 auto test 2016-08-29 17:29:34 +02:00
Alexander Boettcher
f75bb77756 vbox: add win7_64 auto test 2016-08-29 17:29:34 +02:00
Josef Söntgen
2eda37e187 noux-pkg/noux-etc: serialize building targets
Issue #2069.
2016-08-29 17:29:34 +02:00
Alexander Boettcher
e39dc445b1 vbox: re-enable chunk-wise memory allocation
disabled by "vbox: Implement hwaccl support for Muen" for nova
2016-08-29 17:29:33 +02:00
Alexander Boettcher
57b90e8d75 vmm: experimental virtualbox 5 support
The main feature for this version upgrade is the use of the instruction
emulator (IEM) to speed up execution and less often the slow recompiler.

issue #2059
2016-08-29 17:29:32 +02:00
Alexander Boettcher
4dbfbdb7c4 vbox: factor out/extend common parts of vbox 4 & 5
Issue #2059
2016-08-29 17:29:32 +02:00
Norman Feske
17c79a9e23 base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.

While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).

To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.

Issue #1987
2016-08-29 17:27:10 +02:00
Christian Prochaska
c72d1655f4 vbox: read 'force_ioapic' config option only once
Fixes #2049
2016-08-29 17:23:20 +02:00
Alexander Boettcher
5aabfa9dd0 sel4: disable noux_tool_chain_auto.run
Currently leaking to many capability selectors, so that the tool chain test
can't succeed.

Issue #2044
2016-08-10 11:07:57 +02:00
Christian Helmuth
b2eb42feb1 Use USB multi touch and keyboard for Win8 test 2016-08-10 11:07:49 +02:00
Alexander Boettcher
a876e655c0 vbox: support readonly overlay from disk
Add option to load the initial overlay*.vdi from disk, but keep the changes
in a ram_fs.

Used with AHCI model for vbox_auto_win7. Currently we have no way to tell
rump_fs to unmount and write back data to disk before resetting the machine.
2016-08-10 11:07:48 +02:00
Adrian-Ken Rueegsegger
dd22c961c9 Update Muen port
- Adjust list of Muen components
- vbox: Sync hw_x86_64_muen subject state with Muen SK
2016-08-10 11:07:48 +02:00
Christian Helmuth
747137c201 Increase stack size of alarm schedulers 2016-08-10 11:07:47 +02:00
Emery Hemingway
f92be575ae nit_fb: change to component API
Issue #1987
2016-08-10 11:07:46 +02:00
Emery Hemingway
d0e7cc35fa Adjust run scripts for loss of ROM filename argument
Issue #1787
2016-07-11 13:31:36 +02:00
Emery Hemingway
2b8c1af9e0 remove 'filename' from ROM sesion args
Conveying the ROM filename as the final label element simplifies
routing policy and session construction.

Annotations by nfeske:

This commit also changes the ROM session to use base/log.h instead of
base/printf.h, which produced build error of VirtualBox because the
vbox headers have a '#define Log', which collides with the content of
base/log.h. Hence, this commit has to take precautions to resolve this
conflict.

The commit alse refines the previous session-label change by adding a
new 'Session_label::prefix' method and removing the use of 'char const *'
from this part of the API.

Fixes #1787
2016-07-11 13:24:36 +02:00
Norman Feske
88b358c5ef Unification of native_capability.h
This patch establishes the sole use of generic headers across all
kernels. The common 'native_capability.h' is based on the version of
base-sel4. All traditional L4 kernels and Linux use the same
implementation of the capability-lifetime management. On base-hw, NOVA,
Fiasco.OC, and seL4, custom implementations (based on their original
mechanisms) are used, with the potential to unify them further in the
future.

This change achieves binary compatibility of dynamically linked programs
across all kernels.

Furthermore, the patch introduces a Native_capability::print method,
which allows the easy output of the kernel-specific capability
representation using the base/log.h API.

Issue #1993
2016-07-11 13:07:37 +02:00
Norman Feske
d71f0a9606 Cleanup of parent-cap handling
This patch alleviates the need for a Native_capability::Dst at the API
level. The former use case of this type as argument to
Deprecated_env::reinit uses the opaque Native_capability::Raw type
instead. The 'Raw' type contains the portion of the capability that is
transferred as-is when delegating the capability (i.e., when installing
the parent capability into a new component, or when installing a new
parent capability into a new forked Noux process). This information can
be retrieved via the new Native_capability::raw method.

Furthermore, this patch moves the functions for retriving the parent
capability to base/internal/parent_cap.h, which is meant to be
implemented in platform-specific ways. It replaces the former set of
startup/internal/_main_parent_cap.h headers.

Issue #1993
2016-07-11 13:05:27 +02:00
Norman Feske
f7bdd383e2 Remove base/native_types.h headers
Issue #1993
2016-07-11 12:06:50 +02:00
Adrian-Ken Rueegsegger
d6ba00089b vbox: Increase stack size of periodic_gip thread
Otherwise a pagefault is triggered on hw_x86_64_muen.
2016-07-11 12:06:50 +02:00
Norman Feske
030301d046 gdb_monitor: remove superfluous check
The check for preparation of gdb is now done by the ports mechanism.
2016-07-11 12:06:50 +02:00
Norman Feske
11a4e7888d noux_net_netcat.run: increase usb_drv quota
Use quota large enough so that the USB driver does not attempt to
request further memory. On the Raspberry Pi, init has no slack memory
to respond to such a request.
2016-07-06 13:02:59 +02:00
Alexander Boettcher
0efd89f12b hw_zynq: disable noux_net_netcat test
because of missing uart_drv
2016-07-06 13:02:59 +02:00
Emery Hemingway
e09752a26f noux: pass correct paths for stdio to Vfs_io_channel
Pass both paths, absolute path to the mount point and the relative path
from the mount point to the file, along with an open handle rather than
just an absolute path. Otherwise, fstat fails if the addressed file is
implemented by another VFS plugin.

Fixes #1789
2016-07-06 13:02:59 +02:00
Alexander Boettcher
5f371c9a3d noux: increase stack size
not sufficient for 32bit noux_tool_chain_auto anymore

Issue #2025
2016-07-06 13:02:58 +02:00
Adrian-Ken Rueegsegger
4c5694184c Enable 32-bit Virtualbox scenarios for hw_x86_64_muen
* Announce VM service
 * Disable USB uhci and ehci as only xhci is supported on hw_x86_64_muen

Issue #2016
2016-07-06 13:02:58 +02:00
Reto Buerki
63591160df vbox: Factor out memory config check
Move Genode/vbox memory configuration check to separate
genode_check_memory_config() function and call it in platform-specific
setup machine hook of accloff/nova.

The rationale for this change is to omit the check on Muen since the
guest memory is separate and not allocated from base-hw memory.

Issue #2016
2016-07-06 13:02:57 +02:00
Adrian-Ken Rueegsegger
6d28ea1c5c vbox: Add platform-specific setup machine hook
Add call to genode_setup_machine prior to machine registration in
frontend machine setup code. This enables platform-specific adjustments
to the machine instance.

The new function is used on hw_x86_64_muen to clamp the processor count
to 1 as multiple virtual CPUs are not supported on this platform.

Issue #2016
2016-07-06 13:02:56 +02:00
Adrian-Ken Rueegsegger
e3fbeeb25e vbox: Implement hwaccl support for Muen
* Implement VMMR0_DO_VMMR0_INIT operation for Muen

   - Indicate VT-x support
   - Enable unrestricted guest mode
   - Set CR[0|4] mask to enable masking of guest CR0.[NE,NW,CD] and
     CR4.VMXE bits.

 * Implement VMMR0_DO_GVMM_CREATE_VM on Muen

   Return error if trying to create SMP VM as VMs with multiple CPUs are
   currently not supported on hw_x86_64_muen.

 * Add Muen-specific Mem_region type

   On hw_x86_64_muen the guest memory layout is static, thus regions are
   handed out from an array of memory regions.

   Use sinfo API to calculate the base address of the VM RAM physical
   0x0 region. This allows to dynamically modify the VM RAM size by
   adjusting the Muen policy and Genode vbox files accordingly.

   Zeroize all memory regions apart from VM Ram since Virtualbox expects
   these regions to be cleared.

 * Add Muen subject state struct

   The subject state encompasses the guest VM machine state that is
   transfered between Virtualbox and hardware accelerated execution on
   Muen.

 * Add Muen-specific Vm_handler class
 * Use Vm_handler to run VM
 * Instruct recompiler to flush its code cache
 * Copy the Muen subject state to/from the Vbox PCPUMCTX.
 * Use the VM interruptibility state to inform the recompiler whether
   interrupts are currently inhibited.
 * Explicitly handle control register access

   If a VM-exit occurs due to a control register access, handle it and
   directly continue hardware accelerated execution of guest VM.

   Note: On NOVA control register accesses are handled by the kernel [1].

   [1] - https://github.com/alex-ab/NOVA/blob/master/src/ec_vmx.cpp#L106

 * Reset guest interruptibility state

   Assert that interrupts are not inhibited in the Virtualbox machine
   state and clear Blocking-by-[STI|MOV to SS] guest interruptibility
   flags prior to running a guest VM in hwaccel mode.

 * Set return code depending on exit reason

   Do not unconditionally emulate the next instruction on VM exit. This
   makes sharing the VM FPU state with Virtualbox unnecessary, as FPU
   instructions are not emulated by the recompiler any longer.
   Also, assert that the FPU has not been used by the recompiler

 * Inject pending guest VM interrupts on Muen

   Use mapped subject pending interrupts page of guest VM to perform
   interrupt injection. IRQs are transferred from the Virtualbox trap
   manager state to the pending interrupts region for injection. If an
   IRQ remains pending upon returning to the recompiler, it is copied
   back to the trap manager state and cleared in the subject interrupts
   region.

 * Inform recompiler about changed SYSENTER_[CS|EIP|ESP] values,
   otherwise values set while running the guest VM hardware accelerated
   may get lost.

 * Implement genode_cpu_hz() on Muen

   Determine the CPU frequency dynamically using the sinfo API.

Issue #2016
2016-07-06 13:02:56 +02:00
Adrian-Ken Rueegsegger
738b01d37a vbox: Move pgm to virtualbox-hwaccl library
Issue #2016
2016-07-06 13:02:56 +02:00
Adrian-Ken Rueegsegger
89a6d16d81 vbox: Extract Vmm_memory::Region to separate header
This enables platform-specific implementations of the struct Mem_region
type.

Issue #2016
2016-07-06 13:02:55 +02:00
Alexander Boettcher
8188e60954 hw_x86: enable building virtualbox
Issue #2016
2016-07-06 13:02:54 +02:00
Emery Hemingway
ef845edb6e lib/libc_noux: increase execve buffers
Fixes #2025
2016-06-28 11:20:11 +02:00
Christian Prochaska
22e908e801 vbox: add config option to enforce use of IOAPIC
The virtual PCI model delivers IRQs to the PIC by default and to the
IOAPIC only if the guest operating system selected the IOAPIC with the
'_PIC' ACPI method and if it called the '_PRT' ACPI method afterwards.
When running a guest operating system which uses the IOAPIC, but does
not call these ACPI methods (for example Genode/NOVA), the new
configuration option

<config force_ioapic="yes">

enforces the delivery of PCI IRQs to the IOAPIC.

Fixes #2029
2016-06-28 11:10:45 +02:00
Christian Prochaska
761db4bc73 vbox: config option for the virtual XHCI controller
This commit adds the VirtualBox configuration option

<config xhci="yes">

to enable the virtual XHCI controller.

Fixes #2028
2016-06-28 11:10:29 +02:00
Christian Helmuth
d8c34237bf vfs: default constructor for Dirent and Stat
Fixes #1743
2016-06-28 11:09:27 +02:00