Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
df3e4edd76 vbox: adjust to 'pthread_attr' removal in pthread
issue #2791
2018-05-30 13:36:05 +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
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
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
Alexander Boettcher
e532fc83b6 vbox5: use sched_yield instead of pthread_yield
Fixes #2551
2017-11-06 13:57:19 +01:00
Alexander Boettcher
c4c9e1fe7f vbox: attach executable memory as such
Issue #1723
2017-10-19 13:46:41 +02:00
Alexander Boettcher
ad1f38a780 vbox5: recognized more than 4Gb in VMs
Fixes #2455
2017-06-29 12:00:00 +02:00
Alexander Boettcher
158dbcc7ae vbox5: enable unrestricted guest support
Issue #2338
2017-06-06 13:06:33 +02:00
Alexander Boettcher
b7da62cd55 vbox4/5: remove printf 2017-05-31 13:16:19 +02:00
Alexander Boettcher
dc566b7d52 vbox5: allocate memory in larger pieces
to avoid lot of capabilities created for each 2M allocation otherwise

Issue #2398
2017-05-31 13:16:11 +02:00
Alexander Boettcher
6d8bfb677e vbox5: support more memory for VMs (4GB++)
Issue #2338
2017-05-31 13:16:08 +02:00
Alexander Boettcher
106a0db664 vbox5: update to 5.1.22
Issue #2338
2017-05-31 13:16:02 +02:00
Alexander Boettcher
b403bd9d3e vbox5: fix memory allocation by VMM
This is a fixup of c782966 "vbox5: track memory allocation by VMM".

Issue #2338
2017-05-31 13:16:00 +02:00
Alexander Boettcher
800f9d1e44 vbox5: enable xhci model
Issue #2338
2017-05-31 13:15:59 +02:00
Alexander Boettcher
a19662abc7 vbox5: update to 5.1.18
Issue #2338
2017-03-24 16:20:00 +01:00
Alexander Boettcher
c782966aea vbox5: track memory allocation by VMM
- avoids memory leakage, especially during VM re-starts

Issue #2338
2017-03-24 16:19:59 +01:00
Alexander Boettcher
a5c70244bf vbox4/5: fix tr TSS_BUSY_FLAG handling
Fixes #2337
2017-03-24 16:19:58 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Norman Feske
d1df1dbd87 libc: API transition (fix deprecated warnings)
Issue #1987
2017-02-07 11:12:24 +01:00
Alexander Boettcher
0a32fcf4e0 vbox: avoid using deprecated env()
Issue #1987
2017-01-13 13:07:08 +01:00
Alexander Boettcher
d3d4381128 nova: support to run VBox vCPUs within same PD
Issue #2173
2016-11-30 13:38:06 +01:00
Norman Feske
b44f0554bd Adapt high-level components to new parent API
This patch adjusts the various users of the 'Child' API to the changes
on the account of the new non-blocking parent interface. It also removes
the use of the no-longer-available 'Connection::KEEP_OPEN' feature.

With the adjustment, we took the opportunity to redesign several
components to fit the non-blocking execution model much better, in
particular the demo applications.

Issue #2120
2016-11-30 13:37:03 +01:00
Alexander Boettcher
f4a7223bbf vbox: update to 5.1.8
Issue #2059
2016-11-25 15:27:29 +01:00
Alexander Boettcher
08185e962f vbox: better lapic tpr support
Fixes #2110
2016-10-21 12:39:31 +02:00
Alexander Boettcher
a8495a0dfe vbox: use emt thread names
- eases debugging on smp setups

Issue #2110
2016-10-21 12:39:31 +02:00
Alexander Boettcher
14ef7a5312 vbox: support timeouts for GVMM_SCHED_HALT
Issue #2110
2016-10-21 12:39:31 +02:00
Norman Feske
e370e08e01 Define Genode::size_t as unsigned long
Fixes #2105
2016-10-21 12:39:29 +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
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