Commit Graph

85 Commits

Author SHA1 Message Date
Christian Prochaska 2df6cd64d4 vbox: implement 'drvNicAsyncIoWakeup()'
Fixes #1893
2016-02-26 11:36:54 +01: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
Sebastian Sumpf b2a1129bd9 vbox: support unaligned mmio writes
Issue #1863
2016-02-05 10:47:43 +01:00
Sebastian Sumpf 716eab21e3 usb_drv: change Usb session and raw driver
- Use 'label' attribute to identify device instead of
  bus/dev and vendor_id/product_id

- Implement release_interface RPC

- Report 'label' as well as 'bus' and 'dev'

- Add policy handling to raw driver (includes reconfiguration
  at runtime)

- Use own memory backing store for large DMA allocations

Issue #1863.
2016-01-27 16:15:34 +01:00
Christian Prochaska 9c31e18a4f vbox: handle EPT violation during event delivery
If the injection of an event causes an EPT violation, the event must be
injected again. This commit implements the reinjection for the case that
the EPT violation can be resolved without involving the recompiler.

Fixes #1798
2015-12-10 13:16:24 +01:00
Christian Prochaska 2c558de891 vbox: 64-bit guest support
Fixes #1791
2015-11-29 18:17:06 +01:00
Norman Feske f655ac31f7 vbox: don't fault if NIC is unavailable
This patch prevents vbox from faulting in the (unexpected) case where
the VM has a network adaptor configured but the NIC session cannot be
opened.
2015-11-27 12:18:52 +01:00
Christian Prochaska a2bb96723a vbox: respond to zero-resized framebuffer 2015-11-27 12:18:52 +01:00
Josef Söntgen be8f16ac3e vbox: use ring buffer in audio backend
Instead of hardcoding the device model configuration use a ring buffer
to gather samples.

Fixes #1767.
2015-11-09 13:08:31 +01:00
Josef Söntgen 5b6fdc96fc vbox: disable rdtsc VM exit
Trapping rdtsc creates a huge load in some guests, e.g. Windows 8.1,
that use this instruction very frequently. This influences audio
playback/recording in a bad way (distorted sounds, …). As a interim
solution disable the virtualization of rdtsc completely. As long
as each guest VM runs on its own CPU core it should be fine as there
should not be that much interference (TSC warping).

That being said, TSC offsetting as well as adjusting within vbox have to
be evaluated.

Fixes #1768.
2015-11-09 13:08:30 +01:00
Christian Prochaska 731a98c266 vbox: decode clipboard content
Fixes #1748
2015-11-04 14:09:25 +01:00
Alexander Boettcher 5aec67d5bb vbox: enable clipboard support"
Fixes #1696
2015-10-09 16:38:48 +02:00
Alexander Boettcher 3f611fe00d pthread: handle self destruction better
Defer destruction of threads which tries to self-destruct. Check an perform
cleanup of such threads during pthread_cancel and pthread_create.

Issue #1687
2015-10-06 12:18:51 +02:00
Alexander Boettcher 6f3e9c12fb vbox: support shutdown of VMM
- send exit signal to parent
- avoid assertion in vbox posix backend

Fixes #1687
2015-10-06 12:18:51 +02:00
Josef Söntgen 2f8b3cfdaf vbox: make I/O port access less noisy
Instead of white-listing floppy controllers, certain SCSI controllers
as well as ISAPnP etc. pp. remove the diagnostics and print each access
if verbose is set.

Fixes #1726.
2015-09-30 15:48:12 +02:00
Josef Söntgen f9a64b663c vbox: replace alarm_timer thread with trigger_once
Instead of using the alarm_timer thread we use our own timer thread
that uses a kernel semaphore on Nova. On all other platforms a timer
connection and trigger_once is used.

Fixes #1727.
2015-09-30 15:48:12 +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
Alexander Boettcher b6c440852b vbox: allocate guest memory in chunks
Fixes #1575
2015-08-31 13:12:52 +02:00
Christian Prochaska 0885ebd5b1 vbox: make interruptibility state check conditional
If the guest is not in an interruptible state when the recall handler is
called, an assertion fails. Since the assertion is only relevant if the
recall handler was called during IRQ injection, it should be moved into
the corresponding conditional block which already has the assertion for
the 'IF' flag.

Fixes #1661
2015-08-27 12:05:18 +02:00
Christian Prochaska 26924c9bcd vbox: let the first EMT thread handle timers
By default, the EMT thread of the last vCPU handles expired timers. When
running VirtualBox with 2 vCPUs, it sporadically happens that the EMT
thread of the second CPU clears an 'interrupt pending' flag for the first
vCPU after changing the state of a timer device model, which is not
expected by our Genode-specific code (failed assertion '!_irq_win' in the
recall handler).

The problem did not occur yet when letting the EMT thread of the first
vCPU handle the expired timers, which is done by this commit as an interim
fix until the problem has been further investigated.

Issue #1660
2015-08-27 12:04:26 +02:00
Adrian-Ken Rueegsegger c2ff0ae9d4 Minor cleanup fixes
- Fix spelling errors
- Remove extra semicolons
- Remove extra spaces

Fixes #1650
2015-08-21 11:00:59 +02:00
Adrian-Ken Rueegsegger d2564442d4 vbox: Drop duplicate RDPMC exiting VM-control 2015-08-21 11:00:58 +02:00
Josef Söntgen 3f3b3a100e vbox: sidestep audio subsystem
There are currently some issue with the mixing/filtering code of vbox.
So instead of using the audio subsystem to do filtering and mixing we
bypass it to get better audio qualitiy. That means that the device
model of the VM has to use the same sample rate as the Audio_out/in
sessions, however.

