Commit Graph

108 Commits

Author SHA1 Message Date
Alexander Boettcher e5eb1000c7 nova: remove obsolete parts of documentation 2016-02-26 12:19:25 +01:00
Alexander Boettcher f572cf8a05 nova: stop submitting signals on dead sm caps
Fixes #1877
2016-02-05 10:57:04 +01:00
Alexander Boettcher 7598f09295 nova: check for valid platform_pd pointer 2016-01-26 16:20:38 +01:00
Alexander Boettcher a258caa7ab nova: propagate bdf for assign_pci properly
Now, the right PCI bus:device:function (BDF) is reported to the kernel
during assign_pci syscall - beforehand it was ever 0:0.0. The BDF is
needed to lookup the correct DMAR unit the kernel has to configure. This
was revealed as the DMAR unit for Intel graphics on x201 is not the same
as for all other PCI devices we have drivers for on this platform.

Fixes #1848
2016-01-13 14:57:02 +01:00
Alexander Boettcher 1d5aa4ca7e nova: avoid warnings because of oom handling
Use kernel branch which is more accurate in accounting memory, which avoids
kernel messages of following form:

[0] warning: insufficient resources ...

Fixes #1830
2016-01-08 14:37:57 +01:00
Alexander Boettcher 7ee3e98551 nova: update kernel to fix assertion
Some special pages (0-page, 1-page) in the kernel must not be freed up
during PD destruction.

Fixes #1828
2015-12-18 15:04:25 +01:00
Alexander Boettcher a73c6470f6 nova: handle hip/mb memory region of size 0
Fixes #1814
2015-12-10 13:16:28 +01:00
Alexander Boettcher 1aa6a2a4a1 nova: fix kernel freezing
Fixes #1815
2015-12-10 13:16:28 +01:00
Alexander Boettcher 5b376188da nova: disable super pages for DMAR units 2015-11-29 18:17:09 +01:00
Alexander Boettcher 18130e3120 nova: limit user virtual address space on 64bit 2015-11-29 18:17:08 +01:00
Alexander Boettcher f92a6a9594 nova: use kernel with DMAR quirk for Lenovo X250
Issue #1764
2015-11-29 18:17:08 +01:00
Alexander Boettcher 7857e830a3 nova: fix write-combing support
Issue #1764
2015-11-29 18:17:08 +01:00
Christian Prochaska 6bf4fd3340 nova: 64-bit guest support
Issue #1791
2015-11-29 18:17:06 +01:00
Alexander Boettcher 9ada3d3178 nova: sanity check parent pd assignments
Issue #1778
2015-11-18 12:22:09 +01:00
Alexander Boettcher 4b6b759739 nova: handle dissolve of not-activated entrypoints
Dissolve calls on not-yet-activated entrypoints will block forever in the
portal cleanup call without this commit.

Issue #1778
2015-11-18 12:22:08 +01:00
Alexander Boettcher eb236a1a10 nova: re-add server object IPC cleanup call
Accidentally removed by #1658. We need to make the cleanup call for server
objects - otherwise we may get in capability identifier re-use trouble.

Issue #1778
2015-11-18 12:22:08 +01:00
Alexander Boettcher 91b69edb72 nova: adjust kernel warning/error messages
- extend one overmap message case
- show by default more error messages

Issue #1779
2015-11-18 12:22:08 +01:00
Alexander Boettcher 5c63f7003e nova: evalute pending irqs si->sm association
Fixes ps/2 driver bring-up if already some irqs are pending but not delivered
to the Genode signal(Nova semaphore) - reported by @nfeske.

Fixes #1779
2015-11-18 12:22:08 +01:00
Christian Helmuth 9730c7e333 base-nova: cleanup specific Rm_session_client
- Align implementation to the current generic implementation
- Document NOVA-specific implementation of dataspace() (as in the
  original commit message)
2015-11-04 14:37:55 +01:00
Alexander Boettcher ffbbf69959 nova: update kernel branch to avoid tlb issues
Following page fault sympton in core gets fixed:

PAGE-FAULT IN CORE (WRITE pf_addr=1000000 pf_ip=14361c from 00 <NULL>)

stack pointer 0xa01fec30, qualifiers 0x6 irUWp

faulter utcb a01ff000, last message item count 1

0 - type=1 rights=0x3 region=0x1000000+0x1000000 hotspot 0(801) - delegated

   1 a01fec30 0014361c
   2 a01fec68 001401d5
2015-10-28 15:06:23 +01:00
Alexander Boettcher d6bae1a9a3 nova: speedup clearing dataspace in core 2015-10-28 15:06:23 +01:00
Alexander Boettcher ceb04d3c11 nova: avoid race in pager_object destruction
Don't skip the cleanup call if a pager object is marked as blocked.

