Commit Graph

105 Commits

Author SHA1 Message Date
Josef Söntgen
2351e9ce86 virtualbox5: enable storage device flushing
The patches forcefully set the 'IgnoreFlush' option to false and change
a sanity check in the VMDK backend. This enables passing the guest's
flush request down to the Block VFS plugin.

Issue #3743.
2020-05-28 14:47:57 +02:00
Norman Feske
b078224753 Replace Genode::strncpy by Genode::copy_cstring
- Since Genode::strncpy is not 100% compatible with the POSIX
  strncpy function, better use a distinct name.

- Remove bogus return value from the function, easing the potential
  enforcement of mandatory return-value checks later.

Fixes #3752
2020-05-27 11:56:45 +02:00
Norman Feske
be65c4acd2 Avoid use of deprecated Xml_node methods
Issue #3755
2020-05-18 10:16:14 +02:00
Norman Feske
9d67f9fc8e Remove Allocator_guard
This patch removes old 'Allocator_guard' utility and replaces its use
with the modern 'Constrained_ram_allocator'.

The adjustment of core in this respect has the side effect of a more
accurate capability accounting in core's CPU, TRACE, and RM services.
In particular, the dataspace capabilities needed for core-internal
allocations via the 'Sliced_heap' are accounted to the client now.
The same goes for nitpicker and nic_dump as other former users of the
allocator guard. Hence, the patch also touches code at the client and
server sides related to these services.

The only remaining user of the 'Allocator_guard' is the Intel GPU
driver. As the adaptation of this component would be too invasive
without testing, this patch leaves this component unchanged by keeping a
copy of the 'allocator_guard.h' locally at the component.

Fixes #3750
2020-05-18 10:16:12 +02:00
Johannes Schlatow
aee5b59c51 Backport changeset 82268 from virtualbox
Fixes #3689
2020-03-26 11:38:54 +01:00
Christian Prochaska
434c9ceb5d vbox5-nova: document possible 'Blocking_canceled' exception
Fixes #3664
2020-02-27 14:46:59 +01:00
Christian Helmuth
8d60bc11b5 vbox: periodic timer based on absolute timestamps
Before timestamps where calculated as durations since current wakeup
which introduces a systematical drift.
2020-02-10 14:21:47 +01:00
Alexander Boettcher
c1e181a407 vbox: handle invalid dataspace exception
Fixes #3566
2019-12-19 16:59:03 +01:00
Sebastian Sumpf
309bc2083e vbox5: raise rrtimer priority
Make sure timers run at the same priority as component threads, otherwise
no timer progress can be made. See 'rtTimeNanoTSInternalRef' (timesupref.h)
and 'rtTimerLRThread' (timerlr-generic.cpp).
2019-11-22 13:33:15 +01:00
Alexander Boettcher
cb61a28362 vbox5: use with_libc when call-in into vbox code
required due to pthreads becoming/are an integral part of the libc now.
Commit avoids libc error:

Error: libc suspend() called from non-user context (0xaf5c784) - aborting

Issue #3550
2019-11-19 14:54:14 +01:00
Christian Helmuth
b622a5a788 vbox: use RTThreadCreate for periodic_gip thread
This prevents the following error message.

  [init -> vbox1] Error: pthread_self() called from alien thread named 'periodic_gip'
2019-11-19 14:42:23 +01:00
Alexander Boettcher
ed73feddc5 vbox5: react on host size changes immediately
The guest may take some time to adjust nevertheless.

Fixes #3498
2019-11-19 14:23:55 +01:00
Norman Feske
bf92232698 libc: split task.cc into multiple files
This patch is the first step of re-organizing the internal structure of
the libc. The original version involved many direct calls of global
functions (often with side effects) across compilation units, which
made the control flow (e.g., the initialization sequence) hard to
follow.

The new version replaces those ad-hoc interactions with dedicated
interfaces (like suspend.h, resume.h, select.h, current_time.h). The
underlying facilities are provided by the central Libc::Kernel and
selectively propagated to the various compilation units. The latter is
done by a sequence of 'init_*' calls, which eventually will be replaced
by constructor calls.

The addition of new headers increases the chance for name clashes with
existing (public) headers. To disambiguate libc-internal header files
from public headers, this patch moves the former into a new 'internal/'
subdirectory. This makes the include directives easier to follow and the
libc's source-tree structure more tidy.

There are still a few legacies left, which cannot easily be removed
right now (e.g., because noux relies on them). However, the patch moves
those bad apples to legacy.h and legacy.cc, which highlights the
deprecation of those functions.

