Commit Graph

231 Commits

Author SHA1 Message Date
Alexander Boettcher 773b0ecc3d noux: add verbose config parameter
Explicitly enable verbose output if required.
2013-08-22 15:13:12 +02:00
Alexander Boettcher 6dd6525b48 seoul: support headless mode
+ run kernelbuild in headless mode, output dumped via serial output
2013-08-22 11:33:10 +02:00
Alexander Boettcher 6d5a66d8e7 seoul: refresh console only if required
Speeds up kernelbuild by over 35% !!!
2013-08-22 11:33:00 +02:00
Alexander Boettcher ed3187aa74 seoul: add invalid guest state handling 2013-08-15 09:22:48 +02:00
Alexander Boettcher 4474e9d6d6 seoul: add intel82576vf for 64bit 2013-08-15 09:22:48 +02:00
Alexander Boettcher 009adff441 seoul: fix region conflicts
At least 64bit Seoul dies with Region_conflict reliable and reproducible.

When during startup of Seoul some Genode code (caused by executing some
constructors) try to attach a region, the region manager code in the rm_session
will try to place the attachment at the smallest large enough aligned free
virtual region.

For now, I observed one attachment causing trouble (but not knowing who causes
this - it does also not really matter). The questionable region is 0x4000 of
size for 32bit and 0x8000 of size for 64bit.

To steer the region manager a bit, we try now following trick:

With this commit the load address of the binary for 32 and 64 bit is moved
close to the end of the virtual address space, but leaving enough free virtual
space for the above observed attachment (and a bit more).

The region manager code now will try to fill up the virtual region behind
the binary up to the end of the virtual address space, effectively letting the
lower virtual region untouched - hopefully.

Works for now, but it will break again - for sure.

Fixes #519
2013-08-15 09:22:48 +02:00
Norman Feske a2b15349fd base: Add tracing support to CPU session interface 2013-08-13 17:27:40 +02:00
Christian Prochaska 7b54eaaee1 libports: add Qt5
Fixes #345.
2013-08-13 17:27:40 +02:00
Josef Söntgen 9b28395f0d noux: construct new child only if binary is valid
If a script is executed which uses a interpreter that does not exist the
construction of the child fails and potentially leaks memory because the
wrong delete operator is called.
Therefore the binary dataspace of the script and the binary dataspace of
the interpreter are now checked before a new child will be created.

Fixes #812.
2013-08-13 17:08:26 +02:00
Norman Feske 6d837c9e26 Attach affinity information to session requests
This patch extends the 'Parent::session()' and 'Root::session()'
functions with an additional 'affinity' parameter, which is inteded to
express the preferred affinity of the new session. For CPU sessions
provided by core, the values will be used to select the set of CPUs
assigned to the CPU session. For other services, the session affinity
information can be utilized to optimize the locality of the server
thread with the client. For example, to enable the IRQ session to route
an IRQ to the CPU core on which the corresponding device driver (the IRQ
client) is running.
2013-08-13 17:08:25 +02:00
Norman Feske 5fe29e8e4a Express affinities via Cartesian coordinates
This patch introduces new types for expressing CPU affinities. Instead
of dealing with physical CPU numbers, affinities are expressed as
rectangles in a grid of virtual CPU nodes. This clears the way to
conveniently assign sets of adjacent CPUs to subsystems, each of them
managing their respective viewport of the coordinate space.

By using 2D Cartesian coordinates, the locality of CPU nodes can be
modeled for different topologies such as SMP (simple Nx1 grid), grids of
NUMA nodes, or ring topologies.
2013-08-13 17:08:24 +02:00
Josef Söntgen 5cf4e323c5 Noux: add noux-pkg/grep 2013-08-13 17:08:22 +02:00
Josef Söntgen 2aafc9d4e6 Noux: add noux-pkg/sed 2013-08-13 17:08:22 +02:00
Norman Feske 956cab5fdb noux: Keep track of how dataspaces are used
This patch eliminates the "no attachment at..." warnings, which
were caused by a use-after-free problem of dataspaces. When a
dataspace was destroyed, the users of the dataspace were not
informed and therefore could not revert possible attachments to
RM sessions. The fix introduces a callback mechanism that allows
dataspace users (i.e., RM regions) to register for the event that
a dataspace vanishes.

The following types of dataspaces are handled:
* RAM dataspaces
* ROM dataspaces
* The process binary
* The binary of the dynamic linker
* Args dataspace
* Sysio dataspace
* Env dataspace
* managed RM dataspaces

The handling of ROM dataspaces is still not complete. When forking,
the ROM dataspace of the parent process gets just reused without
creating proper meta data ('Dataspace_info') for the forked process.
Similar issues might arise from other special dataspaces (e.g.,
args, env, sysio).