It happens that the pager_object is in destruction but it is also used
concurrently by the pager thread. The pager thread handling code may set the
pager object to blocked but still uses the pointer to the pager object. Avoid
locking at the state of the pager object and make the cleanup call everytime.

Error output looks like this, where the pf_ip is within

  void Pager_object::_page_fault_handler(addr_t pager_obj)

method and the pf_addr is the stale pointer to the already released pager_object.

no RM attachment (READ pf_addr=xxx pf_ip=xxx from 00 <NULL>)
static void Genode::Pager_object::_page_fault_handler(Genode::addr_t): page fault, thread '<NULL>', cpu x, ip=xxx, fault address=xxx

PAGE-FAULT IN CORE (READ pf_addr=b10e0090 pf_ip=132dbc from 00 <NULL>)
2015-10-28 15:06:22 +01:00
Alexander Boettcher 6c30bf2667 nova: interpret write page fault correctly
Fixes #1722
2015-10-09 16:38:48 +02:00
Alexander Boettcher 2e62543fdb nova: use remote revoke
Fixes #1733
2015-10-09 16:38:48 +02:00
Alexander Boettcher c0e88ec69e nova: adjust kernel quota calculation
Too less memory quota for a PD may be calculated, which leads to too early
punishment for a Genode process.

Discovered during Turmvilla scenario #1552 and issue #1733.
2015-10-09 16:38:47 +02:00
Alexander Boettcher c7195c8652 nova: sanitize cpu during pager assignment
Additionally print warnings about unavailable CPUs if they are tried to be
used during pager object setup.

Discovered during Turmvilla scenario #1552 and issue #1733.
2015-10-09 16:38:47 +02:00
Alexander Boettcher d7da035115 nova: sanitize priority parameters
threads with prio 0 will not be started and would fail silently.
Happened on Turmvilla for the USBProxy thread in virtualbox.

Discovered during Turmvilla scenario #1552 and issue #1733.
2015-10-09 16:38:47 +02:00
Alexander Boettcher 70a3bb7465 nova: avoid syscall on invalid signal capability
Reduces kernel log message noise when running on kernel-debug branch.
Additionally add a more verbose core message.

Discovered during Turmvilla scenario #1552 and issue #1733.
2015-10-09 16:38:46 +02:00
Alexander Boettcher 94f64ef464 nova: avoid sc_ctrl syscalls on invalid caps
Avoids kernel log messages if TRACE_ERROR is enabled in kernel.

Discovered during Turmvilla scenario #1552 and issue #1733.
2015-10-09 16:38:46 +02:00
Alexander Boettcher ae12f04354 nova: avoid deadlocks by self-destructing threads
Issue #1687
2015-10-06 12:18:50 +02:00
Alexander Boettcher ad24b25af0 nova: avoid buddy allocator assertion in kernel
Fixes #1672
2015-09-30 15:48:11 +02:00
Christian Helmuth 985c01116b nova: PIC compatible syscall_5
Addressing must be PC-relative, so adapt the approach from the other
nova_x86_32 syscall bindings (description by @ssumpf):

  Use call to push the current IP on the stack and add the distance of
  label 0 and label 1 in order to determine the return address, which
  NOVA requires in edx.

The bug only showed up with "-O0" in libc.lib.so in form of a unwanted
text relocation.

Fixes #1721
2015-09-30 15:48:10 +02:00
Stefan Kalkowski b585583ec7 core: do not destroy in object pool's apply scope
Destroying an object within the scope of a lambda/functor executed
in the object pool's apply function leads potentially to memory corruption.
Within the scope the corresponding object is locked and unlocked when
leaving the scope. Therefore, it is illegal to free the object's memory meanwhile.
This commit eliminates several places in core that destroyed wrongly in
the object pool's scope.

Fix #1713
2015-09-30 12:20:40 +02:00
Stefan Kalkowski ccb968ff7d safeguard the synchronized allocator template
* Move the Synced_interface from os -> base
* Align the naming of "synchronized" helpers to "Synced_*"
* Move Synced_range_allocator to core's private headers
* Remove the raw() and lock() members from Synced_allocator and
  Synced_range_allocator, and re-use the Synced_interface for them
* Make core's Mapped_mem_allocator a friend class of Synced_range_allocator
  to enable the needed "unsafe" access of its physical and virtual allocators

Fix #1697
2015-09-30 12:20:39 +02:00
Stefan Kalkowski ed52d5a211 Introduce 'spec' subdirectories to outline aspects
Instead of holding SPEC-variable dependent files and directories inline
within the repository structure, move them into 'spec' subdirectories
at the corresponding levels, e.g.:

  repos/base/include/spec
  repos/base/mk/spec
  repos/base/lib/mk/spec
  repos/base/src/core/spec
  ...