Issue #3497
2019-11-19 14:10:55 +01:00
Christian Prochaska
3acb509b9e vbox: add 'RTMemDupExTag()' implementation
Fixes #3473
2019-08-21 12:37:00 +02:00
Alexander Boettcher
7ec37b2d8d vbox5: adjust to run with Fiasco.OC
- use priorities solely with nova
- handle exceptions during vCPU creation
- avoid assertion in vga_vbda
- silence compiler warnings about outdated register keyword

Issue #3111
2019-06-13 12:22:49 +02:00
dc8a2ec523 Remove libc_terminal
Fix #3378
2019-06-13 12:13:40 +02:00
Alexander Boettcher
b3a9ad2215 vbox5: fpu support via new vm_session
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher
5673c163fb vbox5: use vm_session interface
Issue #3111
2019-05-29 10:20:52 +02:00
Christian Prochaska
c9b5dcafbd vbox: save FPU state in 'EPT violation' exit handler
Fixes #3359
2019-05-27 14:46:54 +02:00
Christian Prochaska
f596595c98 vbox: use 'Abi::stack_align()' for exit handler stack
This ensures proper stack alignment for FPU instructions on x86_64.

Fixes #3358
2019-05-27 14:46:53 +02:00
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
Alexander Boettcher
00953e39f4 vbox: allocate REM memory dense
Fixes #2116
2019-04-01 19:33:50 +02:00
Alexander Boettcher
3b36542212 vbox5: use nitpicker session
Issue #3196
2019-04-01 19:33:50 +02:00
Alexander Boettcher
bafe3c3fc3 vbox5: check memory configuration stricter
The required memory of the VMM depends on the VM memory configuration (vbox)
and the available screen resolution. Check for insane configurations in the
beginning to avoid late surprises.

Issue #3216
2019-04-01 19:33:47 +02:00
Alexander Boettcher
ce1f245952 vbox5: free bitmap source during resize
Fixes #3216
2019-04-01 19:33:47 +02:00
Norman Feske
b24edc1633 Remove residual uses of deprecated APIs
Issue #1987, related also to issue #3163 and issue #3164.
2019-02-19 11:12:12 +01:00
Norman Feske
aa66b5d62f base: remove dependency from deprecated APIs
This patch adjusts the implementation of the base library and core such
that the code no longer relies on deprecated APIs except for very few
cases, mainly to keep those deprecated APIs in tact for now.

The most prominent changes are:

- Removing the use of base/printf.h

- Removing of the log backend for printf. The 'Console' with the
  format-string parser is still there along with 'snprintf.h' because
  the latter is still used at a few places, most prominently the
  'Connection' classes.

- Removing the notion of a RAM session, which does not exist in
  Genode anymore. Still the types were preserved (by typedefs to
  PD session) to keep up compatibility. But this transition should
  come to an end now.

- Slight rennovation of core's tracing service, e.g., the use of an
  Attached_dataspace as the Argument_buffer.

- Reducing the reliance on global accessors like deprecated_env() or
  core_env(). Still there is a longish way to go to eliminate all such
  calls. A useful pattern (or at least a stop-gap solution) is to
  pass the 'Env' to the individual compilation units via init functions.

- Avoiding the use of the old 'Child_policy::resolve_session_request'
  interface that returned a 'Service' instead of a 'Route'.

Issue #1987
2019-02-19 11:08:17 +01:00
Alexander Boettcher
6bb145bdd8 Remove virtualbox 4 vmm
Fixes #3141
2019-02-19 11:08:17 +01:00
Norman Feske
6b289a1423 base/core: use references instead of pointers
This patch replaces the former prominent use of pointers by references
wherever feasible. This has the following benefits:

* The contract between caller and callee becomes more obvious. When
  passing a reference, the contract says that the argument cannot be
  a null pointer. The caller is responsible to ensure that. Therefore,
  the use of reference eliminates the need to add defensive null-pointer
  checks at the callee site, which sometimes merely exist to be on the
  safe side. The bottom line is that the code becomes easier to follow.

* Reference members must be initialized via an object initializer,
  which promotes a programming style that avoids intermediate object-
  construction states. Within core, there are still a few pointers
  as member variables left though. E.g., caused by the late association
  of 'Platform_thread' objects with their 'Platform_pd' objects.

* If no pointers are present as member variables, we don't need to
  manually provide declarations of a private copy constructor and
  an assignment operator to avoid -Weffc++ errors "class ... has
  pointer data members [-Werror=effc++]".

This patch also changes a few system bindings on NOVA and Fiasco.OC,
e.g., the return value of the global 'cap_map' accessor has become a
reference. Hence, the patch touches a few places outside of core.

