Commit Graph

79 Commits

Author SHA1 Message Date
Emery Hemingway 2b8c1af9e0 remove 'filename' from ROM sesion args
Conveying the ROM filename as the final label element simplifies
routing policy and session construction.

Annotations by nfeske:

This commit also changes the ROM session to use base/log.h instead of
base/printf.h, which produced build error of VirtualBox because the
vbox headers have a '#define Log', which collides with the content of
base/log.h. Hence, this commit has to take precautions to resolve this
conflict.

The commit alse refines the previous session-label change by adding a
new 'Session_label::prefix' method and removing the use of 'char const *'
from this part of the API.

Fixes #1787
2016-07-11 13:24:36 +02:00
Norman Feske 030301d046 gdb_monitor: remove superfluous check
The check for preparation of gdb is now done by the ports mechanism.
2016-07-11 12:06:50 +02:00
Adrian-Ken Rueegsegger 6d28ea1c5c vbox: Add platform-specific setup machine hook
Add call to genode_setup_machine prior to machine registration in
frontend machine setup code. This enables platform-specific adjustments
to the machine instance.

The new function is used on hw_x86_64_muen to clamp the processor count
to 1 as multiple virtual CPUs are not supported on this platform.

Issue #2016
2016-07-06 13:02:56 +02:00
Adrian-Ken Rueegsegger e3fbeeb25e vbox: Implement hwaccl support for Muen
* Implement VMMR0_DO_VMMR0_INIT operation for Muen

   - Indicate VT-x support
   - Enable unrestricted guest mode
   - Set CR[0|4] mask to enable masking of guest CR0.[NE,NW,CD] and
     CR4.VMXE bits.

 * Implement VMMR0_DO_GVMM_CREATE_VM on Muen

   Return error if trying to create SMP VM as VMs with multiple CPUs are
   currently not supported on hw_x86_64_muen.

 * Add Muen-specific Mem_region type

   On hw_x86_64_muen the guest memory layout is static, thus regions are
   handed out from an array of memory regions.

   Use sinfo API to calculate the base address of the VM RAM physical
   0x0 region. This allows to dynamically modify the VM RAM size by
   adjusting the Muen policy and Genode vbox files accordingly.

   Zeroize all memory regions apart from VM Ram since Virtualbox expects
   these regions to be cleared.

 * Add Muen subject state struct

   The subject state encompasses the guest VM machine state that is
   transfered between Virtualbox and hardware accelerated execution on
   Muen.

 * Add Muen-specific Vm_handler class
 * Use Vm_handler to run VM
 * Instruct recompiler to flush its code cache
 * Copy the Muen subject state to/from the Vbox PCPUMCTX.
 * Use the VM interruptibility state to inform the recompiler whether
   interrupts are currently inhibited.
 * Explicitly handle control register access

   If a VM-exit occurs due to a control register access, handle it and
   directly continue hardware accelerated execution of guest VM.

   Note: On NOVA control register accesses are handled by the kernel [1].

   [1] - https://github.com/alex-ab/NOVA/blob/master/src/ec_vmx.cpp#L106

 * Reset guest interruptibility state

   Assert that interrupts are not inhibited in the Virtualbox machine
   state and clear Blocking-by-[STI|MOV to SS] guest interruptibility
   flags prior to running a guest VM in hwaccel mode.

 * Set return code depending on exit reason

   Do not unconditionally emulate the next instruction on VM exit. This
   makes sharing the VM FPU state with Virtualbox unnecessary, as FPU
   instructions are not emulated by the recompiler any longer.
   Also, assert that the FPU has not been used by the recompiler

 * Inject pending guest VM interrupts on Muen

   Use mapped subject pending interrupts page of guest VM to perform
   interrupt injection. IRQs are transferred from the Virtualbox trap
   manager state to the pending interrupts region for injection. If an
   IRQ remains pending upon returning to the recompiler, it is copied
   back to the trap manager state and cleared in the subject interrupts
   region.

 * Inform recompiler about changed SYSENTER_[CS|EIP|ESP] values,
   otherwise values set while running the guest VM hardware accelerated
   may get lost.

 * Implement genode_cpu_hz() on Muen

   Determine the CPU frequency dynamically using the sinfo API.

Issue #2016
2016-07-06 13:02:56 +02:00
Adrian-Ken Rueegsegger 738b01d37a vbox: Move pgm to virtualbox-hwaccl library
Issue #2016
2016-07-06 13:02:56 +02:00
Alexander Boettcher 8188e60954 hw_x86: enable building virtualbox
Issue #2016
2016-07-06 13:02:54 +02:00
Alexander Boettcher 4f23e78f10 vbox: add AHCI model
Fixes #2006
2016-06-28 11:09:26 +02:00
Reto Buerki 963ca0e6b5 vbox: Provide implementation of RTErrCOMGet
The generated errmsgvboxcomdata.h is currently empty, but the
'main.e.l.f' log group seems to work for now.
2016-06-22 12:17:18 +02:00
Christian Prochaska 638db70b94 GDB monitor: nova_x86_64 platform support
Fixes #1971
2016-05-23 15:52:49 +02:00
Christian Prochaska ff76e69542 GDB monitor: x86_64 support
General support for the x86_64 architecture.

