Opened 14 years ago

Closed 8 years ago

#1 closed task (fixed)

Port VBox driver

Reported by: diver Owned by: Valery V. Sedletski
Priority: critical Milestone: VBox driver
Component: Driver Keywords:
Cc:

Description


Attachments (33)

additions.diff (617 bytes) - added by Valery V. Sedletski 9 years ago.
VBox Additions
bldprogs.diff (925 bytes) - added by Valery V. Sedletski 9 years ago.
Bldprogs patch (VBoxTpG.cpp)
dev.diff (23.8 KB) - added by Valery V. Sedletski 9 years ago.
Devices (device support)
disasm.diff (1.4 KB) - added by Valery V. Sedletski 9 years ago.
Disassembler
include.diff (2.6 KB) - added by Valery V. Sedletski 9 years ago.
headers
poll.diff (31.5 KB) - added by Valery V. Sedletski 9 years ago.
poll() emulation
recompiler.diff (3.1 KB) - added by Valery V. Sedletski 9 years ago.
Recompiler
runtime.diff (63.8 KB) - added by Valery V. Sedletski 9 years ago.
Runtime
storage.diff (940 bytes) - added by Valery V. Sedletski 9 years ago.
Storage
supdrv.diff (7.2 KB) - added by Valery V. Sedletski 9 years ago.
Support driver
vmm-align.diff (8.3 KB) - added by Valery V. Sedletski 9 years ago.
VMM
Config.kmk.diff (1.1 KB) - added by Valery V. Sedletski 9 years ago.
AutoConfig.kmk (4.2 KB) - added by Valery V. Sedletski 9 years ago.
AutoConfig?.kmk for minimal configuration
additions.2.diff (617 bytes) - added by Valery V. Sedletski 8 years ago.
VBox Additions
bldprogs.2.diff (1.3 KB) - added by Valery V. Sedletski 8 years ago.
Config.kmk.2.diff (3.1 KB) - added by Valery V. Sedletski 8 years ago.
The changes for Config.kmk
debugger.diff (547 bytes) - added by Valery V. Sedletski 8 years ago.
Debugger
dev.2.diff (23.8 KB) - added by Valery V. Sedletski 8 years ago.
Device drivers
disasm.2.diff (1.4 KB) - added by Valery V. Sedletski 8 years ago.
Disassembler
extpacks.diff (5.9 KB) - added by Valery V. Sedletski 8 years ago.
Extpacks (DTrace and VNC)
frontends.diff (21.0 KB) - added by Valery V. Sedletski 8 years ago.
Frontends
hostservices.diff (26.4 KB) - added by Valery V. Sedletski 8 years ago.
Host services
include.2.diff (8.1 KB) - added by Valery V. Sedletski 8 years ago.
Headers
main.diff (23.2 KB) - added by Valery V. Sedletski 8 years ago.
Main (VBox XPCOM server)
networkservices.diff (27.6 KB) - added by Valery V. Sedletski 8 years ago.
Network Services
poll.2.diff (31.4 KB) - added by Valery V. Sedletski 8 years ago.
poll() emulation
recompiler.2.diff (3.0 KB) - added by Valery V. Sedletski 8 years ago.
Instruction recompiler
runtime.2.diff (66.2 KB) - added by Valery V. Sedletski 8 years ago.
VBox runtime (IPRT)
storage.2.diff (942 bytes) - added by Valery V. Sedletski 8 years ago.
Storage
supdrv.2.diff (7.2 KB) - added by Valery V. Sedletski 8 years ago.
VBox support driver
vmm.diff (10.1 KB) - added by Valery V. Sedletski 8 years ago.
VMM (Virtual Machine Monitor) library
xpcom.diff (21.3 KB) - added by Valery V. Sedletski 8 years ago.
XPCOM
AutoConfig.2.kmk (4.0 KB) - added by Valery V. Sedletski 8 years ago.
AutoConfig?.kmk resulted

Download all attachments as: .zip

Change History (46)

comment:1 Changed 14 years ago by diver

Priority: majorcritical
Type: defecttask

comment:2 Changed 9 years ago by diver

Milestone: VBox 3.1VBox diver

Milestone renamed

comment:3 Changed 9 years ago by diver

Summary: Port VBox 3.1 driverPort VBox driver

comment:4 Changed 9 years ago by dmik

Owner: set to Valery V. Sedletski
Status: newassigned

comment:5 Changed 9 years ago by diver