Moreover, this commit removes the 'platform' directories. That term was
used in an overloaded sense. All SPEC-relative 'platform' directories are
now named 'spec'. Other files, like for instance those related to the
kernel/architecture specific startup library, where moved from 'platform'
directories to explicit, more meaningful places like e.g.: 'src/lib/startup'.

Fix #1673
2015-09-16 13:58:50 +02:00
Stefan Kalkowski 458b4d6fc4 base: redesign object pool using lambda interface
Instead of returning pointers to locked objects via a lookup function,
the new object pool implementation restricts object access to
functors resp. lambda expressions that are applied to the objects
within the pool itself.

Fix #884
Fix #1658
2015-09-09 15:14:28 +02:00
Alexander Boettcher 6776d6c9a8 nova: extend platform test by PAT test
Issue #1566
2015-08-31 09:09:22 +02:00
Alexander Boettcher 0f2c2a675a nova: support write combining
Fixes #1566
2015-08-31 09:09:22 +02:00
Alexander Boettcher b438181188 nova: use updated r9 kernel branch
Fixes a kernel regression (because of using builtin_retrun_address)
introduced by the out-of-memory commits.

Issue #1601
2015-08-27 12:02:16 +02:00
Alexander Boettcher 9a326bed2d nova: revoke unused caps after IPC
Fix issue introduced during #905
2015-08-21 11:00:58 +02:00
Alexander Boettcher df662cc2f3 nova: use kernel branch with quota handling
Fixes #1601
2015-08-21 10:59:45 +02:00
Stefan Kalkowski eafe5e81e3 core: unify and simplify paging code (Fix #1641)
For most platforms except of NOVA a distinction between pager entrypoint
and pager activation is not needed, and only exists due to historical
reasons. Moreover, the pager thread's execution path is almost identical
between most platforms excluding NOVA, HW, and Fisco.OC. Therefore,
this commit unifies the pager loop for the other platforms, and removes
the pager activation class.
2015-08-21 10:58:59 +02:00
Christian Prochaska 2337dc03f4 nova: use branch supporting changing PDPTE by VMM
Fixes #1637
2015-08-21 10:58:59 +02:00
Alexander Boettcher f87c573695 nova: increase default capability selector count
The reference count get increase to use 2 bytes, so we need the double amount
of selectors as before.

Additionally print a message if we run out of capabilities in a server. Since
our rpc framework is now clever enough to detect that for a printf we don't
need to setup a receive window, we may use a printf instead of a die call.
Eases debugging.

Issue #1601
2015-08-21 10:58:58 +02:00
Alexander Boettcher c6943d494b nova: extend platform test to provoke kernel panic
Showcasing the out of memory kernel issue.

One test triggers oom during memory delegation when talking to core pager
thread. Two other test trigger oom during capability delegation in a
server/client scenario for send and reply phase separately.

Issue #1601
2015-08-21 10:58:58 +02:00
Martin Stein f3e76b3e9a base: use BDA header in base-nova like base-hw
Moves the Bios Data Area header from base-hw to base. Modifies the
base-nova core console that it uses the header as replacement for
the previous BDA bit logic.

Ref #1625
2015-07-21 09:30:12 +02:00
Alexander Boettcher 0b019d0508 base: move x86 uart driver from nova to base
So it can be reused by base-hw-x86 instead of re-writing it.

Fixes #1403
2015-07-21 09:30:11 +02:00
Stefan Kalkowski 0f05fa6fd4 base: resolve dead lock in weak pointer templates
This commit eliminates the mutual interlaced taking of destruction lock,
list lock and weak pointer locks that could lead to a dead-lock situation
when a lock pointer was tried to construct while a weak object is in
destruction progress.
Now, all weak pointers are invalidated and dequeued at the very
beginning of the weak object's destruction. Moreover, before a weak pointer
gets invalidated during destruction of a weak object, it gets dequeued, and
the list lock is freed again to avoid the former dead-lock.

Fix #1607
2015-07-21 09:30:04 +02:00
Alexander Boettcher c42e770384 detach ds from all rm sessions before destruction
Fixes #1617
2015-07-21 09:28:24 +02:00
Alexander Boettcher 9506c89f88 nova: fix memory leaks / invariant TSCs
- free up kernel memory of empty slabs (if already one empty slab is in
  place)
- free up more page table entries
- handle CPUs with invariant TSCs gracefully

  Genode/Nova running on CPUs without the invariant TSC feature may seem
  to 'hang'. The referenced commit of the nova branch fixes the issue
  for some older Intel CPUs.

Fixes #1615
2015-07-07 19:48:07 +02:00