This patch removes all "no attachment at..." warnings except for
one (an attachment at 0).

Issue #485
2013-08-06 17:40:10 +02:00
Christian Prochaska dc177e037d bash: don't call 'check_dev_tty()'
The 'check_dev_tty()' function calls 'ttyname()', which calls the pthread
stub function 'pthread_main_np()', which prints a 'not implemented'
message. Calling 'check_dev_tty()' doesn't seem to be necessary, so this
patch removes the call.

Issue #815.
2013-08-05 15:18:03 +02:00
Alexander Boettcher 01d267e551 noux: calculate rm::attach parameters correctly
Previous commit denies the creation of regions larger then the dataspace.
Noux does it by setting the default size to the dataspace size without
subtracting the offset.

Fixes #591
2013-08-05 15:15:56 +02:00
Alexander Boettcher b1cb1ceaf9 seoul: fix disc boot
Additionally use the block session interface asynchronously to let the VM
continue execution.

Fixes #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher b9449a4279 seoul: fix console output in vga text mode
Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher b4283c9121 seoul: use utcb guard
Forgetting to restore the old utcb content results in hard to debug bugs.
Save only the amount of word items which are actually on the UTCB.

Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher b9e48e94ec seoul: catch exception during block session creation
Leads to invalid utcb state and later on to invalid vCPU state.

Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher 8afcbce01e seoul: implement heap_free
Avoids the message

cxx: operator delete (void *) called - not implemented. A working implementation is available in the 'stdcxx' library

during a " new ..." which causes exceptions. Happens for seoul in disk.cc

Issue #806
2013-07-18 11:55:17 +02:00
Josef Söntgen 29b8370f73 noux: add local cpu and ram service
Use a local CPU service to prevent a redirection to noux' parent (in
this case init which does not know noux' local capabilities).

Fixes #791.
2013-07-05 12:37:42 +02:00
Alexander Boettcher e35dbd3353 run: add TCP_MAERTS to netperf test
MAERTS is STREAM backwards and effectively lets the netserver sends the packets
to the netperf client. So, TCP_STREAM measure the receive performance of the
lwIP stack on Genode and TCP_MAERTS the send performance of the lwIP stack
on Genode.
2013-06-26 17:41:54 +02:00
Alexander Boettcher 9f2097669a netperf: add support to timeout if host went away 2013-06-25 17:42:42 +02:00
Norman Feske 33c5469b92 vancouver: Improved PS/2 mouse backend
The previous version of the PS/2 mouse backend manged mouse motion
events in a strange way, effectively throwing away most information
about the motion vector. Furthermore, the tracking of the mouse-button
states were missing. So drag-and-drop in a guest OS won't work. The new
version fixes those issues. For the transformation of input events to
PS/2 packets, a the Genode::Register facility is used. This greatly
simplifies the code.
2013-05-20 10:54:59 +02:00
Norman Feske 89d0e68983 vancouver: Improve locking scheme
This patch replaces the error-prone manual locking with the use of the
'Synced_interface' for the motherboard and the VCPU dispatcher. It also
removes all globally visible locks. Locks are now explicitly passed to
subsystems when needed.
2013-05-17 12:05:07 +02:00
Norman Feske c48a7aa27f vancouver: Avoid busy startup synchronizations 2013-05-17 12:05:00 +02:00
Norman Feske ba5906e425 vancouver: handle CPUID 0x40000000
This instruction is issued by Linux when the KVM guest support is
compiled in. We have to return deterministic values to let the Linux
kernel survive.
2013-05-17 12:04:40 +02:00
Alexander Boettcher 5bbf1f7eea netperf: use omni and rely on SO_RCVBUF available 2013-05-10 11:16:11 +02:00
Alexander Boettcher 86e428cd64 port of netperf server to native Genode 2013-05-10 11:16:11 +02:00
Christian Prochaska ac8633e0e9 Update Qt to version 4.8.4
Fixes #703.
2013-05-06 18:50:35 +02:00
Markus Partheymüller 4bb0a8231e vancouver: calculate STACK_SIZE from addr_t size.
This is necessary on 64bit host.
2013-03-18 13:10:29 +01:00
Alexander Boettcher e85e11bec1 vmm: try to reserve lower virtual address space
It's not guaranteed to be robust and will break in the future - I told you.

Related to issue #365, issue #519, issue #666
2013-03-18 13:10:03 +01:00
Markus Partheymüller b8eb9b534d Switch to Seoul VMM repository instead of NUL
In this version of the transition the Hip structure from Genode is reused,
@nfeskes seoul_libc_support is used for the string functions and the
nul/config.h is replaced by just using a constant value in the one place where
the file was needed.

