Commit Graph

33 Commits

Author SHA1 Message Date
Alexander Boettcher ed3187aa74 seoul: add invalid guest state handling 2013-08-15 09:22:48 +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 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 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
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 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
Alexander Boettcher 5fcdd61a13 NOVA: fix placement of EC cap for recall
Put EC cap next to SM cap of Vcpu_dispatcher and not of the Vcpu.

Thanks @parthy for pointing out the issue.
2012-08-22 09:51:29 +02:00
Alexander Boettcher 125d274bc7 NOVA: fix locking in vancouver
Reported by @parthy.
2012-08-22 09:51:28 +02:00
Alexander Boettcher a7235d2411 NOVA: Use Genode interfaces to bootstrap Vancouver
Since no kernel objects can be created anymore outside Genode::core,
the Vancouver port must be adjusted to use solely the Genode interfaces.

The Vcpu_dispatcher creates all portals via the cpu_session interface and
uses the feature to setup a specific receive window during a IPC (the
cap_session::alloc IPC) to place to be received/to be mapped capability
(virtualization exception portal) at the designed indexes.

The actual vCPU thread extends from a normal Genode::Thread and extends it
by specific vCPU requirements, which are a larger exception base window and
the need by Vancouver to place the SM and EC cap at indexes next to each other.

Fixes #316
2012-08-09 11:09:42 +02:00
Alexander Boettcher 33a2f54413 NOVA: Vancouver - establish recall portal
Fixes #283
2012-07-19 21:05:51 +02:00
Alexander Boettcher ae6257dce1 Use NOVA microkernel from github, add 64bit
Use git to get recent kernels from github. Adjust NOVA patch to compile
with recent github version. Patch and use makefile of NOVA microkernel
to avoid duplicated (and outdated) makefile in Genode

Furthermore, this patch adds support for using NOVA on x86_64. The
generic part of the syscall bindings has been moved to
'base-nova/include/nova/syscall-generic.h'. The 32/64-bit specific
parts are located at 'base-nova/include/32bit/nova/syscalls.h' and
'base-nova/include/64bit/nova/syscalls.h' respectively.

On x86_64, the run environment boots qemu using the Pulsar boot loader
because GRUB legacy does not support booting 64bit ELF executables.

In addition to the NOVA-specific changes in base-nova, this patch
rectifies compile-time warnings or build errors in the 'ports' and
'libports' repositories that are related to NOVA x86_64 (i.e., Vancouver
builds for 32bit only and needed an adaptation to NOVAs changed
bindings)

Fixes #233, fixes #234
2012-06-20 19:44:07 +02:00
Norman Feske 08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Genode Labs da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00