Fixes #1970
2016-05-23 15:52:49 +02:00
Christian Prochaska 5842b2065e GDB monitor: stability improvements
Fixes #1969
2016-05-23 15:52:49 +02:00
Josef Söntgen 71b621775b vbox: remove USB (OHCI) pass-through support
The usage of the USBProxyDevice is no longer necessary because USB
pass-through is now supported by using the xHCI device model.

Issue #1863.
2016-02-05 10:47:44 +01:00
Josef Söntgen 6a2aa903ca vbox: xHCI device model for USB pass-through
This device model enables USB2 and USB3 device passthrough support
for guests running in VirtualBox. It uses the qemu-usb library.

Fixes #1863.
2016-02-05 10:47:44 +01:00
Christian Prochaska 2c558de891 vbox: 64-bit guest support
Fixes #1791
2015-11-29 18:17:06 +01: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
Josef Söntgen 5be5191645 vbox: enable preliminary audio support
With this commit preliminary audio support in VirtualBox is enabled.
The backend supports playback as well as recording sounds from within
a guest VM. Depending on how the guest configures the device model
the audio output may sound disorted. If the guest uses buffers that
are too small, i.e., 10 ms or less, frequent buffer underruns will
occure.

To get this low-latency one has also to increase vbox' update hz
to 200 (i.e., 5ms).

Fixes #1647.
2015-08-21 11:00:57 +02:00
Christian Prochaska 3a378bb970 libc_noux: remove dependency on 'platform_env.h'
Currently, libc_noux includes the 'base/src/base/env/platform_env.h' file
to be able to reinitialize the environment using the 'Platform_env'
interface. For base-linux, a special version of this file exists and the
inclusion of the generic version in libc_noux causes GCC 4.9 to make wrong
assumptions about the memory layout of the 'Env' object returned by
'Genode::env()'.

This commit moves the reinitialization functions to the 'Env' interface to
avoid the need to include the 'platform_env.h' file in libc_noux.

Fixes #1510
2015-05-26 09:39:47 +02:00
Christian Prochaska 88034ef836 vbox: enable USB (OHCI) pass-through support
The information about connected devices is obtained from a ROM file named
'usb_devices', which is supposed to contain a device list as in the device
report generated by the USB driver (see issue #1506).

A policy for 'report_rom' would look like:

<policy label="vbox -> usb_devices" report="usb_drv -> devices"/>

If the 'usb_devices' ROM file is not available, a warning message gets
printed and VirtualBox continues without USB pass-through support.

The devices to be passed-through need to have a matching device filter in
the '.vbox' file. Example:

<USB>
    <DeviceFilters>
        <DeviceFilter name="USB Scanner" active="true" vendorId="04a9"
                      productId="2220" remote="0"/>
    </DeviceFilters>
</USB>

The feature was tested with HID devices (mouse, keyboard) and a flatbed
scanner. Mass storage devices didn't work correctly (they also didn't work
with VirtualBox on Linux without the closed-source extension pack).

It should be made sure that the USB driver does not try to control the
devices to be passed-through itself, for example, when passing-through
a HID device, the '<hid/>' config option should not be set.

Fixes #1507
2015-05-26 09:39:46 +02:00
Christian Prochaska a4868f8d1d vbox: use interface declarations from 'VirtualBox_XPCOM.h'
Fixes #1499
2015-05-06 12:06:23 +02:00
Christian Prochaska c11b02dfd4 gdb: save generated files in the build directory
Fixes #1435
2015-03-13 12:17:26 +01:00
Alexander Boettcher c8a9b1802e vbox: enable usb support for guests
Fixes #1438
2015-03-13 12:17:23 +01:00
Alexander Boettcher ee996d2280 vbox: enable dumping GuruMeditations messages
This typically is a sign that something went terribly wrong. The information
may help to debug issues.

Issue #1343
2015-01-20 11:23:50 +01:00
Alexander Boettcher 604b831e1e vbox: update to virtualbox 4.3.16
Fixes #1296
2014-11-28 12:02:40 +01:00
Christian Prochaska a06bd8cfe8 GBD: migrate to new ports mechanism
Fixes #1237.
2014-08-22 16:16:40 +02:00
Alexander Boettcher c5380674df vbox: add network support
- support e1000 model by default and add support for pcnet model
- add Genode xml config option to enable network models

Fixes #1201
2014-07-24 10:18:06 +02:00
Christian Helmuth a42a5995cf vbox: enable guest additions
Fixes #1157
2014-05-27 13:45:58 +02:00
Norman Feske 6adbb9e438 ports: migrate to new ports mechanism
Issue #1082
2014-05-27 11:14:43 +02:00
Norman Feske 85a2ebc1c4 libports: migrate to new ports mechanism
Issue #1082
2014-05-27 11:14:42 +02:00
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00