Virtualbox, Qemu, PCI passthrough and Voodoo2

Emulation of old PCs, PC hardware, or PC peripherals.

Virtualbox, Qemu, PCI passthrough and Voodoo2

Postby Dario » 2018-3-19 @ 13:54

Hello to everybody.
Having retrieved my old 3d Blaster Voodoo2, i decided to try to bring it to life again.
Not having an old rig where to place it, I decided to try the way of PCI passthrough with Virtualbox.
I'm running Arch Linux on an Asus H97-PLUS motherboard with an Intel i5 4690. The card was only recognized in the PCI slot at the bottom, and correctly reported to the system. I followed the instrucion in the Virtualbox manual and added the Voodoo2 to a Win98 machine inside Virtualbox.
Well, Windows 98 found it and I was able to install the drivers, and it worked... I connected the Voodoo2 to a monitor I had around, and it worked:) :cool:
I tried Need For Speed III and Novalogic Mig 29 Fulcrum (between the games I had at the time, when I rocked a Pentium 200 MMX).
The main problem is that the performance is awful:( I got better results (almost 100% speed and minimal stuttering) with the card emulated in PCem... :neutral: The card is very slow, managing a couple of frames per second or so...

I know it's completely useless and that there are better ways to enjoy those old games, nonetheless I think that it would be nice to have it work properly, for the sake of fiddling around with vintage hardware:)
The question is, do you have any suggestion?
By the way, I tried to add the PCI device to a Qemu/KVM virtual machine, but it looks like my motherboard is not IOMMU enabled, and I wasn't able to run the virtual machine. I wonder if this is the cause of the slow performance: Virtualbox is able to pass the PCI device, but without the proper hardware support, it's not running at full speed...

If you have any idea, thanks in advance:)

Dario
Last edited by Dario on 2018-4-08 @ 10:19, edited 1 time in total.
Dario
Newbie
 
Posts: 4
Joined: 2018-3-19 @ 13:27

Re: Virtualbox, PCI passthrough and Voodoo2

Postby digger » 2018-3-24 @ 01:34

What a cool thing to try! Kudos for your creativity. :happy:

I was initially surprised that you even got it to work at all without an IOMMU. However, according to the VirtualBox documentation, PCI passthrough on IOMMU-less systems is indeed possible for certain devices that do not perform DMA bus mastering. I believe I faintly recall reading somewhere a long time ago that Voodoo cards indeed don't make use of bus mastering.

My guess is that since modern graphics cards require an IOMMU for passthrough due to the use of a GART, the PCI passthrough functionality in non-IOMMU-mode was never optimized (or perhaps couldn't be optimized) for graphics cards. If you leave out graphics cards, most PCI cards that remain are things like parallel and serial adapters, which don't require nearly as much performance as graphics cards do. Lower PCI passthrough performance when using such PCI cards in VMs would perhaps not be noticed.

Perhaps this speed limitation was always there, but was never publicly known, since apparently not many people have been crazy enough to expose a Voodoo 2 card to a VM using PCI passthrough, let alone in a system lacking an IOMMU. :lol:

The best way to confirm whether the lack of an IOMMU is indeed what's causing the slow performance, is by trying it out in an IOMMU-enabled system that still has at least one (legacy) PCI slot.

Good luck! I'm curious about your continued findings. Keep tinkering. :happy:
User avatar
digger
Newbie
 
Posts: 48
Joined: 2010-2-12 @ 18:15
Location: Amsterdam, the Netherlands

Re: Virtualbox, PCI passthrough and Voodoo2

Postby leileilol » 2018-3-24 @ 01:50

I can only think of the PowerVR PCX2 for any practical '3d' passthrough and it might not get along with that popular generic vesa hacked driver anyway.
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
386DX vs SX isn't about a missing FPU
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
Old PCs aren't 'aesthetic'
User avatar
leileilol
l33t++
 
Posts: 9039
Joined: 2006-12-16 @ 18:03

Re: Virtualbox, PCI passthrough and Voodoo2

Postby Dario » 2018-3-27 @ 12:55

Hi!
I'm currently unable to get a IOMMU-enabled system:( I didn't know about all these things when I bought the motherboard (almost 4 years ago, by the way). Next time I'll be more careful.
The 3d Blaster costed big money back then, I suppose by now it's fully amortised but I'd really like to use something I paid for:)
Thanks,

Dario
Dario
Newbie
 
Posts: 4
Joined: 2018-3-19 @ 13:27

Re: Virtualbox, PCI passthrough and Voodoo2

Postby vvbee » 2018-3-31 @ 16:17

I'd dig around to make sure the system doesn't support iommu. I use a cheap asrock b85 board that shouldn't support it but does.
User avatar
vvbee
Member
 
Posts: 316
Joined: 2017-2-06 @ 17:56

Re: Virtualbox, PCI passthrough and Voodoo2

Postby Dario » 2018-4-03 @ 21:02

You were right, I could enable IOMMU! i was missing something (discovered here)
Under VirtualBox the Voodoo2 is still slow, but I managed to pull together a Windows XP machine with Qemu and it works beautifully:)
I'll try something else and report back:)

Thanks

Dario
Dario
Newbie
 
Posts: 4
Joined: 2018-3-19 @ 13:27

Re: Virtualbox, PCI passthrough and Voodoo2

Postby digger » 2018-4-07 @ 16:16

Cool! :happy:

I wonder why it worked better with QEMU than with VirtualBox. Perhaps you could report this finding in the VirtualBox forums, even though the core developers don't seem to respond often to feature requests that don't seem profitable to Oracle.

By the way, what Hypervisor are you using QEMU with? KVM or Xen?

Anyway, keep us posted.
User avatar
digger
Newbie
 
Posts: 48
Joined: 2010-2-12 @ 18:15
Location: Amsterdam, the Netherlands

Re: Virtualbox, PCI passthrough and Voodoo2

Postby vvbee » 2018-4-07 @ 19:20

Last I checked passthrough was an unsupported feature in virtualbox.
User avatar
vvbee
Member
 
Posts: 316
Joined: 2017-2-06 @ 17:56

Re: Virtualbox, PCI passthrough and Voodoo2

Postby Dario » 2018-4-08 @ 10:19

Hi. I'm using QEMU with KVM.
I don't know why VirtualBox is slower. It has the same speed, whether IOMMU is activated or not.
By the way, I'm struggling with passthrough of a Nvidia videocard (code 43 with Windows guest), but it's OT:)

EDIT: updated the thread's title
Dario
Newbie
 
Posts: 4
Joined: 2018-3-19 @ 13:27


Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 1 guest