Fixes #3135
2019-02-12 10:33:13 +01:00
7a11384177 Merge pthread into libc library
The pthread API is considered a standard feature of libc so better to
simply merge it with the libc. Pthreads are in fact already a part of
the libc in the form of weak symbols. This merger is also a prerequisite
for better integrating pthreads with the libc I/O task.

Fix #3054
2018-11-29 11:46:01 +01:00
Alexander Boettcher
142d503cb4 vbox5: disable assertions in recipe vbox5-nova
Issue #2984
2018-09-20 09:07:31 +02:00
Alexander Boettcher
0ee0844c59 vbox5: revoke VM memory during VM reset
Avoids reboot issues seen with Windows VMs.

Fixes #2946
2018-08-28 17:10:58 +02:00
Sebastian Sumpf
0ed2ef230b vbox5: fix self-programming timer in XHCI model
A timer should set itslef not pending before calling the timout handler.
This is important for timeout handler that program the timeout again.

issue #2910
2018-08-02 14:36:46 +02:00
Christian Prochaska
182d1d339b vbox5: print error messages in 'VirtualBoxBase::handleUnexpectedExceptions()'
Fixes #2879
2018-07-03 09:39:31 +02:00
Alexander Boettcher
2755772478 vbox5: update to 5.1.38
Issue #2847
2018-05-31 17:12:44 +02:00
Alexander Boettcher
e087d6ad19 vbox5: quirk microcode patch attempts by guests
Fixes #2847
2018-05-31 17:12:25 +02:00
Christian Prochaska
f4cfa0ca43 vbox5: remove 'force_ioapic' code
Fixes #2806
2018-05-30 13:36:15 +02:00
Sebastian Sumpf
df3e4edd76 vbox: adjust to 'pthread_attr' removal in pthread
issue #2791
2018-05-30 13:36:05 +02:00
Norman Feske
afcad2a968 os: new Input::Event representation
This commit changes the 'Input::Event' type to be more safe and to
deliver symbolic character information along with press events.

Issue #2761
Fixes #2786
2018-05-03 15:31:25 +02:00
Alexander Boettcher
f7cacd16a0 vbox5: avoid assertion in DevHDA
seen with beginning of Virtualbox 5.1.34 update

Issue #2658
2018-03-27 13:43:08 +02:00
Alexander Boettcher
80e1dce1b0 nova: abandon hypervisor_info_page ROM
replace by platform_info ROM supposed to exist on all supported
kernels.

Fixes #2710
2018-03-08 14:24:05 +01:00
Alexander Boettcher
9a46c670c1 vbox5: update to 5.1.34
Issue #2658
2018-03-08 12:05:04 +01:00
Alexander Boettcher
c34a4bfdb4 vbox5: update to 5.1.32
Issue #2658
2018-02-14 20:41:06 +01:00
Alexander Boettcher
529be993c7 vbox5: update to 5.1.28
Issue #2658
2018-02-14 20:41:06 +01:00
Alexander Boettcher
bd81eac98b vbox5: update to 5.1.24
Issue #2658
2018-02-14 20:41:06 +01:00
Sebastian Sumpf
963f5de117 vbox5: increase boot speed of Linux guests
Until now, if we examined an EPT fault and the corresponding guest
physical memory was not allocated, we forwarded the faulting instruction
to the instruction emulator, which in turn handled the memory allocation
implicitly. This lead to long instruction emulation times on certain
instructions (e.g. 'rep mov' on large memory junks).  Therefore, we now
allocate and map the corresponding guest physical memory immediately in
the EPT fault handler and directly return to the guest.

fixes #2645
2018-01-17 12:19:44 +01:00
Christian Helmuth
d26554f38d vbox: support symlinks on host file system
Before this commit, symbolic links in shared folders lead to the use of
unimplemented functions, ie., halted the VMM.
2018-01-17 12:14:43 +01:00
Norman Feske
366bba0227 Exclude higher-level repos from strict warnings
This is a follow-up commit to "Increase default warning level", which
overrides Genode's new default warning level for targets contained in
higher-level repositories. By explicitly whitelisting all those targets,
we can selectively adjust them to the new strictness over time - by
looking out for 'CC_CXX_WARN_STRICT' in the target description files.

Issue #465
2018-01-17 12:14:36 +01:00
Norman Feske
2a33d9aa76 pthread: prevent copy of Genode::Thread object
This patch also adjusts virtualbox because it relies on pthread-internal
interfaces.

Fixes #2630
2018-01-17 12:14:34 +01:00
Stefan Kalkowski
b4e437000a virtualbox5: prevent null-pointer dereference
Fix #2612
2017-12-21 15:01:50 +01:00