Commit Graph

57 Commits

Author SHA1 Message Date
Alexander Boettcher f00195e26d seoul: support to run VM outside VMM's PD
Issue #949

Related to issue #808 - one way to nearly double the maximum VM size for
VMs on 32bit Genode/Nova host if decreased performance is acceptable.
2013-11-25 12:12:31 +01:00
Norman Feske 1df48b8331 ports: common utilities for building VMMs on NOVA
To ease the creation of custom virtual machine monitors on top of
NOVA, this patch moves generic utilities from vancouver resp. seoul to the
public include location 'ports/include/vmm'. As a nice side effect,
this change simplifies 'vancouver/main.cc'.

Issue #949
2013-11-25 12:12:31 +01:00
Alexander Boettcher 0d8abab3ee nova: remove cap_sel - use cap_map
Fixes #905
2013-11-18 11:01:46 +01:00
Alexander Boettcher 69263f6593 seoul: increase memory for network with bridge
Fixes #918
2013-10-22 08:00:16 +02:00
Martin Stein ee5d213c1f base: do not allow unnamed threads
fix #901
2013-10-22 08:00:07 +02:00
Alexander Boettcher dd2e006309 nova: request native ec cap via pager
Prerequisite to get rid of the base-nova special native_cap method in
cpu_session.

Vancouver/Seoul bootstrap code gets also much simpler.

Issue #478
2013-10-16 09:26:09 +02:00
Norman Feske f1dcaa746d Enable C++11 by default 2013-09-23 14:26:01 +02:00
Norman Feske fa34b79b2c nitpicker: Add const qualifiers 2013-09-23 14:25:58 +02:00
Norman Feske 8243329ad4 os: Move Genode::Config into 'config' library
Originally, the convenience utility for accessing a process
configuration came in the form of a header file. But this causes
aliasing problems if multiple compilation units access the config while
the configuration gets dynamically updated. Moving the implementation of
the accessor to the singleton object into a library solves those
problems.
2013-09-23 14:25:58 +02:00
Norman Feske 47bb7da22f seoul: Improve boot-module error messages 2013-09-05 12:28:54 +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
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
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
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 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
Norman Feske 73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Martin Stein 05f5999e71 cpu_session: Access thread state by value 2012-11-23 12:20:22 +01:00
Alexander Boettcher 2f460b4638 Vancouver: use github version
Fixes #361
2012-10-08 15:08:02 +02:00
Alexander Boettcher 8af582fac2 Vancouver: catch exception during module loading
Catch any kind of exception we get from the rm_session during module
loading. Panic if modules can't be processed (too big images and so on)
2012-09-24 09:17:59 +02:00
Alexander Boettcher f5efbff19c Vancouver: map solely requested memory region
Don't map all memory of the VM at once, instead only the one permitted
by the memory model. Otherwise memory regions get mapped which must not,
where each instruction and memory access have to cause an exception in
order to emulate it step by step.
2012-09-24 09:17:59 +02:00
Alexander Boettcher 315a8437e3 Vancouver: make debug output configurable 2012-09-24 09:17:59 +02:00
Alexander Boettcher 2fd68105a3 Vancouver: Make sure context area gets reserved 2012-09-24 09:17:58 +02:00
Alexander Boettcher 5566446211 Vancouver: dimension VM size dynamically 2012-09-24 09:17:58 +02:00
Alexander Boettcher 79b0a7a2c9 Vancouver: zero initialize memory of the heap
Classes in Vancouver expect to get zero initialised memory when using memory
from the heap. Some classes don't initialize member variables as they should
do.
2012-09-24 09:17:58 +02:00
Alexander Boettcher 0d9e5f2daf Vancouver: Reserve VM memory region early
Reserve memory region for VM as early as possible before any other
memory allocation happens. Otherwise it could happen that heap
allocations will use part of the virtual region we require for the VM.
2012-09-24 09:17:58 +02:00
Alexander Boettcher 3b0e4372fe NOVA: setup all exception handlers of a thread 2012-08-30 10:42:38 +02:00