Related to #666.
2013-03-18 13:09:45 +01:00
Norman Feske fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +01:00
Norman Feske b1f63e3356 Turn 'platform_env.h' into a private header
This patch removes 'platform_env.h' from the public API headers because
this header was not part of the API anyway.
2013-02-14 13:23:36 +01:00
Norman Feske 4b8f991f52 vancouver: coding style 2013-02-13 15:09:23 +01:00
Alexander Boettcher b0d23abaa7 vancouver: keep one cap_session
Cap_sessions and portals created via the sessions are nowadays freed up during
c++ object destruction. Because of that the exception portals for a vCPU thread
get be revoked as soon as the cap_session object leaves its scope.

Keep one cap_session for the whole lifetime of the vmm to avoid disappearing
exception portals.

Related to #582.
2013-02-13 15:09:23 +01:00
Markus Partheymueller 3a533779e4 vancouver: RTC support 2013-02-13 15:09:23 +01:00
Markus Partheymueller cbf4a7b0c3 vancouver: Disk support
Vancouver can now assign block devices to guests using the Block
interface. The machine has to be configured to use a specified drive,
which could be theoretically routed to different partitions or services
via policy definitions. Currently the USB driver only supports one
device. Genode's AHCI driver is untested.

If the session quota is too low, random pagefaults can occur on the
stack.

According to @Nils-TUD, it is necessary to protect the DiskCommit
messages with a lock against deadlocking with the timer. Observations
showed that this mitigates some problems with Gentoo on real hardware.
2013-02-13 15:09:23 +01:00
Markus Partheymueller 1c447d98e9 vancouver: Network support
Vancouver is now able to use the Intel 82576 device model from NUL to
give VMs access to the network via the nic_bridge service. In order to
integrate the device model, it had to be renamed to i82576 due to XML
limitations. This is done by a patch applied via the 'make prepare'
mechanism.

Although current network card models in Vancouver panic if they can't
get a MAC address, the OP_GET_MAC hostop now fails gracefully in the
case where no nic_drv or nic_bridge is available.
2013-02-13 15:09:22 +01:00
Markus Partheymueller 1ca0a66ea9 vancouver: Console support
The guest VM can now be provided with a framebuffer and keyboard input.

Mouse positioning of the guest is a problem. Because the PS2 model applies
some calculations to the movement values, it can happen that overflows mess
with the cursor.  Therefore the handling was changed and only movements of 1
and -1 are sent.  Since absolute positioning is not possible with PS2, we
have to live with this limitation until USB HID is implemented.

For the framebuffer size in Vancouver the configuration value in the machine
XML node is used.  It is possible to map the corresponding memory area
directly to the guest, regardless if it is from nitpicker,
liquid_framebuffer or vesa_drv.  The guest is provided with two modes (text
mode 3 and graphics mode 0x114 (0x314 in Linux).

Pressing LWIN+END while a VM has focus resets the virtual machine. Also,
RESET and DEBUG key presses will not be forwarded to the VM anymore.
It is possible to dump a VM's state by pressing LWIN+INS keys.

The text console is able to detect idle mode, unmaps the buffer from the
guest and stops interpreting.  Upon the next pagefault in this area, it
resumes operation again.  The code uses a simple checksum mechanism instead
of a large buffer and memcmp to detect an idle text console.  False
positives don't matter very much.
2013-02-13 15:09:22 +01:00
Markus Partheymueller 2d2373a03b vancouver: Timer support
This required usleep to be added to the timer interface.
2013-02-13 15:09:22 +01:00
Markus Partheymueller aea0a7284f vancouver: Inline module support 2013-02-12 21:51:18 +01:00
Markus Partheymueller 5c886b4962 vancouver: Nested events during EPT violation
When an EPT/NPT fault occurs during IDT vectoring, the original event must
be reinjected.  Additionally we may have to inject an IRQ window if another
event is already pending.
2013-02-12 21:51:10 +01:00
Markus Partheymueller 1434d0948a vancouver: VMX support, improved SVM portals 2013-02-12 21:50:48 +01:00
Markus Partheymueller 14307c778a Add -std=gnu++11 flag to Vancouver Makefile
Most recent upstream version need this to be build successfully.
2013-02-12 21:31:44 +01:00
Alexander Boettcher 9453d319cb base: add remove_client to rm_session
Fixes #13
2013-02-11 12:01:25 +01:00
Christian Prochaska 49206d7cf6 Arora: disable 'not implemented' messages
This patch disables the '_sigprocmask called, not implemented' messages.

Fixes #623.
2013-01-21 11:40:38 +01:00
Christian Prochaska 36a37b9866 Arora demo: make Nitpicker plugin work
Fixes #620.
2013-01-16 16:06:02 +01:00