Opened 15 years ago

Closed 9 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 9 years ago.
VBox Additions
bldprogs.2.diff (1.3 KB ) - added by Valery V. Sedletski 9 years ago.
Config.kmk.2.diff (3.1 KB ) - added by Valery V. Sedletski 9 years ago.
The changes for Config.kmk
debugger.diff (547 bytes ) - added by Valery V. Sedletski 9 years ago.
Debugger
dev.2.diff (23.8 KB ) - added by Valery V. Sedletski 9 years ago.
Device drivers
disasm.2.diff (1.4 KB ) - added by Valery V. Sedletski 9 years ago.
Disassembler
extpacks.diff (5.9 KB ) - added by Valery V. Sedletski 9 years ago.
Extpacks (DTrace and VNC)
frontends.diff (21.0 KB ) - added by Valery V. Sedletski 9 years ago.
Frontends
hostservices.diff (26.4 KB ) - added by Valery V. Sedletski 9 years ago.
Host services
include.2.diff (8.1 KB ) - added by Valery V. Sedletski 9 years ago.
Headers
main.diff (23.2 KB ) - added by Valery V. Sedletski 9 years ago.
Main (VBox XPCOM server)
networkservices.diff (27.6 KB ) - added by Valery V. Sedletski 9 years ago.
Network Services
poll.2.diff (31.4 KB ) - added by Valery V. Sedletski 9 years ago.
poll() emulation
recompiler.2.diff (3.0 KB ) - added by Valery V. Sedletski 9 years ago.
Instruction recompiler
runtime.2.diff (66.2 KB ) - added by Valery V. Sedletski 9 years ago.
VBox runtime (IPRT)
storage.2.diff (942 bytes ) - added by Valery V. Sedletski 9 years ago.
Storage
supdrv.2.diff (7.2 KB ) - added by Valery V. Sedletski 9 years ago.
VBox support driver
vmm.diff (10.1 KB ) - added by Valery V. Sedletski 9 years ago.
VMM (Virtual Machine Monitor) library
xpcom.diff (21.3 KB ) - added by Valery V. Sedletski 9 years ago.
XPCOM
AutoConfig.2.kmk (4.0 KB ) - added by Valery V. Sedletski 9 years ago.
AutoConfig.kmk resulted

Download all attachments as: .zip

Change History (46)

comment:1 by diver, 15 years ago

Priority: majorcritical
Type: defecttask

comment:2 by diver, 9 years ago

Milestone: VBox 3.1VBox diver

Milestone renamed

comment:3 by diver, 9 years ago

Summary: Port VBox 3.1 driverPort VBox driver

comment:4 by dmik, 9 years ago

Owner: set to Valery V. Sedletski
Status: newassigned

comment:5 by diver, 9 years ago

Milestone: VBox diverVBox driver

Milestone renamed

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

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)

by Valery V. Sedletski, 9 years ago

Attachment: additions.diff added

VBox Additions

by Valery V. Sedletski, 9 years ago

Attachment: bldprogs.diff added

Bldprogs patch (VBoxTpG.cpp)

by Valery V. Sedletski, 9 years ago

Attachment: dev.diff added

Devices (device support)

by Valery V. Sedletski, 9 years ago

Attachment: disasm.diff added

Disassembler

by Valery V. Sedletski, 9 years ago

Attachment: include.diff added

headers

by Valery V. Sedletski, 9 years ago

Attachment: poll.diff added

poll() emulation

by Valery V. Sedletski, 9 years ago

Attachment: recompiler.diff added

Recompiler

by Valery V. Sedletski, 9 years ago

Attachment: runtime.diff added

Runtime

by Valery V. Sedletski, 9 years ago

Attachment: storage.diff added

Storage

by Valery V. Sedletski, 9 years ago

Attachment: supdrv.diff added

Support driver

by Valery V. Sedletski, 9 years ago

Attachment: vmm-align.diff added

VMM

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

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)

by Valery V. Sedletski, 9 years ago

Attachment: Config.kmk.diff added

by Valery V. Sedletski, 9 years ago

Attachment: AutoConfig.kmk added

AutoConfig.kmk for minimal configuration

by Valery V. Sedletski, 9 years ago

Attachment: additions.2.diff added

VBox Additions

by Valery V. Sedletski, 9 years ago

Attachment: bldprogs.2.diff added

by Valery V. Sedletski, 9 years ago

Attachment: Config.kmk.2.diff added

The changes for Config.kmk

by Valery V. Sedletski, 9 years ago

Attachment: debugger.diff added

Debugger

by Valery V. Sedletski, 9 years ago

Attachment: dev.2.diff added

Device drivers

by Valery V. Sedletski, 9 years ago

Attachment: disasm.2.diff added

Disassembler

by Valery V. Sedletski, 9 years ago

Attachment: extpacks.diff added

Extpacks (DTrace and VNC)

by Valery V. Sedletski, 9 years ago

Attachment: frontends.diff added

Frontends

by Valery V. Sedletski, 9 years ago

Attachment: hostservices.diff added

Host services

by Valery V. Sedletski, 9 years ago

Attachment: include.2.diff added

Headers

by Valery V. Sedletski, 9 years ago

Attachment: main.diff added

Main (VBox XPCOM server)

by Valery V. Sedletski, 9 years ago

Attachment: networkservices.diff added

Network Services

by Valery V. Sedletski, 9 years ago

Attachment: poll.2.diff added

poll() emulation

by Valery V. Sedletski, 9 years ago

Attachment: recompiler.2.diff added

Instruction recompiler

by Valery V. Sedletski, 9 years ago

Attachment: runtime.2.diff added

VBox runtime (IPRT)

by Valery V. Sedletski, 9 years ago

Attachment: storage.2.diff added

Storage

by Valery V. Sedletski, 9 years ago

Attachment: supdrv.2.diff added

VBox support driver

by Valery V. Sedletski, 9 years ago

Attachment: vmm.diff added

VMM (Virtual Machine Monitor) library

by Valery V. Sedletski, 9 years ago

Attachment: xpcom.diff added

XPCOM

by Valery V. Sedletski, 9 years ago

Attachment: AutoConfig.2.kmk added

AutoConfig.kmk resulted

comment:8 by Valery V. Sedletski, 9 years ago

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 9 years ago by Valery V. Sedletski (previous) (diff)

comment:9 by rklipp, 9 years ago

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 by dmik, 9 years ago

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 by Valery V. Sedletski, 9 years ago

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 by rklipp, 9 years ago

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

Version 0, edited 9 years ago by rklipp (next)

comment:13 by dmik, 9 years ago

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.