Issue #1647.
2015-08-21 11:00:58 +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 4c19576d4e vbox: use multiple host CPUs
Fixes #1553
2015-08-21 10:58:59 +02:00
Christian Prochaska 824fb72694 vbox: update the PDPTE registers if needed
Fixes #1638
2015-08-21 10:58:59 +02:00
Christian Prochaska 9d37510d1d vbox: shared folder read/write loop fix
Stop trying to read or write if the backend function reports that 0 bytes
have been read or written.

Fixes #1563
2015-07-21 09:43:15 +02:00
Alexander Boettcher dddb536e25 vbox: use initFromSettings for construction VM 2015-07-21 09:30:12 +02:00
Adrian-Ken Rueegsegger 21c7fa2881 vbox: Fix VMM startup failure message
Use printf format specifier with correct size to log error code which is
if type uint32_t. Also print the error code in hex since this simplifies
lookup as the error values are also defined as hexadecimal values, see
[1].

Fixes #1600

[1] - repos/ports/src/virtualbox/include/xpcom/nsError.h
2015-07-01 14:46:15 +02:00
Alexander Boettcher be149cc6e4 vbox: increase cpu_session quota for pthreads
Fixes #1591
2015-06-22 14:43:39 +02:00
Christian Prochaska 252a10a859 vbox: fix mouse wheel support
Fixes #1589
2015-06-22 14:43:38 +02:00
Christian Prochaska a801976727 vbox: dynamic adaptation to screen-size changes
Fixes #1554
2015-06-22 14:43:38 +02:00
Christian Helmuth 93f0cde72f vbox: adapt to framebuffer mode on startup
This works only if guest additions are installed and those report
"graphics=yes".

Related to #1554
2015-06-09 11:00:10 +02:00
Christian Prochaska 55ec357d09 vbox: store the unmodified TSC in the GIP
Fixes #1548
2015-06-03 12:53:48 +02:00
Josef Söntgen 30a02a5d92 vbox: support unaligned MMIO read access
Fixes #1540.
2015-05-27 11:38:19 +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
Norman Feske 97dc9664fe base: move flex_iterator.h to include/util
Fixes #1482
2015-04-17 16:13:22 +02:00
Christian Prochaska af2cd7175c vbox: enable video acceleration (VBVA)
This commit enables the VirtualBox graphics adapter, provides guest mouse
pointer integration with Nitpicker using the 'vbox_pointer' application
and enhances the VirtualBox run scripts with the configuration of
Nitpicker, input merger and network driver.

Fixes #1474
2015-04-13 14:18:15 +02:00
Christian Prochaska 0e344c9830 vbox: support more mouse event combinations
VirtualBox can receive absolute or relative mouse motion events from the
'Input' service and the VM can support either or both of them. With this
patch, more of the possible combinations are handled.

Fixes #1470
2015-04-09 16:04:44 +02:00
Josef Söntgen e53e6b0c5c vbox: rework network backend
* Handle signals and thereby work asynchronously
* Forward link-state changes to the attached AboveNetwork

Fixes #1465.
2015-03-27 11:53:15 +01:00
Christian Prochaska dac3efcc02 vbox: replace too strict assertion with debug message
The 'continue_hw_accelerated' assertion at the end of the recall handler
can fail in situations which are not problematic, for example if the
'Timer' thread has set the 'VMCPU_FF_TIMER' flag in the meantime and
requested a recall afterwards. Since we don't know for sure if a recall is
requested for the other flags as well, the assertion gets replaced by a
debug message, which gets printed if any of the 'not yet verified as safe'
flags is set.

Fixes #1426
2015-03-19 09:25:04 +01:00
Norman Feske 560a58e5c6 Move packet stream to Genode namespace, fix #1455 2015-03-19 08:57:22 +01:00
Alexander Boettcher 2ad6a3b934 vbox: support multi touch input events
Fixes #1444
2015-03-19 08:57:19 +01:00
Christian Prochaska 1f7fd647da vbox: wait longer for stable timer state
Some functions in the time manager, for example 'TMTimerSet()' and
'TMTimerStop()' let VirtualBox abort with a failed assertion if the timer
does not change to a 'stable' state after 1000 calls of a mixture of
'yield' and 'sleep'. On Genode, this happens sometimes when the 'EMT'
thread is executing 'TMTimerSet()' and gets interrupted by the 'TAP'
thread, which calls 'TMTimerStop()' and waits for the 'EMT' thread to
finish setting the timer. Since the 'EMT' thread has the lowest priority,
1000 retries can be too few. Without the assertion, these functions would
return an error code, which is often ignored by the caller, so it seems
safer to keep retrying until the function can return successfully.

Fixes #1437
2015-03-13 12:17:26 +01:00
Christian Helmuth 143c703669 vbox: prevent warning 2015-03-13 12:17:26 +01:00
Christian Helmuth 86c0656de0 vbox: cleanup device registration
Patch got lost on win8 merge ;-)
2015-03-13 12:17:25 +01:00
Christian Prochaska c68828519e vbox: revert 'PGMR3Phys{Read,Write}External'
Fixes #1417
2015-03-13 12:17:24 +01:00
Alexander Boettcher e5b187ce16 vbox: support wheel input events
Issue #1438
2015-03-13 12:17:23 +01:00