Milestone: VBox diverVBox driver

Milestone renamed

comment:6 Changed 9 years ago by Valery V. Sedletski

The driver was already built successfully a month ago, and doesn't trap in usual cases. But there are some unimplemented functions in R0 Runtime part. At least, the driver is successfully opened, accepts IOCtl commands and about 75% of tests are working (the Runtime and Host Driver testcases). Also, there are some testcases which hang the host machine (need to recall)

Changed 9 years ago by Valery V. Sedletski

Attachment: additions.diff added

VBox Additions

Changed 9 years ago by Valery V. Sedletski

Attachment: bldprogs.diff added

Bldprogs patch (VBoxTpG.cpp)

Changed 9 years ago by Valery V. Sedletski

Attachment: dev.diff added

Devices (device support)

Changed 9 years ago by Valery V. Sedletski

Attachment: disasm.diff added

Disassembler

Changed 9 years ago by Valery V. Sedletski

Attachment: include.diff added

headers

Changed 9 years ago by Valery V. Sedletski

Attachment: poll.diff added

poll() emulation

Changed 9 years ago by Valery V. Sedletski

Attachment: recompiler.diff added

Recompiler

Changed 9 years ago by Valery V. Sedletski

Attachment: runtime.diff added

Runtime

Changed 9 years ago by Valery V. Sedletski

Attachment: storage.diff added

Storage

Changed 9 years ago by Valery V. Sedletski

Attachment: supdrv.diff added

Support driver

Changed 9 years ago by Valery V. Sedletski

Attachment: vmm-align.diff added

VMM

comment:7 Changed 9 years ago by Valery V. Sedletski

Uploaded the patches for the Support driver, Runtime, VMM and other parts needed for minimal build, without XPCOM and GUI's. Note that these patches are for gcc-v3.3.5-csd6 at the moment, and need 'configure' and cfg.sh attached to ticket #10

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

Changed 9 years ago by Valery V. Sedletski

Attachment: Config.kmk.diff added

Changed 9 years ago by Valery V. Sedletski

Attachment: AutoConfig.kmk added

AutoConfig?.kmk for minimal configuration

Changed 8 years ago by Valery V. Sedletski

Attachment: additions.2.diff added

VBox Additions

Changed 8 years ago by Valery V. Sedletski

Attachment: bldprogs.2.diff added

Changed 8 years ago by Valery V. Sedletski

Attachment: Config.kmk.2.diff added

The changes for Config.kmk

Changed 8 years ago by Valery V. Sedletski

Attachment: debugger.diff added

Debugger

Changed 8 years ago by Valery V. Sedletski

Attachment: dev.2.diff added

Device drivers

Changed 8 years ago by Valery V. Sedletski

Attachment: disasm.2.diff added

Disassembler

Changed 8 years ago by Valery V. Sedletski

Attachment: extpacks.diff added

Extpacks (DTrace and VNC)

Changed 8 years ago by Valery V. Sedletski

Attachment: frontends.diff added

Frontends

Changed 8 years ago by Valery V. Sedletski

Attachment: hostservices.diff added

Host services

Changed 8 years ago by Valery V. Sedletski

Attachment: include.2.diff added

Headers

Changed 8 years ago by Valery V. Sedletski

Attachment: main.diff added

Main (VBox XPCOM server)

Changed 8 years ago by Valery V. Sedletski

Attachment: networkservices.diff added

Network Services

Changed 8 years ago by Valery V. Sedletski

Attachment: poll.2.diff added

poll() emulation

Changed 8 years ago by Valery V. Sedletski

Attachment: recompiler.2.diff added

Instruction recompiler

Changed 8 years ago by Valery V. Sedletski

Attachment: runtime.2.diff added

VBox runtime (IPRT)

Changed 8 years ago by Valery V. Sedletski

Attachment: storage.2.diff added

Storage

Changed 8 years ago by Valery V. Sedletski

Attachment: supdrv.2.diff added

VBox support driver

Changed 8 years ago by Valery V. Sedletski

Attachment: vmm.diff added

VMM (Virtual Machine Monitor) library

Changed 8 years ago by Valery V. Sedletski

Attachment: xpcom.diff added

XPCOM

Changed 8 years ago by Valery V. Sedletski

Attachment: AutoConfig.2.kmk added

AutoConfig?.kmk resulted

comment:8 Changed 8 years ago by Valery V. Sedletski

Here I attached all my latest patches to VBox 5.0.51 sources (applies to svn revision 58105). These are the set of this ticket attachments from additions.2.diff to AutoConfig?.2.kmk (20 total). These patches may be applied in any order, because they are intended for independent pieces of file system. Still missing are libvncserver (for VNC VRDP extpack) and libvpx (needed for capture VM video feature). We'll need to make rpm packages for them in the near future. I attached the corresponding version of AutoConfig?.kmk, which you could use as an example of what should you get with 'configure' (or, just change the paths in it, to be used without 'configure'). Also note that these patches should be used with latest gcc 4.9.2 from Netlabs RPM repo. I deleted some workarounds for using with gcc3.3.5-csd6. (but I still have them on my hard disk, I could share them if needed).
Note also that other platforms use YASM instead of NASM, and we haven't it. So, there are much warnings. Also, I had to %ifdef some align-related Assert's in VMM sources and some assembler includes.
Also, I changed some network-related code to use sockets instead of pipes in select/poll as we can use sockets only here.
Also, I added "#ifdef OS2_PM_EVENT_QUEUES" in XPCOM code to switch between PM queue-based code and local sockets-based one (aka "unix domain sockets" which OS/2 supports natively, via afos2.sys driver).
The Qt frontend also builds OK here, but some code is still missing, or should be refactored, like hotkeys/keyboard and mouse capture/input events. So, there are lags/PM queue delays in Qt frontend. So, use VBoxHeadless or VBoxSDL for now, they work fine.
PS: The SMP-related code is not implemented here, so, the number of processors is hardcoded to 1 for now. Also, the host driver, SUPR0 lib and Runtime is fixed now, so no more "Guru meditation" error on most guest OS'es (see #21 and https://www.virtualbox.org/ticket/1939).

Last edited 8 years ago by Valery V. Sedletski (previous) (diff)

comment:9 Changed 8 years ago by rklipp

Hi valerius, I would like to see you're "workarounds" for using with gcc3.3.5-csd6. If it is convienient and you have the time available could you possibly e-mail them to me at rklipp(at)megared.net.mx?

thanks

comment:10 Changed 8 years ago by dmik

First two patches are applied in r8 and r9 :) @valerius, please check them to see how they my original commits differ from your diff files (you should notice it when merging the SVN with your local copy after svn up though). This is important so that you notice the coding conventions and other tricks and could commit on your own in the future. These two patches are simple of course, not much to check there but further patches are more complex so please check the real commits with attention.

comment:11 Changed 8 years ago by Valery V. Sedletski

Added two kbuild tickets, http://trac.netlabs.org/kbuild/ticket/125 and http://trac.netlabs.org/kbuild/ticket/126, they contain some small kbuild macros patches needed to successfully compile VBox under OS/2.
PS: rklipp, sorry for not answering you so long time :( These old patches for old gcc 3.3.5 are not cleaned up from unneeded code, and they are for VBox 5.0.0. Now our svn is being committed for version 5.0.6 already. And BTW, you'd better use the latest version with latest patches (and these macros patches, you'll need them too). And, the newer VBox versions require new gcc for using .rsp linker scripts (because linker command line already reaches some limit and you'll get linker errors with cut-down command lines). Do you still need these gcc3 patches?

comment:12 Changed 8 years ago by rklipp

Hi valerius, Thanks for the update info, and no, I no longer need the gcc3 patches. Your "Guru Mediation" fix was awesome!

Last edited 8 years ago by rklipp (previous) (diff)

comment:13 Changed 8 years ago by dmik

Resolution: fixed
Status: assignedclosed

Most of the above patches were applied in a number of revisions up to (and including) r55. Things left out either turned out not to be necessary or will be committed in further commits (and within separate tickets) after clarifying the details. Also omitted are Qt4 patches (for now). They will be committed within #3.

Now everything is successfully built out of the box (in the RPM environment, of course). I will update build instructions in Wiki as there are more packages to install.

Although VBoxDrv.sys successfully builds now, it fails in the open call with the current set of patches. Valerius can make it work with his local hacks (that cause some RTMp methods to pretend they are running on a single CPU machine) and is currently trying to find why whe generic RTMp implementation (used on other platforms) doesn't work for us. This will be finished within #32.

I'm closing this ticket as the main task is done (and there is also too much irrelevant information). New tickets will be created for the bits that are still to be done for VBoxDrv.

Note: See TracTickets for help on using tickets.